freebsd-dev/sys
John Baldwin a120a7a3cd Rework the handling of stop signals in the NFS client. The changes in
195702, 195703, and 195821 prevented a thread from suspending while holding
locks inside of NFS by forcing the thread to fail sleeps with EINTR or
ERESTART but defer the thread suspension to the user boundary.  However,
this had the effect that stopping a process during an NFS request could
abort the request and trigger EINTR errors that were visible to userland
processes (previously the thread would have suspended and completed the
request once it was resumed).

This change instead effectively masks stop signals while in the NFS client.
It uses the existing TDF_SBDRY flag to effect this since SIGSTOP cannot
be masked directly.  Also, instead of setting PBDRY on individual sleeps,
the NFS client now sets the TDF_SBDRY flag around each NFS request and
stop signals are masked for all sleeps during that region (the previous
change missed sleeps in lockmgr locks).  The end result is that stop
signals sent to threads performing an NFS request are completely
ignored until after the NFS request has finished processing and the
thread prepares to return to userland.  This restores the behavior of
stop signals being transparent to userland processes while still
preventing threads from suspending while holding NFS locks.

Reviewed by:	kib
MFC after:	1 month
2013-02-06 17:06:51 +00:00
..
amd64 Compute the number of initial kernel page table pages (NKPT) dynamically. 2013-02-06 04:53:00 +00:00
arm Use and set gpio pin to high to power up usb. 2013-02-06 01:03:13 +00:00
boot * Add the integer div & mod functions and ARM EABI support functions to 2013-02-05 20:03:58 +00:00
bsm Merge OpenBSM 1.2-alpha2 changes from contrib/openbsm to 2012-12-01 13:46:37 +00:00
cam Format CDB output as 2 digit hex correcting the length 2013-01-31 14:07:24 +00:00
cddl zfs: fix, improve and re-organize page_lookup and page_unlock 2013-02-03 18:42:20 +00:00
compat Reduce duplication between i386/linux/linux.h and amd64/linux32/linux.h 2013-01-29 18:41:30 +00:00
conf allow for large KTR_ENTRIES values by allocating ktr_buf using malloc(9) 2013-02-03 09:57:39 +00:00
contrib Merge two bug fixes from the vendor branch. 2013-01-28 20:37:32 +00:00
crypto Revert previous commit... 2012-10-10 08:36:38 +00:00
ddb Small textdump enhancements. 2012-11-01 04:07:08 +00:00
dev Make sure that all mouse buttons are released when clients 2013-02-06 11:16:18 +00:00
fs Rework the handling of stop signals in the NFS client. The changes in 2013-02-06 17:06:51 +00:00
gdb
geom g_mirror: g_getattr() failure should not be fatal 2013-01-26 10:50:04 +00:00
gnu/fs r16312 is not any longer real since many years (likely since when VFS 2012-11-19 22:43:45 +00:00
i386 cpususpend_handler: mark AP as resumed only after fully setting up lapic 2013-02-02 12:04:32 +00:00
ia64 Remove firewire devices missed in r244992. 2013-01-04 15:29:50 +00:00
isa
kern Rework the handling of stop signals in the NFS client. The changes in 2013-02-06 17:06:51 +00:00
kgssapi Piete.Brooks at cl.cam.ac.uk reported via email a crash which was 2012-12-18 00:25:48 +00:00
libkern Add __aeabi_ulcmp to allow building of the LINT kernel. 2013-01-23 09:18:18 +00:00
mips Clean some 'svn:executable' properties in the tree. 2013-01-26 22:08:21 +00:00
modules Allow IEEE80211_SUPPORT_SUPERG to be defined _and_ have a working wlan 2013-02-02 02:00:29 +00:00
net Retire struct sockaddr_inarp. 2013-01-31 08:55:21 +00:00
net80211 Wrap this in an #ifdef so IEEE80211_SUPPORT_SUPERG will work correctly 2013-02-02 02:00:10 +00:00
netatalk Mechanically substitute flags from historic mbuf allocator with 2012-12-05 08:04:20 +00:00
netgraph ng_ether_ifnet_arrival_event: check interface type before using IFP2NG 2013-02-04 17:29:13 +00:00
netinet Add placeholder constants to reserve a portion of the socket option 2013-02-01 15:32:20 +00:00
netinet6 Generate lle_event in the IPv6 neighbor discovery code too. 2013-01-26 00:05:22 +00:00
netipsec Mechanically substitute flags from historic mbuf allocator with 2012-12-05 08:04:20 +00:00
netipx Mechanically substitute flags from historic mbuf allocator with 2012-12-05 08:04:20 +00:00
netnatm Mechanically substitute flags from historic mbuf allocator with 2012-12-05 08:04:20 +00:00
netncp Mechanically substitute flags from historic mbuf allocator with 2012-12-05 08:04:20 +00:00
netpfil In netpfil/pf: 2012-12-28 09:19:49 +00:00
netsmb Mechanically substitute flags from historic mbuf allocator with 2012-12-05 08:04:20 +00:00
nfs Remove the unused nfs_curusec(). 2013-01-17 19:03:24 +00:00
nfsclient Rework the handling of stop signals in the NFS client. The changes in 2013-02-06 17:06:51 +00:00
nfsserver Use vfs_timestamp() to set file timestamps rather than invoking 2013-01-18 18:43:38 +00:00
nlm Remove the support for using non-mpsafe filesystem modules. 2012-10-22 17:50:54 +00:00
ofed Mechanically substitute flags from historic mbuf allocator with 2012-12-05 08:04:20 +00:00
opencrypto Revert previous commit... 2012-10-10 08:36:38 +00:00
pc98 Remove support for plip from the GENERIC kernel as no systems in the 2013-02-01 20:17:11 +00:00
pci Mark 'ticks', 'time_second', and 'time_uptime' as volatile to prevent the 2013-01-28 19:38:13 +00:00
powerpc Enable the UFS quotas for big-iron GENERIC kernels. 2013-01-03 19:03:41 +00:00
rpc Add support for backchannels to the kernel RPC. Backchannels 2012-12-08 00:29:16 +00:00
security Implement the zonename token for jailed processes. If 2013-01-17 21:02:53 +00:00
sparc64 Remove support for plip from the GENERIC kernel as no systems in the 2013-02-01 20:17:11 +00:00
sys Rework the handling of stop signals in the NFS client. The changes in 2013-02-06 17:06:51 +00:00
teken
tools Fix build on ARM (and probably other platforms) 2012-12-28 06:52:53 +00:00
ufs UFS: Remove dead assignment. 2013-02-03 21:30:02 +00:00
vm Try to improve r242655 take III: move these SYSCTLs describing the kernel 2013-02-04 09:35:48 +00:00
x86 x86 suspend/resume: suspend pics and pseudo-pics in reverse order 2013-02-02 12:02:42 +00:00
xdr
xen Move the corresponding MTX_SYSINIT() next to their struct mtx declaration 2012-10-26 17:31:35 +00:00
Makefile Run cscope with the -v parameter to make it more user-friendly. 2012-12-02 20:51:24 +00:00