#
48bfcddd |
| 09-Oct-2002 |
Julian Elischer <julian@FreeBSD.org> |
Round out the facilty for a 'bound' thread to loan out its KSE in specific situations. The owner thread must be blocked, and the borrower can not proceed back to user space with the borrowed KSE. The
Round out the facilty for a 'bound' thread to loan out its KSE in specific situations. The owner thread must be blocked, and the borrower can not proceed back to user space with the borrowed KSE. The borrower will return the KSE on the next context switch where teh owner wants it back. This removes a lot of possible race conditions and deadlocks. It is consceivable that the borrower should inherit the priority of the owner too. that's another discussion and would be simple to do.
Also, as part of this, the "preallocatd spare thread" is attached to the thread doing a syscall rather than the KSE. This removes the need to lock the scheduler when we want to access it, as it's now "at hand".
DDB now shows a lot mor info for threaded proceses though it may need some optimisation to squeeze it all back into 80 chars again. (possible JKH project)
Upcalls are now "bound" threads, but "KSE Lending" now means that other completing syscalls can be completed using that KSE before the upcall finally makes it back to the UTS. (getting threads OUT OF THE KERNEL is one of the highest priorities in the KSE system.) The upcall when it happens will present all the completed syscalls to the KSE for selection.
show more ...
|
Revision tags: release/4.7.0_cvs |
|
#
551cf4e1 |
| 02-Oct-2002 |
John Baldwin <jhb@FreeBSD.org> |
Rename the mutex thread and process states to use a more generic 'LOCK' name instead. (e.g., SLOCK instead of SMTX, TD_ON_LOCK() instead of TD_ON_MUTEX()) Eventually a turnstile abstraction will be
Rename the mutex thread and process states to use a more generic 'LOCK' name instead. (e.g., SLOCK instead of SMTX, TD_ON_LOCK() instead of TD_ON_MUTEX()) Eventually a turnstile abstraction will be added that will be shared with mutexes and other types of locks. SLOCK/TDI_LOCK will be used internally by the turnstile code and will not be specific to mutexes. Making the change now ensures that turnstiles can be dropped in at a later date without affecting the ABI of userland applications.
show more ...
|
#
71fad9fd |
| 11-Sep-2002 |
Julian Elischer <julian@FreeBSD.org> |
Completely redo thread states.
Reviewed by: davidxu@freebsd.org
|
#
efdfb8fe |
| 31-Aug-2002 |
Bruce Evans <bde@FreeBSD.org> |
db_ps.c: Don't attempt to follow null pointers for zombie processes in db_ps().
Style fix: use explicit an comparison with NULL for all null pointer checks in db_ps() instead of for half of them.
d
db_ps.c: Don't attempt to follow null pointers for zombie processes in db_ps().
Style fix: use explicit an comparison with NULL for all null pointer checks in db_ps() instead of for half of them.
db_interface.c: Fixed ddb's handling of traps from with ddb on i386's only.
This was mostly fixed in rev.1.27 (by longjmp()'ing back to the top level) but was completly broken in rev.1.48 (by not unwinding the new state (mainly db_active) either before or after the longjmp(). This mostly never worked for other arches, since rev.1.27 has not been ported and lower level longjmp()'s only handle traps for memory accesses. All cases should be handled at a lower level to provided better control and simplify unwinding of state.
Implementation details: don't pretend to maintain db_active in a nested way -- ddb cannot be reentered in a nested way. Use db_active instead of the db_global_jmpbuf_valid flag and longjmp()'s return value for things related to reentering ddb. [re]entering is still not atomic enough.
show more ...
|
Revision tags: release/4.6.2_cvs, release/4.6.2 |
|
#
8ede8cbc |
| 13-Aug-2002 |
Poul-Henning Kamp <phk@FreeBSD.org> |
Realign columns in DDB's ps output. Don't waste more horizontal space than necessary.
|
Revision tags: release/4.6.1, release/4.6.0_cvs |
|
#
e602ba25 |
| 29-Jun-2002 |
Julian Elischer <julian@FreeBSD.org> |
Part 1 of KSE-III
The ability to schedule multiple threads per process (one one cpu) by making ALL system calls optionally asynchronous. to come: ia64 and power-pc patches, patches for gdb, test pro
Part 1 of KSE-III
The ability to schedule multiple threads per process (one one cpu) by making ALL system calls optionally asynchronous. to come: ia64 and power-pc patches, patches for gdb, test program (in tools)
Reviewed by: Almost everyone who counts (at various times, peter, jhb, matt, alfred, mini, bernd, and a cast of thousands)
NOTE: this is still Beta code, and contains lots of debugging stuff. expect slight instability in signals..
show more ...
|
#
5a882ddd |
| 11-Apr-2002 |
John Baldwin <jhb@FreeBSD.org> |
Commented out locking that would be used in the ps command if locks were used in ddb.
|
#
079b7bad |
| 07-Feb-2002 |
Julian Elischer <julian@FreeBSD.org> |
Pre-KSE/M3 commit. this is a low-functionality change that changes the kernel to access the main thread of a process via the linked list of threads rather than assuming that it is embedded in the pro
Pre-KSE/M3 commit. this is a low-functionality change that changes the kernel to access the main thread of a process via the linked list of threads rather than assuming that it is embedded in the process. It IS still embeded there but remove all teh code that assumes that in preparation for the next commit which will actually move it out.
Reviewed by: peter@freebsd.org, gallatin@cs.duke.edu, benno rice,
show more ...
|
Revision tags: release/4.5.0_cvs, release/4.4.0_cvs |
|
#
c516499a |
| 20-Oct-2001 |
John Baldwin <jhb@FreeBSD.org> |
Make the flag field in the ps output one char wider to account for recent growth in the number of flags used. Also, if a thread is blocked on a mutex, print the mutex name in the wait channel column.
|
#
14b418e7 |
| 13-Sep-2001 |
John Baldwin <jhb@FreeBSD.org> |
- Whitespace fixes. - Fix an old bug: p_comm is an array not a pointer, so it can't be NULL.`
|
#
b40ce416 |
| 12-Sep-2001 |
Julian Elischer <julian@FreeBSD.org> |
KSE Milestone 2 Note ALL MODULES MUST BE RECOMPILED make the kernel aware that there are smaller units of scheduling than the process. (but only allow one thread per process at this time). This is fu
KSE Milestone 2 Note ALL MODULES MUST BE RECOMPILED make the kernel aware that there are smaller units of scheduling than the process. (but only allow one thread per process at this time). This is functionally equivalent to teh previousl -current except that there is a thread associated with each process.
Sorry john! (your next MFC will be a doosie!)
Reviewed by: peter@freebsd.org, dillon@freebsd.org
X-MFC after: ha ha ha ha
show more ...
|
#
b1fc0ec1 |
| 25-May-2001 |
Robert Watson <rwatson@FreeBSD.org> |
o Merge contents of struct pcred into struct ucred. Specifically, add the real uid, saved uid, real gid, and saved gid to ucred, as well as the pcred->pc_uidinfo, which was associated with the r
o Merge contents of struct pcred into struct ucred. Specifically, add the real uid, saved uid, real gid, and saved gid to ucred, as well as the pcred->pc_uidinfo, which was associated with the real uid, only rename it to cr_ruidinfo so as not to conflict with cr_uidinfo, which corresponds to the effective uid. o Remove p_cred from struct proc; add p_ucred to struct proc, replacing original macro that pointed. p->p_ucred to p->p_cred->pc_ucred. o Universally update code so that it makes use of ucred instead of pcred, p->p_ucred instead of p->p_pcred, cr_ruidinfo instead of p_uidinfo, cr_{r,sv}{u,g}id instead of p_*, etc. o Remove pcred0 and its initialization from init_main.c; initialize cr_ruidinfo there. o Restruction many credential modification chunks to always crdup while we figure out locking and optimizations; generally speaking, this means moving to a structure like this: newcred = crdup(oldcred); ... p->p_ucred = newcred; crfree(oldcred); It's not race-free, but better than nothing. There are also races in sys_process.c, all inter-process authorization, fork, exec, and exit. o Remove sigio->sio_ruid since sigio->sio_ucred now contains the ruid; remove comments indicating that the old arrangement was a problem. o Restructure exec1() a little to use newcred/oldcred arrangement, and use improved uid management primitives. o Clean up exit1() so as to do less work in credential cleanup due to pcred removal. o Clean up fork1() so as to do less work in credential cleanup and allocation. o Clean up ktrcanset() to take into account changes, and move to using suser_xxx() instead of performing a direct uid==0 comparision. o Improve commenting in various kern_prot.c credential modification calls to better document current behavior. In a couple of places, current behavior is a little questionable and we need to check POSIX.1 to make sure it's "right". More commenting work still remains to be done. o Update credential management calls, such as crfree(), to take into account new ruidinfo reference. o Modify or add the following uid and gid helper routines: change_euid() change_egid() change_ruid() change_rgid() change_svuid() change_svgid() In each case, the call now acts on a credential not a process, and as such no longer requires more complicated process locking/etc. They now assume the caller will do any necessary allocation of an exclusive credential reference. Each is commented to document its reference requirements. o CANSIGIO() is simplified to require only credentials, not processes and pcreds. o Remove lots of (p_pcred==NULL) checks. o Add an XXX to authorization code in nfs_lock.c, since it's questionable, and needs to be considered carefully. o Simplify posix4 authorization code to require only credentials, not processes and pcreds. Note that this authorization, as well as CANSIGIO(), needs to be updated to use the p_cansignal() and p_cansched() centralized authorization routines, as they currently do not take into account some desirable restrictions that are handled by the centralized routines, as well as being inconsistent with other similar authorization instances. o Update libkvm to take these changes into account.
Obtained from: TrustedBSD Project Reviewed by: green, bde, jhb, freebsd-arch, freebsd-audit
show more ...
|
Revision tags: release/4.3.0_cvs, release/4.3.0 |
|
#
f34fa851 |
| 28-Mar-2001 |
John Baldwin <jhb@FreeBSD.org> |
Catch up to header include changes: - <sys/mutex.h> now requires <sys/systm.h> - <sys/mutex.h> and <sys/sx.h> now require <sys/lock.h>
|
#
62144330 |
| 30-Dec-2000 |
Poul-Henning Kamp <phk@FreeBSD.org> |
Use macro API for <sys/queue.h>
|
Revision tags: release/4.2.0, release/4.1.1_cvs, release/4.1.0, release/3.5.0_cvs, release/4.0.0_cvs, release/3.4.0_cvs, release/3.3.0_cvs |
|
#
c3aac50f |
| 28-Aug-1999 |
Peter Wemm <peter@FreeBSD.org> |
$Id$ -> $FreeBSD$
|
#
ce9edcf5 |
| 09-Aug-1999 |
Poul-Henning Kamp <phk@FreeBSD.org> |
Merge the cons.c and cons.h to the best of my ability. alpha may or may not compile, I can't test it.
|
Revision tags: release/3.2.0 |
|
#
c3ba51a7 |
| 13-May-1999 |
Bruce Evans <bde@FreeBSD.org> |
Removed an especially bogus cast.
|
Revision tags: release/3.1.0 |
|
#
a1c1e16a |
| 27-Jan-1999 |
Matthew Dillon <dillon@FreeBSD.org> |
Changes to support -Wall, -Wcast-qual. Had to make physical code changes in db_lookup() to avoid the *cp = 0 / *cp = ':' combo ( temporary nul-terminate-then-restore-original ) on a const ch
Changes to support -Wall, -Wcast-qual. Had to make physical code changes in db_lookup() to avoid the *cp = 0 / *cp = ':' combo ( temporary nul-terminate-then-restore-original ) on a const char * string.
show more ...
|
Revision tags: release/3.0.0, release/2.2.8, release/2.2.7 |
|
#
90163a9b |
| 08-Jul-1998 |
Bruce Evans <bde@FreeBSD.org> |
Fixed db_printf format errors.
|
Revision tags: release/2.2.6, release/2.2.5_cvs |
|
#
31ef0589 |
| 09-Oct-1997 |
Bruce Evans <bde@FreeBSD.org> |
Fixed scrolling. Newline at the "--More--" prompt scrolled 2 lines.
|
Revision tags: release/2.2.2_cvs, release/2.2.1_cvs, release/2.2.0, release/2.1.7_cvs |
|
#
6875d254 |
| 22-Feb-1997 |
Peter Wemm <peter@FreeBSD.org> |
Back out part 1 of the MCFH that changed $Id$ to $FreeBSD$. We are not ready for it yet.
|
Revision tags: release/2.1.6_cvs, release/2.1.6.1 |
|
#
1130b656 |
| 14-Jan-1997 |
Jordan K. Hubbard <jkh@FreeBSD.org> |
Make the long-awaited change from $Id$ to $FreeBSD$
This will make a number of things easier in the future, as well as (finally!) avoiding the Id-smashing problem which has plagued developers for so
Make the long-awaited change from $Id$ to $FreeBSD$
This will make a number of things easier in the future, as well as (finally!) avoiding the Id-smashing problem which has plagued developers for so long.
Boy, I'm glad we're not using sup anymore. This update would have been insane otherwise.
show more ...
|
Revision tags: release/2.1.5_cvs |
|
#
4a32095f |
| 15-Jun-1996 |
Peter Wemm <peter@FreeBSD.org> |
A small bit of defensive programming in case the panic is during process exit and cleanup. the 'ps' command assumes that there are always 'nproc' processes on the lists and will walk off the end wit
A small bit of defensive programming in case the panic is during process exit and cleanup. the 'ps' command assumes that there are always 'nproc' processes on the lists and will walk off the end without checking if not, causing ddb to trap during the 'ps' command.
show more ...
|
#
6ad13830 |
| 11-Mar-1996 |
Jeffrey Hsu <hsu@FreeBSD.org> |
For Lite2: proc LIST changes. Reviewed by: david & bde
|
Revision tags: release/2.1.0_cvs |
|
#
5ccbc3cc |
| 10-Dec-1995 |
Bruce Evans <bde@FreeBSD.org> |
Reduced and cleaned up #includes.
|