Revision tags: release/9.0.0 |
|
#
fab4c373 |
| 16-Sep-2011 |
Peter Grehan <grehan@FreeBSD.org> |
IFC @ r225592
sys/dev/bvm/bvm_console.c - move up to the new alt-break order.
|
#
4ff9eb89 |
| 01-Sep-2011 |
Alexander Motin <mav@FreeBSD.org> |
Integrate from head at r225316.
|
#
cfb5f768 |
| 19-Aug-2011 |
Jonathan Anderson <jonathan@FreeBSD.org> |
Add experimental support for process descriptors
A "process descriptor" file descriptor is used to manage processes without using the PID namespace. This is required for Capsicum's Capability Mode,
Add experimental support for process descriptors
A "process descriptor" file descriptor is used to manage processes without using the PID namespace. This is required for Capsicum's Capability Mode, where the PID namespace is unavailable.
New system calls pdfork(2) and pdkill(2) offer the functional equivalents of fork(2) and kill(2). pdgetpid(2) allows querying the PID of the remote process for debugging purposes. The currently-unimplemented pdwait(2) will, in the future, allow querying rusage/exit status. In the interim, poll(2) may be used to check (and wait for) process termination.
When a process is referenced by a process descriptor, it does not issue SIGCHLD to the parent, making it suitable for use in libraries---a common scenario when using library compartmentalisation from within large applications (such as web browsers). Some observers may note a similarity to Mach task ports; process descriptors provide a subset of this behaviour, but in a UNIX style.
This feature is enabled by "options PROCDESC", but as with several other Capsicum kernel features, is not enabled by default in GENERIC 9.0.
Reviewed by: jhb, kib Approved by: re (kib), mentor (rwatson) Sponsored by: Google Inc
show more ...
|
#
9b4fcf85 |
| 18-Feb-2011 |
Marcel Moolenaar <marcel@FreeBSD.org> |
Merge svn+ssh://svn.freebsd.org/base/head@218816
|
Revision tags: release/7.4.0_cvs, release/8.2.0_cvs, release/7.4.0, release/8.2.0 |
|
#
fd058078 |
| 06-Jan-2011 |
John Baldwin <jhb@FreeBSD.org> |
- Properly initialize the base priority (td_base_pri) of thread0 to PVM to match the desired priority in td_priority. Otherwise the first time thread0 used a borrowed priority it would drop down
- Properly initialize the base priority (td_base_pri) of thread0 to PVM to match the desired priority in td_priority. Otherwise the first time thread0 used a borrowed priority it would drop down to PUSER instead of PVM. - Explicitly initialize the starting priority of new kprocs to PVM to avoid inheriting some random priority from thread0.
MFC after: 2 weeks
show more ...
|
#
a5a07ded |
| 04-Jan-2011 |
John Baldwin <jhb@FreeBSD.org> |
kproc_exit() is already marked __dead2 so a NOTREACHED comment here isn't needed for lint.
Submitted by: bde
|
#
547ffb85 |
| 03-Jan-2011 |
John Baldwin <jhb@FreeBSD.org> |
Small whitespace nits and add a comment explaining why kthread_exit() can call kproc_exit() that was lost earlier.
|
#
6f3544cd |
| 26-Oct-2010 |
Marcel Moolenaar <marcel@FreeBSD.org> |
Merge svn+ssh://svn.freebsd.org/base/head@214309
|
#
51297f7d |
| 25-Oct-2010 |
Dimitry Andric <dim@FreeBSD.org> |
Sync: merge r214221 through r214352 from ^/head.
|
#
0d036d55 |
| 23-Oct-2010 |
David Xu <davidxu@FreeBSD.org> |
In thr_exit() and kthread_exit(), only remove thread from hash if it can directly exit, otherwise let exit1() do it. The change should be in r213950, but for unknown reason, it was lost.
|
#
cf7d9a8c |
| 09-Oct-2010 |
David Xu <davidxu@FreeBSD.org> |
Create a global thread hash table to speed up thread lookup, use rwlock to protect the table. In old code, thread lookup is done with process lock held, to find a thread, kernel has to iterate throug
Create a global thread hash table to speed up thread lookup, use rwlock to protect the table. In old code, thread lookup is done with process lock held, to find a thread, kernel has to iterate through process and thread list, this is quite inefficient. With this change, test shows in extreme case performance is dramatically improved.
Earlier patch was reviewed by: jhb, julian
show more ...
|
Revision tags: release/8.1.0_cvs, release/8.1.0 |
|
#
7708106a |
| 26-May-2010 |
Marcel Moolenaar <marcel@FreeBSD.org> |
Merge svn+ssh://svn.freebsd.org/base/head@208557
|
#
07969f1d |
| 21-May-2010 |
John Baldwin <jhb@FreeBSD.org> |
Allow a const char * to be passed as the process name to kproc_kthread_add() without generating a warning.
MFC after: 1 month
|
#
c193de56 |
| 11-May-2010 |
Konstantin Belousov <kib@FreeBSD.org> |
MFC r207468: Extract thread_lock()/ruxagg()/thread_unlock() fragment into utility function ruxagg_tlock(). Convert the definition of kern_getrusage() to ANSI C.
MFC r207602: Implement RUSAGE_THREAD.
MFC r207468: Extract thread_lock()/ruxagg()/thread_unlock() fragment into utility function ruxagg_tlock(). Convert the definition of kern_getrusage() to ANSI C.
MFC r207602: Implement RUSAGE_THREAD. Add td_rux to keep extended runtime and ticks information for thread to allow calcru1() (re)use.
Rename ruxagg()->ruxagg_locked(), ruxagg_tlock()->ruxagg() [1]. The ruxagg_locked() function no longer clears thread ticks nor td_incruntime.
Not an MFC: the td_rux is added to the end of struct thread to keep the KBI. Explicit bzero() of td_rux is added to new thread initialization points.
show more ...
|
Revision tags: release/7.3.0_cvs, release/7.3.0 |
|
#
1a0fda2b |
| 04-Mar-2010 |
Dag-Erling Smørgrav <des@FreeBSD.org> |
IFH@204581
|
#
fb7c88e6 |
| 19-Feb-2010 |
Attilio Rao <attilio@FreeBSD.org> |
Use the cached value within comparison.
Submitted by: jhb
|
#
3aadd65d |
| 19-Feb-2010 |
Attilio Rao <attilio@FreeBSD.org> |
Fix the grammar.
Submitted by: Brandon Gooch <bgooch at se dot edu>
|
#
dd55eec7 |
| 19-Feb-2010 |
Attilio Rao <attilio@FreeBSD.org> |
Fix a race in regard of p_numthreads.
Submitted by: Giovanni Trematerra <giovanni dot trematerra at gmail dot com>
|
#
a50e80dc |
| 24-Jan-2010 |
Attilio Rao <attilio@FreeBSD.org> |
- Fix the kthread_{suspend, resume, suspend_check}() locking. In the current code, the locking is completely broken and may lead easilly to deadlocks. Fix it by using the proc_mtx, linked to the
- Fix the kthread_{suspend, resume, suspend_check}() locking. In the current code, the locking is completely broken and may lead easilly to deadlocks. Fix it by using the proc_mtx, linked to the suspending thread, as lock for the operation. Keep using the thread_lock for setting and reading the flag even if it is not entirely necessary (atomic ops may do it as well, but this way the code is more readable). - Fix a deadlock within kthread_suspend(). The suspender should not sleep on a different channel wrt the suspended thread, or, otherwise, the awaker should wakeup both. Uniform the interface to what the kproc_* counterparts do (sleeping on the same channel). - Change the kthread_suspend_check() prototype. kthread_suspend_check() always assumes curthread and must only refer to it, so skip the thread pointer as it may be easilly mistaken. If curthread is not a kthread, the system will panic.
In collabouration with: jhb Tested by: Giovanni Trematerra <giovanni dot trematerra at gmail dot com> MFC: 2 weeks
show more ...
|
Revision tags: release/8.0.0_cvs, release/8.0.0 |
|
#
10b3b545 |
| 17-Sep-2009 |
Dag-Erling Smørgrav <des@FreeBSD.org> |
Merge from head
|
#
cbd59a4f |
| 08-Sep-2009 |
Oleksandr Tymoshenko <gonzo@FreeBSD.org> |
- MFC from head@196987
|
#
2af00dec |
| 08-Sep-2009 |
Konstantin Belousov <kib@FreeBSD.org> |
MFC r196730: Remove the altkstacks, instead instantiate threads with kernel stack allocated with the right size from the start. For the thread that has kernel stack cached, verify that requested stac
MFC r196730: Remove the altkstacks, instead instantiate threads with kernel stack allocated with the right size from the start. For the thread that has kernel stack cached, verify that requested stack size is equial to the actual, and reallocate the stack if sizes differ.
Introduce separate kernel stack cache that keeps some limited amount of preallocated kernel stacks to lower the latency of thread allocation.
Not a merge: instead of removing td_altkstack* members of struct thread, replace them with placeholders to keep struct thread layout on the stable branch.
Also, record r196640, r196644 and r196648 as merged.
Approved by: re (kensmith)
show more ...
|
#
8a945d10 |
| 01-Sep-2009 |
Konstantin Belousov <kib@FreeBSD.org> |
Reintroduce the r196640, after fixing the problem with my testing.
Remove the altkstacks, instead instantiate threads with kernel stack allocated with the right size from the start. For the thread t
Reintroduce the r196640, after fixing the problem with my testing.
Remove the altkstacks, instead instantiate threads with kernel stack allocated with the right size from the start. For the thread that has kernel stack cached, verify that requested stack size is equial to the actual, and reallocate the stack if sizes differ [1].
This fixes the bug introduced by r173361 that was committed several days after r173004 and consisted of kthread_add(9) ignoring the non-default kernel stack size.
Also, r173361 removed the caching of the kernel stacks for a non-first thread in the process. Introduce separate kernel stack cache that keeps some limited amount of preallocated kernel stacks to lower the latency of thread allocation. Add vm_lowmem handler to prune the cache on low memory condition. This way, system with reasonable amount of the threads get lower latency of thread creation, while still not exhausting significant portion of KVA for unused kstacks.
Submitted by: peter [1] Discussed with: jhb, julian, peter Reviewed by: jhb Tested by: pho (and retested according to new test scenarious) MFC after: 1 week
show more ...
|
#
f25fa6ab |
| 29-Aug-2009 |
Konstantin Belousov <kib@FreeBSD.org> |
Reverse r196640 and r196644 for now.
|
#
c3cf0b47 |
| 29-Aug-2009 |
Konstantin Belousov <kib@FreeBSD.org> |
Remove the altkstacks, instead instantiate threads with kernel stack allocated with the right size from the start. For the thread that has kernel stack cached, verify that requested stack size is equ
Remove the altkstacks, instead instantiate threads with kernel stack allocated with the right size from the start. For the thread that has kernel stack cached, verify that requested stack size is equial to the actual, and reallocate the stack if sizes differ [1].
This fixes the bug introduced by r173361 that was committed several days after r173004 and consisted of kthread_add(9) ignoring the non-default kernel stack size.
Also, r173361 removed the caching of the kernel stacks for a non-first thread in the process. Introduce separate kernel stack cache that keeps some limited amount of preallocated kernel stacks to lower the latency of thread allocation. Add vm_lowmem handler to prune the cache on low memory condition. This way, system with reasonable amount of the threads get lower latency of thread creation, while still not exhausting significant portion of KVA for unused kstacks.
Submitted by: peter [1] Discussed with: jhb, julian, peter Reviewed by: jhb Tested by: pho MFC after: 1 week
show more ...
|