#
825ce531 |
| 17-Jan-2002 |
Alan Cox <alc@FreeBSD.org> |
o Eliminate an unused parameter from aio_fphysio().
|
#
c6c191b2 |
| 14-Jan-2002 |
Alan Cox <alc@FreeBSD.org> |
o Correct the initialization of aiolio_zone: Each entry was 16 times larger than necessary. o Move a rarely-used goto label inside a critical section so that we don't perform an splnet() for w
o Correct the initialization of aiolio_zone: Each entry was 16 times larger than necessary. o Move a rarely-used goto label inside a critical section so that we don't perform an splnet() for which there is no corresponding splx(). o Remove unnecessary splnet()/splx() around accesses to kaioinfo::kaio_jobdone in aio_return(). o Use TAILQ_FOREACH for simple cases of iteration over kaioinfo::kaio_jobdone.
show more ...
|
#
7d17bbd0 |
| 09-Jan-2002 |
Alan Cox <alc@FreeBSD.org> |
o Correct a 32/64-bit error in the initialization of aiol_zone, specifically, sizeof(int) is not the size of a pointer.
|
#
48dac059 |
| 06-Jan-2002 |
Alan Cox <alc@FreeBSD.org> |
o Add missing synchronization (splnet()/splx()) in aio_free_entry(). o Move the definition of struct aiocblist from sys/aio.h to kern/vfs_aio.c. o Make aio_swake_cb() static.
|
#
23f13943 |
| 02-Jan-2002 |
Alan Cox <alc@FreeBSD.org> |
o Properly check the file descriptor passed to aio_cancel(2). (Previously, no out-of-bounds check was performed on the file descriptor.) o Eliminate some excessive white space from aio_cancel(2).
|
#
eae43d0e |
| 01-Jan-2002 |
Alan Cox <alc@FreeBSD.org> |
o Some style(9)-motivated changes to white space.
|
#
5ca50a4b |
| 31-Dec-2001 |
Alan Cox <alc@FreeBSD.org> |
o Correct an off-by-one error in aio_suspend(2).
PR: 18350
|
#
516d2564 |
| 31-Dec-2001 |
Alan Cox <alc@FreeBSD.org> |
o Use "td->td_proc" instead of "curproc" where possible. o Eliminate the unnecessary initialization of several static variables to zero.
|
#
21d56e9c |
| 29-Dec-2001 |
Alfred Perlstein <alfred@FreeBSD.org> |
Make AIO a loadable module.
Remove the explicit call to aio_proc_rundown() from exit1(), instead AIO will use at_exit(9).
Add functions at_exec(9), rm_at_exec(9) which function nearly the same as a
Make AIO a loadable module.
Remove the explicit call to aio_proc_rundown() from exit1(), instead AIO will use at_exit(9).
Add functions at_exec(9), rm_at_exec(9) which function nearly the same as at_exec(9) and rm_at_exec(9), these functions are called on behalf of modules at the time of execve(2) after the image activator has run.
Use a modified version of tegge's suggestion via at_exec(9) to close an exploitable race in AIO.
Fix SYSCALL_MODULE_HELPER such that it's archetecuterally neutral, the problem was that one had to pass it a paramater indicating the number of arguments which were actually the number of "int". Fix it by using an inline version of the AS macro against the syscall arguments. (AS should be available globally but we'll get to that later.)
Add a primative system for dynamically adding kqueue ops, it's really not as sophisticated as it should be, but I'll discuss with jlemon when he's around.
show more ...
|
#
604035c5 |
| 10-Dec-2001 |
Alan Cox <alc@FreeBSD.org> |
o Eliminate compilation warnings on 64-bit architectures.
|
#
91369fc7 |
| 09-Dec-2001 |
Alan Cox <alc@FreeBSD.org> |
o Eliminate unnecessary synchronization from filt_aiodetach(). o The manual page for kevent says that EVFILT_AIO returns under the same conditions as aio_error(). With that in mind, set the data
o Eliminate unnecessary synchronization from filt_aiodetach(). o The manual page for kevent says that EVFILT_AIO returns under the same conditions as aio_error(). With that in mind, set the data field of the returned struct kevent to the value that would be returned by aio_error(). o Fix two compilation warnings.
show more ...
|
#
43150722 |
| 05-Oct-2001 |
John Baldwin <jhb@FreeBSD.org> |
The aio kthreads start off with a root credential just like all other kthreads, so don't malloc a ucred just so we can create a duplicate of the one we already have.
|
#
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 ...
|
Revision tags: release/4.3.0_cvs, release/4.3.0 |
|
#
2f3cf918 |
| 19-Apr-2001 |
Alfred Perlstein <alfred@FreeBSD.org> |
Check validity of signal callback requested via aio routines.
Also move the insertion of the request to after the request is validated, there's still looks like there may be some problems if an inva
Check validity of signal callback requested via aio routines.
Also move the insertion of the request to after the request is validated, there's still looks like there may be some problems if an invalid address is passed to the aio routines, basically a possible leak or having a not completely initialized structure on the queue may still be possible.
A new sig macro was made _SIG_VALID to check the validity of a signal, it would be advisable to use it from now on (in kern/kern_sig.c) rather than rolling your own.
PR: kern/17152
show more ...
|
#
13644654 |
| 10-Mar-2001 |
Alan Cox <alc@FreeBSD.org> |
When aio_read/write() is used on a raw device, physical buffers are used for up to "vfs.aio.max_buf_aio" of the requests. If a request size is MAXPHYS, but the request base isn't page aligned, vmapb
When aio_read/write() is used on a raw device, physical buffers are used for up to "vfs.aio.max_buf_aio" of the requests. If a request size is MAXPHYS, but the request base isn't page aligned, vmapbuf() will map the end of the user space buffer into the start of the kva allocated for the next physical buffer. Don't use a physical buffer in this case. (This change addresses problem report 25617.)
When an aio_read/write() on a raw device has completed, timeout() is used to schedule a signal to the process. Thus, the reporting is delayed up to 10 ms (assuming hz is 100). The process might have terminated in the meantime, causing a trap 12 when attempting to deliver the signal. Thus, the timeout must be cancelled when removing the job.
aio jobs in state JOBST_JOBQGLOBAL should be removed from the kaio_jobqueue list during process rundown.
During process rundown, some aio jobs might move from one list to a different list that has already been "emptied", causing the rundown to be incomplete. Retry the rundown.
A call to BUF_KERNPROC() is needed after obtaining a physical buffer to disassociate the lock from the running process since it can return to userland without releasing that lock.
PR: 25617 Submitted by: tegge
show more ...
|
#
c9a970a7 |
| 09-Mar-2001 |
Alan Cox <alc@FreeBSD.org> |
Use the kthread API to create and destroy AIO daemons.
Submitted by: jhb
|
#
19eb87d2 |
| 07-Mar-2001 |
John Baldwin <jhb@FreeBSD.org> |
Grab the process lock while calling psignal and before calling psignal.
|
#
9c8a2647 |
| 06-Mar-2001 |
Alan Cox <alc@FreeBSD.org> |
Add a missing splx() to aio_fphysio(). (This change is a no-op in -5.0, but potentially significant in -4.x.)
Eliminate a pointless parameter to aio_fphysio().
Remove unnecessary casts from aio_f
Add a missing splx() to aio_fphysio(). (This change is a no-op in -5.0, but potentially significant in -4.x.)
Eliminate a pointless parameter to aio_fphysio().
Remove unnecessary casts from aio_fphysio() and aio_physwakeup().
show more ...
|
#
88ed460e |
| 05-Mar-2001 |
Alan Cox <alc@FreeBSD.org> |
Eliminate the aio_freejobs list. Its purpose was to store free aiocb's allocated by zalloc(). In other words, zfree() was never called. Now, we call zfree(). Why eliminate this micro- optimiza
Eliminate the aio_freejobs list. Its purpose was to store free aiocb's allocated by zalloc(). In other words, zfree() was never called. Now, we call zfree(). Why eliminate this micro- optimization? At some later point, when we multithread the AIO system, we would need a mutex to synchronize access to aio_freejobs, making its use nearly indistinguishable in cost from zalloc() and zfree().
Remove unnecessary fhold() and fdrop() calls from aio_qphysio(), undo'ing a part of revision 1.86. The reference count on the file structure is already incremented by _aio_aqueue() before it calls aio_qphysio(). (Update the comments to document this fact.)
Remove unnecessary casts from _aio_aqueue(), aio_read(), aio_write() and aio_waitcomplete().
Remove an unnecessary "return;" from aio_process().
Add "static" in various places.
show more ...
|
#
fb579e9a |
| 04-Mar-2001 |
Alan Cox <alc@FreeBSD.org> |
Remove the field privatemodes from struct __aiocb_private and the related code from aio_read() and aio_write(). This field was intended, but never used, to allow a mythical user-level library to mak
Remove the field privatemodes from struct __aiocb_private and the related code from aio_read() and aio_write(). This field was intended, but never used, to allow a mythical user-level library to make an aio_read() or aio_write() behave like an ordinary read() or write(), i.e., a blocking I/O operation.
show more ...
|
#
9ed346ba |
| 09-Feb-2001 |
Bosko Milekic <bmilekic@FreeBSD.org> |
Change and clean the mutex lock interface.
mtx_enter(lock, type) becomes:
mtx_lock(lock) for sleep locks (MTX_DEF-initialized locks) mtx_lock_spin(lock) for spin locks (MTX_SPIN-initialized)
simil
Change and clean the mutex lock interface.
mtx_enter(lock, type) becomes:
mtx_lock(lock) for sleep locks (MTX_DEF-initialized locks) mtx_lock_spin(lock) for spin locks (MTX_SPIN-initialized)
similarily, for releasing a lock, we now have:
mtx_unlock(lock) for MTX_DEF and mtx_unlock_spin(lock) for MTX_SPIN. We change the caller interface for the two different types of locks because the semantics are entirely different for each case, and this makes it explicitly clear and, at the same time, it rids us of the extra `type' argument.
The enter->lock and exit->unlock change has been made with the idea that we're "locking data" and not "entering locked code" in mind.
Further, remove all additional "flags" previously passed to the lock acquire/release routines with the exception of two:
MTX_QUIET and MTX_NOSWITCH
The functionality of these flags is preserved and they can be passed to the lock/unlock routines by calling the corresponding wrappers:
mtx_{lock, unlock}_flags(lock, flag(s)) and mtx_{lock, unlock}_spin_flags(lock, flag(s)) for MTX_DEF and MTX_SPIN locks, respectively.
Re-inline some lock acq/rel code; in the sleep lock case, we only inline the _obtain_lock()s in order to ensure that the inlined code fits into a cache line. In the spin lock case, we inline recursion and actually only perform a function call if we need to spin. This change has been made with the idea that we generally tend to avoid spin locks and that also the spin locks that we do have and are heavily used (i.e. sched_lock) do recurse, and therefore in an effort to reduce function call overhead for some architectures (such as alpha), we inline recursion for this case.
Create a new malloc type for the witness code and retire from using the M_DEV type. The new type is called M_WITNESS and is only declared if WITNESS is enabled.
Begin cleaning up some machdep/mutex.h code - specifically updated the "optimized" inlined code in alpha/mutex.h and wrote MTX_LOCK_SPIN and MTX_UNLOCK_SPIN asm macros for the i386/mutex.h as we presently need those.
Finally, caught up to the interface changes in all sys code.
Contributors: jake, jhb, jasone (in no particular order)
show more ...
|
#
f09deb69 |
| 06-Feb-2001 |
Jeroen Ruigrok van der Werven <asmodai@FreeBSD.org> |
Fix typo: wierd -> weird.
There is no such thing as wierd in the english language.
|
#
37d40066 |
| 04-Feb-2001 |
Poul-Henning Kamp <phk@FreeBSD.org> |
Another round of the <sys/queue.h> FOREACH transmogriffer.
Created with: sed(1) Reviewed by: md5(1)
|
#
86360fee |
| 02-Dec-2000 |
Jake Burkholder <jake@FreeBSD.org> |
Remove thr_sleep and thr_wakeup. Remove fields p_nthread and p_wakeup from struct proc, which are now unused (p_nthread already was). Remove process flag P_KTHREADP which was untested and only set i
Remove thr_sleep and thr_wakeup. Remove fields p_nthread and p_wakeup from struct proc, which are now unused (p_nthread already was). Remove process flag P_KTHREADP which was untested and only set in vfs_aio.c (it should use kthread_create). Move the yield system call to kern_synch.c as kern_threads.c has been removed completely.
moral support from: alfred, jhb
show more ...
|
#
c6fa9f78 |
| 21-Nov-2000 |
Alan Cox <alc@FreeBSD.org> |
Provide a new interface for the user of aio_read() and aio_write() to request a kevent upon completion of the I/O. Specifically, introduce a new type of sigevent notification, SIGEV_EVENT. If sigev
Provide a new interface for the user of aio_read() and aio_write() to request a kevent upon completion of the I/O. Specifically, introduce a new type of sigevent notification, SIGEV_EVENT. If sigev_notify is SIGEV_EVENT, then sigev_notify_kqueue names the kqueue that should receive the event and sigev_value contains the "void *" is copied into the kevent's udata field.
In contrast to the existing interface, this one: 1) works on the Alpha 2) avoids the extra copyin() call for the kevent because all of the information needed is in the sigevent and 3) could be applied to request a single kevent upon completion of an entire lio_listio().
Reviewed by: jlemon
show more ...
|