#
4a361a72 |
| 23-Jul-2024 |
Aaron LI <aly@aaronly.me> |
vfs/procfs: Add kqueue support
This patch is mostly derived from tmpfs.
With kqueue support implemented, poll() now works with the files on this pseudo filesystem. For example, poll() would report
vfs/procfs: Add kqueue support
This patch is mostly derived from tmpfs.
With kqueue support implemented, poll() now works with the files on this pseudo filesystem. For example, poll() would report POLLIN instead of timing out, and this makes less(1) work correctly.
Reviewed-by: dillon
show more ...
|
#
7ced3071 |
| 23-Jul-2024 |
Aaron LI <aly@aaronly.me> |
vfs/procfs: Whitespace and style fixes
|
Revision tags: v6.4.0, v6.4.0rc1, v6.5.0, v6.2.2, v6.2.1, v6.3.0, v6.0.1, v6.0.0, v6.0.0rc1, v6.1.0, v5.8.3, v5.8.2, v5.8.1 |
|
#
fc36a10b |
| 03-Mar-2020 |
Matthew Dillon <dillon@apollo.backplane.com> |
kernel - Normalize the vx_*() vnode interface
* The vx_*() vnode interface is used for initial allocations, reclaims, and terminations.
Normalize all use cases to prevent the mixing together of
kernel - Normalize the vx_*() vnode interface
* The vx_*() vnode interface is used for initial allocations, reclaims, and terminations.
Normalize all use cases to prevent the mixing together of the vx_*() API and the vn_*() API. For example, vx_lock() should not be paired with vn_unlock(), and so forth.
* Integrate an update-counter mechanism into the vx_*() API, assert reasonability.
* Change vfs_cache.c to use an int update counter instead of a long. The vfs_cache code can't quite use the spin-lock update counter API yet.
Use proper atomics for load and store.
* Implement VOP_GETATTR_QUICK, meant to be a 'quick' version of VOP_GETATTR() that only retrieves information related to permissions and ownership. This will be fast-pathed in a later commit.
* Implement vx_downgrade() to convert an exclusive vx_lock into an exclusive vn_lock (for vnodes). Adjust all use cases in the getnewvnode() path.
* Remove unnecessary locks in tmpfs_getattr() and don't use any in tmpfs_getattr_quick().
* Remove unnecessary locks in hammer2_vop_getattr() and don't use any in hammer2_vop_getattr_quick()
show more ...
|
Revision tags: v5.8.0, v5.9.0, v5.8.0rc1, v5.6.3 |
|
#
8b411d28 |
| 12-Nov-2019 |
Matthew Dillon <dillon@apollo.backplane.com> |
kernel - Fix first-lwp access race vs process creation
* It is possible for a process to be looked up before its primary lwp is installed. Make sure this doesn't crash the kernel.
|
#
13dd34d8 |
| 18-Oct-2019 |
zrj <rimvydas.jasinskas@gmail.com> |
kernel: Cleanup <sys/uio.h> issues.
The iovec_free() inline very complicates this header inclusion. The NULL check is not always seen from <sys/_null.h>. Luckily only three kernel sources needs
kernel: Cleanup <sys/uio.h> issues.
The iovec_free() inline very complicates this header inclusion. The NULL check is not always seen from <sys/_null.h>. Luckily only three kernel sources needs it: kern_subr.c, sys_generic.c and uipc_syscalls.c. Also just a single dev/drm source makes use of 'struct uio'. * Include <sys/uio.h> explicitly first in drm_fops.c to avoid kfree() macro override in drm compat layer. * Use <sys/_uio.h> where only enums and struct uio is needed, but ensure that userland will not include it for possible later <sys/user.h> use. * Stop using <sys/vnode.h> as shortcut for uiomove*() prototypes. The uiomove*() family functions possibly transfer data across kernel/user space boundary. This header presence explicitly mark sources as such. * Prefer to add <sys/uio.h> after <sys/systm.h>, but before <sys/proc.h> and definitely before <sys/malloc.h> (except for 3 mentioned sources). This will allow to remove <sys/malloc.h> from <sys/uio.h> later on. * Adjust <sys/user.h> to use component headers instead of <sys/uio.h>.
While there, use opportunity for a minimal whitespace cleanup.
No functional differences observed in compiler intermediates.
show more ...
|
Revision tags: v5.6.2, v5.6.1, v5.6.0, v5.6.0rc1, v5.7.0, v5.4.3, v5.4.2 |
|
#
fcf6efef |
| 02-Mar-2019 |
Sascha Wildner <saw@online.de> |
kernel: Remove numerous #include <sys/thread2.h>.
Most of them were added when we converted spl*() calls to crit_enter()/crit_exit(), almost 14 years ago. We can now remove a good chunk of them agai
kernel: Remove numerous #include <sys/thread2.h>.
Most of them were added when we converted spl*() calls to crit_enter()/crit_exit(), almost 14 years ago. We can now remove a good chunk of them again for where crit_*() are no longer used.
I had to adjust some files that were relying on thread2.h or headers that it includes coming in via other headers that it was removed from.
show more ...
|
Revision tags: v5.4.1, v5.4.0, v5.5.0, v5.4.0rc1 |
|
#
f2119717 |
| 13-Nov-2018 |
Matthew Dillon <dillon@apollo.backplane.com> |
kernel - Fix SMP race in procfs
* procfs was not locking its pid hash table. Implement a per-slot spinlock. The hash is populated only for pid directories that are pushed into (e.g. ls /proc/<
kernel - Fix SMP race in procfs
* procfs was not locking its pid hash table. Implement a per-slot spinlock. The hash is populated only for pid directories that are pushed into (e.g. ls /proc/<pid> vs ls /proc).
* Fixes a fairly rare crash that can only occur when procfs is used heavily.
show more ...
|
Revision tags: v5.2.2, v5.2.1, v5.2.0, v5.3.0, v5.2.0rc, v5.0.2, v5.0.1, v5.0.0, v5.0.0rc2, v5.1.0, v5.0.0rc1 |
|
#
dd8b310b |
| 05-Aug-2017 |
Matthew Dillon <dillon@apollo.backplane.com> |
procfs - Fix blocked lock condition
* Two procfs races can result in a lock being blocked forever. Rip out the old single-variable global procfs lock and per-node lock and replace with a normal
procfs - Fix blocked lock condition
* Two procfs races can result in a lock being blocked forever. Rip out the old single-variable global procfs lock and per-node lock and replace with a normal lockmgr lock.
* The original lock existed from a time when all of procfs was wrapped with a global lock. This is no longer the case.
show more ...
|
Revision tags: v4.8.1, v4.8.0, v4.6.2, v4.9.0, v4.8.0rc, v4.6.1, v4.6.0, v4.6.0rc2, v4.6.0rc, v4.7.0, v4.4.3, v4.4.2, v4.4.1, v4.4.0, v4.5.0, v4.4.0rc, v4.2.4, v4.3.1, v4.2.3, v4.2.1, v4.2.0, v4.0.6, v4.3.0, v4.2.0rc, v4.0.5, v4.0.4, v4.0.3, v4.0.2, v4.0.1, v4.0.0, v4.0.0rc3, v4.0.0rc2, v4.0.0rc, v4.1.0, v3.8.2, v3.8.1, v3.6.3, v3.8.0, v3.8.0rc2, v3.9.0, v3.8.0rc, v3.6.2, v3.6.1, v3.6.0, v3.7.1, v3.6.0rc |
|
#
a8d3ab53 |
| 25-Oct-2013 |
Matthew Dillon <dillon@apollo.backplane.com> |
kernel - proc_token removal pass stage 1/2
* Remove proc_token use from all subsystems except kern/kern_proc.c.
* The token had become mostly useless in these subsystems now that process locking
kernel - proc_token removal pass stage 1/2
* Remove proc_token use from all subsystems except kern/kern_proc.c.
* The token had become mostly useless in these subsystems now that process locking is more fine-grained. Do the final wipe of proc_token except for allproc/zombproc list use in kern_proc.c
show more ...
|
#
ee173d09 |
| 20-Oct-2013 |
Sascha Wildner <saw@online.de> |
kernel - Rewrite vnode ref-counting code to improve performance
* Rewrite the vnode ref-counting code and modify operation to not immediately VOP_INACTIVE a vnode when its refs drops to 0. By d
kernel - Rewrite vnode ref-counting code to improve performance
* Rewrite the vnode ref-counting code and modify operation to not immediately VOP_INACTIVE a vnode when its refs drops to 0. By doing so we avoid cycling vnodes through exclusive locks when temporarily accessing them (such as in a path lookup). Shared locks can be used throughout.
* Track active/inactive vnodes a bit differently, keep track of the number of vnodes that are still active but have zero refs, and rewrite the vnode freeing code to use the new statistics to deactivate cached vnodes.
show more ...
|
Revision tags: v3.4.3 |
|
#
dc71b7ab |
| 31-May-2013 |
Justin C. Sherrill <justin@shiningsilence.com> |
Correct BSD License clause numbering from 1-2-4 to 1-2-3.
Apparently everyone's doing it: http://svnweb.freebsd.org/base?view=revision&revision=251069
Submitted-by: "Eitan Adler" <lists at eitanadl
Correct BSD License clause numbering from 1-2-4 to 1-2-3.
Apparently everyone's doing it: http://svnweb.freebsd.org/base?view=revision&revision=251069
Submitted-by: "Eitan Adler" <lists at eitanadler.com>
show more ...
|
Revision tags: v3.4.2 |
|
#
2702099d |
| 06-May-2013 |
Justin C. Sherrill <justin@shiningsilence.com> |
Remove advertising clause from all that isn't contrib or userland bin.
By: Eitan Adler <lists@eitanadler.com>
|
Revision tags: v3.4.1, v3.4.0, v3.4.0rc, v3.5.0, v3.2.2, v3.2.1, v3.2.0, v3.3.0 |
|
#
300510f6 |
| 22-Aug-2012 |
Matthew Dillon <dillon@apollo.backplane.com> |
Merge branches 'hammer2' and 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly into hammer2
|
Revision tags: v3.0.3 |
|
#
f6233bcb |
| 21-Aug-2012 |
Sascha Wildner <saw@online.de> |
kernel/procfs: Remove some unneeded parentheses.
|
#
f73cc862 |
| 16-Aug-2012 |
Matthew Dillon <dillon@apollo.backplane.com> |
Merge branches 'hammer2' and 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly into hammer2
|
#
b2a6ad87 |
| 16-Aug-2012 |
Matthew Dillon <dillon@apollo.backplane.com> |
Kernel - Fix numerous procfs/ptrace issues
* Fix interactions during exec and exit. This should fix truss (bug 2313).
* Reset p_* fields related to tracing on last procfs close for the process.
|
Revision tags: v3.0.2, v3.0.1, v3.1.0, v3.0.0 |
|
#
884717e1 |
| 06-Dec-2011 |
Sascha Wildner <saw@online.de> |
kernel: Replace all usage of MALLOC()/FREE() with kmalloc()/kfree().
|
#
86d7f5d3 |
| 26-Nov-2011 |
John Marino <draco@marino.st> |
Initial import of binutils 2.22 on the new vendor branch
Future versions of binutils will also reside on this branch rather than continuing to create new binutils branches for each new version.
|
#
3231e2bf |
| 17-Nov-2011 |
Venkatesh Srinivas <me@endeavour.zapto.org> |
Merge branch 'master' of /repository/git/dragonfly
|
#
ccd6bbb9 |
| 16-Nov-2011 |
Matthew Dillon <dillon@apollo.backplane.com> |
kernel - Try to fix procfs readdir race
* procfs_allocvp() may have a pfs/vnode race which the vget() may not completely address. For now make sure we can't race a vnode teardown when attemptin
kernel - Try to fix procfs readdir race
* procfs_allocvp() may have a pfs/vnode race which the vget() may not completely address. For now make sure we can't race a vnode teardown when attempting to acquire a vnode with vget().
show more ...
|
#
8db21154 |
| 16-Nov-2011 |
Matthew Dillon <dillon@apollo.backplane.com> |
kernel - Attempt to make procfs MPSAFE (3)
* More fixes to silly bugs. Well, I did say 'attempt' :-)
|
#
5ed1af41 |
| 16-Nov-2011 |
Matthew Dillon <dillon@apollo.backplane.com> |
kernel - Attempt to make procfs MPSAFE (2)
* Disallow access to processes which are trying to exit.
|
#
f44c73be |
| 16-Nov-2011 |
Matthew Dillon <dillon@apollo.backplane.com> |
kernel - Attempt to make procfs MPSAFE
* pfs_pfind() now acquires the p->p_token in addition to its PHOLD().
* Replace PRELE()'s with pfs_pdone() which releases the token along with PRELE()
* Do
kernel - Attempt to make procfs MPSAFE
* pfs_pfind() now acquires the p->p_token in addition to its PHOLD().
* Replace PRELE()'s with pfs_pdone() which releases the token along with PRELE()
* Double-check the validity of nch's passed to cache_fullpath(). This probably still needs work.
Reported-by: swildner
show more ...
|
Revision tags: v2.12.0, v2.13.0, v2.10.1, v2.11.0, v2.10.0, v2.9.1, v2.8.2, v2.8.1, v2.8.0, v2.9.0, v2.6.3, v2.7.3, v2.6.2, v2.7.2, v2.7.1, v2.6.1, v2.7.0, v2.6.0, v2.5.1, v2.4.1, v2.5.0, v2.4.0, v2.3.2, v2.3.1, v2.2.1, v2.2.0, v2.3.0, v2.1.1, v2.0.1 |
|
#
9d044741 |
| 25-Aug-2007 |
Simon Schubert <corecode@dragonflybsd.org> |
Fix a bug in linprocfs and hold lwps to prevent a race condition.
Linprocfs rolls its own prototype for procfs_domem. The function was changed to take a struct lwp *, but neither the private protot
Fix a bug in linprocfs and hold lwps to prevent a race condition.
Linprocfs rolls its own prototype for procfs_domem. The function was changed to take a struct lwp *, but neither the private prototype, nor the procfs_domem call were changed accordingly. As a result any access to the linprocfs process memory file resulted in a panic.
Procfs and linprocs perform potentially blocking calls, so HOLD and RELE the lwps so that they can't be destroyed while procfs is blocked.
show more ...
|
#
3c37c940 |
| 06-May-2007 |
Matthew Dillon <dillon@dragonflybsd.org> |
Use SYSREF to reference count struct vnode. v_usecount is now v_sysref(.refcnt). v_holdcnt is now v_auxrefs. SYSREF's termination state (using a negative reference count from -0x40000000+) now pla
Use SYSREF to reference count struct vnode. v_usecount is now v_sysref(.refcnt). v_holdcnt is now v_auxrefs. SYSREF's termination state (using a negative reference count from -0x40000000+) now places the vnode in a VCACHED or VFREE state and deactivates it. The vnode is now assigned a 64 bit unique id via SYSREF.
vhold() (which manipulates v_auxrefs) no longer reactivates a vnode and is explicitly used only to track references from auxillary structures and references to prevent premature destruction of the vnode. vdrop() will now only move a vnode from VCACHED to VFREE on the 1->0 transition of v_auxrefs if the vnode is in a termination state.
vref() will now panic if used on a vnode in a termination state. vget() must now be used to explicitly reactivate a vnode. These requirements existed before but are now explicitly asserted.
vlrureclaim() and allocvnode() should now interact a bit better. In particular, vlrureclaim() will do a better job of finding vnodes to flush and transition from VCACHED to VFREE, and allocvnode() will do a better job finding vnodes to reuse without getting blocked by a flush.
allocvnode now uses a real VX lock to sequence vnodes into VRECLAIMED. All vnode special state processing now uses a VX lock.
Vnodes are now able to be slowly returned to the memory pool when kern.maxvnodes is reduced at run time.
Various initialization elements have been moved to CTOR/DTOR and are no longer in the critical path, improving performance. However, since SYSREF uses atomic_cmpset_int() (aka cmpxchgl), which reduces performance somewhat, overall performance tends to be about the same.
show more ...
|