Revision tags: v6.2.1, v6.2.0, v6.3.0, v6.0.1, v6.0.0, v6.0.0rc1, v6.1.0, v5.8.3, v5.8.2, v5.8.1, v5.8.0 |
|
#
ee09cc60 |
| 26-Feb-2020 |
Matthew Dillon <dillon@apollo.backplane.com> |
kernel - Rearrange uidinfo structure a bit
* Rearrange the structure to move ui_lock and ui_refs into a cache-line isolated area of the structure.
|
Revision tags: v5.9.0, v5.8.0rc1, v5.6.3, v5.6.2, v5.6.1, v5.6.0, v5.6.0rc1, v5.7.0, v5.4.3, v5.4.2, v5.4.1, v5.4.0, v5.5.0, v5.4.0rc1, v5.2.2, v5.2.1 |
|
#
d6299163 |
| 22-Apr-2018 |
Matthew Dillon <dillon@apollo.backplane.com> |
kernel - Remove SMP bottlenecks on uidinfo, descriptors, and lockf
* Use an eventcounter and the per-thread fd cache to fix bottlenecks in checkfdclosed(). This will work well for the vast majo
kernel - Remove SMP bottlenecks on uidinfo, descriptors, and lockf
* Use an eventcounter and the per-thread fd cache to fix bottlenecks in checkfdclosed(). This will work well for the vast majority of applications and test benches.
* Batch holdfp*() operations on kqueue collections when implementing poll() and select(). This significant improves performance. Full scaling not yet achieved, however.
* Increase copyin item batching from 8 to 32 for select() and poll().
* Give the uidinfo structure a pcpu array to hold the posixlocks and openfiles count fields, with a rollup contained in the uidinfo structure itself.
This removes numerous global bottlenecks related to open(), close(), dup*(), and lockf operations (posixlocks count).
ui_openfiles will force a rollup on limit reached to be sure that the limit was actually reached. ui_posixlocks stays fairly loose. Each cpu rolls up generally only when the pcpu count exceeds +32 or goes below -32.
* Give the proc structure a pcpu array for the same counts, in order to properly support seteuid() and such.
* Replace P_ADVLOCK with a char field proc->p_advlock_flag, and remove token operations around the field.
show more ...
|
#
384ee8f0 |
| 20-Apr-2018 |
Matthew Dillon <dillon@apollo.backplane.com> |
kernel - Implement td_limit reflection of p_limit
* Reflect proc->p_limit onto thread->td_limit to allow lockless rlimits testing.
* Significantly improves performance for rlimits-testing-centric
kernel - Implement td_limit reflection of p_limit
* Reflect proc->p_limit onto thread->td_limit to allow lockless rlimits testing.
* Significantly improves performance for rlimits-testing-centric operations such as for dup() and dup2().
* Also fixes performance issues across processes when the plimit structure is shared across many processes. In this situation, unnecessary locking conflicts developed due to the high level of sharing across what would normally be considered distinct processes.
Suggested-by: mjg
show more ...
|
Revision tags: v5.2.0, v5.3.0, v5.2.0rc, v5.0.2, v5.0.1 |
|
#
b3c6f0e5 |
| 02-Nov-2017 |
Matthew Dillon <dillon@apollo.backplane.com> |
kernel - Improve uidinfo
* Improve uifind() to check td_cred for likely uid's, avoiding all locking on hits.
* Create proc0 cred's cr_uidinfo and cr_ruidinfo using uicreate(). All creds should
kernel - Improve uidinfo
* Improve uifind() to check td_cred for likely uid's, avoiding all locking on hits.
* Create proc0 cred's cr_uidinfo and cr_ruidinfo using uicreate(). All creds should now never have a NULL cr_uidinfo or cr_ruidinfo, so also remove conditionals that test for NULL.
Suggested-by: __mjg
show more ...
|
#
327aab1f |
| 16-Oct-2017 |
Matthew Dillon <dillon@apollo.backplane.com> |
kernel - Clean up ucred and plimit cache line locality
* Move struct plimit's p_spin and p_refcnt fields into their own cacheline. This structure is massively shared and read often. Doing this
kernel - Clean up ucred and plimit cache line locality
* Move struct plimit's p_spin and p_refcnt fields into their own cacheline. This structure is massively shared and read often. Doing this avoids unnecessary cache line ping-pongs.
* Only use p_spin to modify a resource limit. Do not use it to access the resource limit.
* Integrate plimit's exclusivity flag into p_refcnt.
* Move struct ucred's cr_ref into its own cacheline. This structure is massively shared and read often. Doing this avoids unnecessary cache line ping-pongs.
show more ...
|
#
233a815d |
| 15-Oct-2017 |
Matthew Dillon <dillon@apollo.backplane.com> |
kernel - Optimize struct uidinfo
* Refactor struct uidinfo. Use atomic ops for ui_posixlocks and ui_proccnt. They were already being used for ui_openfiles and ui_ref.
* Refactor ui_ref a bit
kernel - Optimize struct uidinfo
* Refactor struct uidinfo. Use atomic ops for ui_posixlocks and ui_proccnt. They were already being used for ui_openfiles and ui_ref.
* Refactor ui_ref a bit to improve the drop code. Use a cute trick for the transition. When we transition to 0 we allow ui_ref to actually go to 0, and then do an independent lookup of the uid with the hash table spinlock to conditionally free it if it remains 0.
This allows us to completely avoid using atomic_cmpset_int(), which can be seriously inefficient due to races in SMP environments.
Suggested-by: mjg__
show more ...
|
Revision tags: v5.0.0, v5.0.0rc2, v5.1.0, v5.0.0rc1, v4.8.1 |
|
#
e7e1189f |
| 05-Jul-2017 |
Matthew Dillon <dillon@apollo.backplane.com> |
kernel - Automatically downscasle NPROC resource limit
* Downscale the NPROC resource limit based on fork and chroot depth, up to 50%, and also make the limit apply to root processes. This is int
kernel - Automatically downscasle NPROC resource limit
* Downscale the NPROC resource limit based on fork and chroot depth, up to 50%, and also make the limit apply to root processes. This is intended to be a poor-man's safety, preventing run-away (root or other) process creation from completely imploding a system.
* Each level of fork() downscales the NPROC resource limit by 1/3%, capped at 32 levels (~10%)
* Each chroot (including that made by a jail) downscales the NPROC resource limit by 10%, up to 40%.
show more ...
|
Revision tags: 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 |
|
#
2c64e990 |
| 25-Jan-2016 |
zrj <rimvydas.jasinskas@gmail.com> |
Remove advertising header from sys/
Correct BSD License clause numbering from 1-2-4 to 1-2-3.
Some less clear cases taken as it was done of FreeBSD.
|
Revision tags: 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, v3.7.0, v3.4.3, v3.4.2, v3.4.0, v3.4.1, v3.4.0rc, v3.5.0, v3.2.2, v3.2.1, v3.2.0, v3.3.0, v3.0.3, v3.0.2, v3.0.1, v3.1.0, v3.0.0 |
|
#
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.
|
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 |
|
#
9d7a637e |
| 08-Jun-2009 |
Aggelos Economopoulos <aoiko@cc.ece.ntua.gr> |
lock around accesses to uidinfo and varsymset
- add ->vx_lock to protect the varsymset fields - add ->ui_lock to protect the rest of the fields in uidinfo - protect the uidinfo hash - the varsym*()
lock around accesses to uidinfo and varsymset
- add ->vx_lock to protect the varsymset fields - add ->ui_lock to protect the rest of the fields in uidinfo - protect the uidinfo hash - the varsym*() syscalls are now mpsafe
This is obviously performance-irrelevant, but it allows access to uidinfo without the BGL.
show more ...
|
Revision tags: v2.3.1, v2.2.1, v2.2.0, v2.3.0, v2.1.1, v2.0.1 |
|
#
8f1f6170 |
| 08-May-2008 |
Matthew Dillon <dillon@dragonflybsd.org> |
Recode the resource limit core (struct plimit) to fix a few races and generally make it work better. Also make changes with an eye towards making it MPSAFE.
|
#
9b662cfd |
| 06-Jan-2007 |
Matthew Dillon <dillon@dragonflybsd.org> |
Remove fuswintr() and suswintr(), they were never implemented and it was a bad idea to try to write to a userspace context from an interrupt anyway.
|
#
fde7ac71 |
| 01-Jan-2007 |
Simon Schubert <corecode@dragonflybsd.org> |
1:1 Userland threading stage 2.10/4:
Separate p_stats into p_ru and lwp_ru.
proc.p_ru keeps track of all statistics directly related to a proc. This consists of RSS usage and nswap information and
1:1 Userland threading stage 2.10/4:
Separate p_stats into p_ru and lwp_ru.
proc.p_ru keeps track of all statistics directly related to a proc. This consists of RSS usage and nswap information and aggregate numbers for all former lwps of this proc.
proc.p_cru is the sum of all stats of reaped children.
lwp.lwp_ru contains the stats directly related to one specific lwp, meaning packet, scheduler switch or page fault counts, etc. This information gets added to lwp.lwp_proc.p_ru when the lwp exits.
show more ...
|
#
c0b8a06d |
| 23-May-2006 |
Matthew Dillon <dillon@dragonflybsd.org> |
Move all the resource limit handling code into a new file, kern/kern_plimit.c. Add spinlocks for access, and mark getrlimit and setrlimit as being MPSAFE.
Document how LWPs will have to be handled -
Move all the resource limit handling code into a new file, kern/kern_plimit.c. Add spinlocks for access, and mark getrlimit and setrlimit as being MPSAFE.
Document how LWPs will have to be handled - basically we will have to unshare the resource structure once we start allowing multiple LWPs per process, but we can otherwise leave it in the proc structure.
show more ...
|
#
1bd40720 |
| 20-May-2006 |
Matthew Dillon <dillon@dragonflybsd.org> |
I'm growing tired of having to add #include lines for header files that the include file(s) I really want depend on.
Go through nearly all major system include files and add appropriately #ifndef'd
I'm growing tired of having to add #include lines for header files that the include file(s) I really want depend on.
Go through nearly all major system include files and add appropriately #ifndef'd #include lines to include all dependant header files. Kernel source files now only need to #include the header files they directly depend on.
So, for example, if I wanted to add a SYSCTL to a kernel source file, I would only have to #include <sys/sysctl.h> to bring in the support for it, rather then four or five header files in addition to <sys/sysctl.h>.
show more ...
|
#
93328593 |
| 08-Oct-2005 |
Simon Schubert <corecode@dragonflybsd.org> |
1:1 Userland threading stage 2.2/4:
Move profiling and intervall timer data to struct proc.
|
#
41f3429e |
| 20-Jun-2004 |
Hiten Pandya <hmp@dragonflybsd.org> |
Move the 'p_start' field from struct pstats (Process Statistics) into the thread structure and call it 'td_start'. The behavior of vm_fork(9) is retained, i.e., it still copies the start time from t
Move the 'p_start' field from struct pstats (Process Statistics) into the thread structure and call it 'td_start'. The behavior of vm_fork(9) is retained, i.e., it still copies the start time from the parent process just as it did before.
The 'td_start' will later be used by pure threads to indicate their start time. It has not been committed in this round because use of the microtime() function at such a early point in the boot process might be unsafe.
Note, there should be no problem in accessing the td_start field, unless the process is a Zombie; due to the way Zombies are reaped, the thread will be decoupled in kern_wait1() but the process will still be around for a while it will not be possible to access the td_start field in such scenarios. A little note about this has been added on top of struct proc in <sys/proc.h> for future reference.
This work was a collaboration of Hiten Pandya <hmp@backplane.com> and Matthew Dillon <dillon@apollo.backplane.com>
show more ...
|
#
236481aa |
| 20-Jun-2004 |
Hiten Pandya <hmp@dragonflybsd.org> |
Zero-out the whole pstats structure and then copy the relevant fields, instead of messing with caddr_t's and range-based zero'ing.
Discussed-with: Matthew Dillon <dillon@backplane.com>
|
#
d96aa8eb |
| 20-Jun-2004 |
Hiten Pandya <hmp@dragonflybsd.org> |
Zero the interval timers on fork(2) rather than copying them to the child process (SUSv3 compliance).
Discussed-with: Matthew Dillon <dillon@backplane.com>
|
#
508ceb09 |
| 03-May-2004 |
Joerg Sonnenberger <joerg@dragonflybsd.org> |
POSIX lock resource limit part 3/4
This splits "struct lockf" into the general book-keeping of ranges and blocked request and the "struct lockf_range" which constists of the data for a specific rang
POSIX lock resource limit part 3/4
This splits "struct lockf" into the general book-keeping of ranges and blocked request and the "struct lockf_range" which constists of the data for a specific range. Adjust the interface of lf_advlock to remove one level of pointer indirection and embedded "struct lockf" directly in the inodes. Don't mess with wait channels any more.
Change the algorithm for determing locks to a more direct approach, which both simplifies the lock acquisition and proper book-keeping of the number of ranges currently used. The later is necessary to prevent local resource exhaustion.
The code is not fully malloc block-safe, but as good or bad as the old code.
Add the kernel part of the posixlocks rlimit. This is the maximum number of POSIX lock ranges any user can acquire. These numbers are tracked for each user and process and checked at lock/unlock time. If a process changes uid, its locks are transfered to the new uid which can effectivly boost that number above the limit.
This is based on the patch set from Devon H. O'Dell <dodell@sitetronics.com> for the general infrastructure with some adjustment to better integrate with the new lockf code.
show more ...
|
#
98a7f915 |
| 05-Nov-2003 |
Matthew Dillon <dillon@dragonflybsd.org> |
Variant symlink support stage 1/2: Implement support for storing and retrieving system-specific, user-specific, and process-specific variables.
|
#
792033e7 |
| 05-Nov-2003 |
Matthew Dillon <dillon@dragonflybsd.org> |
Cleanup the ui*() API in preparation for the addition of variant-symlink support.
|
#
3fc96675 |
| 05-Nov-2003 |
Matthew Dillon <dillon@dragonflybsd.org> |
Change ui_ref from an unsigned short to an integer. A 16 bit ref count is insufficient.
|
#
b153f746 |
| 20-Aug-2003 |
Robert Garrett <rob@dragonflybsd.org> |
__P() != wanted, begin removal, in order to preserve white space this needs to be done by hand, as I accidently killed a source tree that I had gotten this far on. I'm committing this now, LINT and G
__P() != wanted, begin removal, in order to preserve white space this needs to be done by hand, as I accidently killed a source tree that I had gotten this far on. I'm committing this now, LINT and GENERIC both build with these changes, there are many more to come.
show more ...
|
#
1de703da |
| 17-Jun-2003 |
Matthew Dillon <dillon@dragonflybsd.org> |
Add the DragonFly cvs id and perform general cleanups on cvs/rcs/sccs ids. Most ids have been removed from !lint sections and moved into comment sections.
|