kernel - Add PROC_PDEATHSIG_CTL and PROC_PDEATHSIG_STATUS* Add PROC_PDEATHSIG_CTL and PROC_PDEATHSIG_STATUS to procctl(2). This follows the linux and freebsd semantics, however it should be note
kernel - Add PROC_PDEATHSIG_CTL and PROC_PDEATHSIG_STATUS* Add PROC_PDEATHSIG_CTL and PROC_PDEATHSIG_STATUS to procctl(2). This follows the linux and freebsd semantics, however it should be noted that since the child of a fork() clears the setting, these semantics have a fork/exit race between an exiting parent and a child which has not yet setup its death wish.* Also fix a number of signal ranging checks.Requested-by: zrj
show more ...
kernel/iscsi: Remove iscsi's local definition of boolean_t.It was locally defining boolean_t as int (4 bytes) for userland, butboolean_t is _Bool (1 byte) in the kernel since quite some time.Thi
kernel/iscsi: Remove iscsi's local definition of boolean_t.It was locally defining boolean_t as int (4 bytes) for userland, butboolean_t is _Bool (1 byte) in the kernel since quite some time.This caused isc_opt_t's size being different in userland vs. kernel,and ultimately caused the ioctl number of ISCSISETOPT, which includessizeof(isc_opt_t), to be different in userland vs. the kernel,resulting in at first inexplicable ENOIOCTL issues when usingiscontrol(8).Change all 'boolean_t' usage to 'bool' which is available for bothuserland and kernel, defined as _Bool.Thanks-to: Georg "megaT" Bege <georg@bege.email> for spotting the ioctl number difference & testing
kernel: Remove <sys/mutex.h> from all files that don't need it.98% of these were remains from porting from FreeBSD which could havebeen removed after converting to lockmgr(), etc.While here, do
kernel: Remove <sys/mutex.h> from all files that don't need it.98% of these were remains from porting from FreeBSD which could havebeen removed after converting to lockmgr(), etc.While here, do the same for <sys/mutex2.h>.
kernel/iscsi: Include <sys/mutex2.h> in iscsivar.h.It uses struct mtx in a struct.
<sys/objcache.h>: Switch to lighter <sys/_malloc.h> header. Exposing "struct malloc_type" internals is useful even under kernel structures namespace. In vmstat(8) this will allow to drop dependenc
<sys/objcache.h>: Switch to lighter <sys/_malloc.h> header. Exposing "struct malloc_type" internals is useful even under kernel structures namespace. In vmstat(8) this will allow to drop dependency on the <sys/malloc.h> header.
kernel: Don't include <sys/user.h> in kernel code.There is really no point in doing that because its main purpose is toexpose kernel structures to userland. The majority of cases wasn'tneeded at
kernel: Don't include <sys/user.h> in kernel code.There is really no point in doing that because its main purpose is toexpose kernel structures to userland. The majority of cases wasn'tneeded at all and the rest required only a couple of other includes.
kernel - Change callout in struct ccb_hdr* Change the callout declaration in struct ccb_hdr from an embedded structure to a pointer, add padding to get the whole structure to its original size
kernel - Change callout in struct ccb_hdr* Change the callout declaration in struct ccb_hdr from an embedded structure to a pointer, add padding to get the whole structure to its original size (prior to the recent callout patch).* This removes an improper ABI dependency on the kernel struct callout structure which was causing 'camcontrol', and 'smartctl' (from smartmontools) to fail.Testing: dillon, tuxillo
kernel: Remove numerous #include <sys/thread2.h>.Most of them were added when we converted spl*() calls tocrit_enter()/crit_exit(), almost 14 years ago. We can nowremove a good chunk of them agai
kernel: Remove numerous #include <sys/thread2.h>.Most of them were added when we converted spl*() calls tocrit_enter()/crit_exit(), almost 14 years ago. We can nowremove a good chunk of them again for where crit_*() areno longer used.I had to adjust some files that were relying on thread2.hor headers that it includes coming in via other headersthat it was removed from.
kernel: Change CFLAGS -> KCFLAGS also in commented out Makefile lines.
kernel: Remove unused *.h files from SRCS in kernel module Makefiles.They were found by checking the preprocessed code of the filesin SRCS to see if the header was included at some point.After r
kernel: Remove unused *.h files from SRCS in kernel module Makefiles.They were found by checking the preprocessed code of the filesin SRCS to see if the header was included at some point.After removal, the preprocessed source of a build with the oldMakefiles was compared against one with the changes (for variouskernel configurations and when building just from /usr/src) toverify that the commit leads to no functional change.
kernel - per-thread fd cache, p_fd lock bypass* Implement a per-thread (fd,fp) cache. Cache hits can keep fp's in a held state (avoiding the need to fhold()/fdrop() the ref count), and bypasse
kernel - per-thread fd cache, p_fd lock bypass* Implement a per-thread (fd,fp) cache. Cache hits can keep fp's in a held state (avoiding the need to fhold()/fdrop() the ref count), and bypasses the p_fd spinlock. This allows the file pointer structure to generally be shared across cpu caches.* Can cache up to four descriptors in each thread, LRU. This is the common case. Highly threaded programs tend to focus work on a distinct file descriptors in each thread.* One file descriptor can be cached in up to four threads. This is a significant limitation, though relatively uncommon. On a cache miss the code drops into the normal shared p_fd spinlock lookup.
kernel/iscsi: Remove unneeded <signal.h> inclusion.
kernel - Major mtx lock cleanup* Integrate the ident into the mtx structure, remove the ident parameter from all locking calls.* Rename some of the functions, shortening them.* Add a few new
kernel - Major mtx lock cleanup* Integrate the ident into the mtx structure, remove the ident parameter from all locking calls.* Rename some of the functions, shortening them.* Add a few new functions which hammer2 will use.
kernel: Followup commit to f3f3eadbf9de7a55ef1ff8cb23a68641403906ea.Fix some more SYSINIT() cases (all in code which isn't compiled forone reason or the other), mainly to make a branch merge bette
kernel: Followup commit to f3f3eadbf9de7a55ef1ff8cb23a68641403906ea.Fix some more SYSINIT() cases (all in code which isn't compiled forone reason or the other), mainly to make a branch merge better here.
kernel: Move us to using M_NOWAIT and M_WAITOK for mbuf functions.The main reason is that our having to use the MB_WAIT and MB_DONTWAITflags was a recurring issue when porting drivers from FreeBSD
kernel: Move us to using M_NOWAIT and M_WAITOK for mbuf functions.The main reason is that our having to use the MB_WAIT and MB_DONTWAITflags was a recurring issue when porting drivers from FreeBSD becauseit tended to get forgotten and the code would compile anyway with thewrong constants. And since MB_WAIT and MB_DONTWAIT ended up as ocflagsfor an objcache_get() or objcache_reclaimlist call (which use M_WAITOKand M_NOWAIT), it was just one big converting back and forth with somesanitization in between.This commit allows M_* again for the mbuf functions and keeps thesanitizing as it was before: when M_WAITOK is among the passed flags,objcache functions will be called with M_WAITOK and when it is absent,they will be called with M_NOWAIT. All other flags are scrubbed by theMB_OCFLAG() macro which does the same as the former MBTOM().Approved-by: dillon
kernel: Remove some more unused kmalloc types.M_MPSSASM_MPTUSERM_NETGRAPH_ITEMM_NWFSMNTM_PDUM_RDRANDM_SMBDATAM_SMBFSMNT
kernel/disk: Remove some unused variables and add __debugvar.
kernel/iscsi: Do not conditionalize on undefined names.
Remove some duplicated semicolons (mostly in the kernel).
kernel: Fix some wrong cam_simq_release() calls.Our (refcounted) simq can be released right after allocating the sim.These drivers were not doing it correctly.
kernel: Include <sys/ioccom.h> where ioctls are defined.Not where they are used.See http://bugs.dragonflybsd.org/issues/1334
kernel: Remove some more old major number related stuff.
kernel: Fix various whitespace and indent issues (no functional change).
kernel: Remove most definitions of CDEV_MAJOR.These are no longer needed since we have devfs.A few are left in because they are added to the order in SYSINIT()s.This needs further investigation.
kernel: Remove #include <sys/mutex.h> if <sys/mutex2.h> is included too.
12