Revision tags: release/7.0.0_cvs, release/7.0.0 |
|
#
e603be7a |
| 01-Feb-2008 |
Robert Watson <rwatson@FreeBSD.org> |
Use FEATURE() macro to advertise aio availability.
|
#
a8afa221 |
| 24-Jan-2008 |
Jean-Sébastien Pédron <dumbbell@FreeBSD.org> |
When asked to use kqueue, AIO stores its internal state in the `kn_sdata' member of the newly registered knote. The problem is that this member is overwritten by a call to kevent(2) with the EV_ADD f
When asked to use kqueue, AIO stores its internal state in the `kn_sdata' member of the newly registered knote. The problem is that this member is overwritten by a call to kevent(2) with the EV_ADD flag, targetted at the same kevent/knote. For instance, a userland application may set the pointer to NULL, leading to a panic.
A testcase was provided by the submitter.
PR: kern/118911 Submitted by: MOROHOSHI Akihiko <moro@remus.dti.ne.jp> MFC after: 1 day
show more ...
|
Revision tags: release/6.3.0_cvs, release/6.3.0 |
|
#
22db15c0 |
| 13-Jan-2008 |
Attilio Rao <attilio@FreeBSD.org> |
VOP_LOCK1() (and so VOP_LOCK()) and VOP_UNLOCK() are only used in conjuction with 'thread' argument passing which is always curthread. Remove the unuseful extra-argument and pass explicitly curthread
VOP_LOCK1() (and so VOP_LOCK()) and VOP_UNLOCK() are only used in conjuction with 'thread' argument passing which is always curthread. Remove the unuseful extra-argument and pass explicitly curthread to lower layer functions, when necessary.
KPI results broken by this change, which should affect several ports, so version bumping and manpage update will be further committed.
Tested by: kris, pho, Diego Sardina <siarodx at gmail dot com>
show more ...
|
#
cb05b60a |
| 10-Jan-2008 |
Attilio Rao <attilio@FreeBSD.org> |
vn_lock() is currently only used with the 'curthread' passed as argument. Remove this argument and pass curthread directly to underlying VOP_LOCK1() VFS method. This modify makes the code cleaner and
vn_lock() is currently only used with the 'curthread' passed as argument. Remove this argument and pass curthread directly to underlying VOP_LOCK1() VFS method. This modify makes the code cleaner and in particular remove an annoying dependence helping next lockmgr() cleanup. KPI results, obviously, changed.
Manpage and FreeBSD_version will be updated through further commits.
As a side note, would be valuable to say that next commits will address a similar cleanup about VFS methods, in particular vop_lock1 and vop_unlock.
Tested by: Diego Sardina <siarodx at gmail dot com>, Andrea Di Pasquale <whyx dot it at gmail dot com>
show more ...
|
#
3745c395 |
| 21-Oct-2007 |
Julian Elischer <julian@FreeBSD.org> |
Rename the kthread_xxx (e.g. kthread_create()) calls to kproc_xxx as they actually make whole processes. Thos makes way for us to add REAL kthread_create() and friends that actually make theads. it t
Rename the kthread_xxx (e.g. kthread_create()) calls to kproc_xxx as they actually make whole processes. Thos makes way for us to add REAL kthread_create() and friends that actually make theads. it turns out that most of these calls actually end up being moved back to the thread version when it's added. but we need to make this cosmetic change first.
I'd LOVE to do this rename in 7.0 so that we can eventually MFC the new kthread_xxx() calls.
show more ...
|
#
5114048b |
| 20-Aug-2007 |
Konstantin Belousov <kib@FreeBSD.org> |
Destroy the kaio_mtx on the freeing the struct kaioinfo in the aio_proc_rundown.
Do not allow for zero-length read to be passed to the fo_read file method by aio.
Reported and tested by: Peter Holm
Destroy the kaio_mtx on the freeing the struct kaioinfo in the aio_proc_rundown.
Do not allow for zero-length read to be passed to the fo_read file method by aio.
Reported and tested by: Peter Holm Approved by: re (kensmith)
show more ...
|
#
a659386c |
| 10-Jun-2007 |
Matt Jacob <mjacob@FreeBSD.org> |
Remove unused variable.
|
#
1c4bcd05 |
| 01-Jun-2007 |
Jeff Roberson <jeff@FreeBSD.org> |
- Move rusage from being per-process in struct pstats to per-thread in td_ru. This removes the requirement for per-process synchronization in statclock() and mi_switch(). This was previously
- Move rusage from being per-process in struct pstats to per-thread in td_ru. This removes the requirement for per-process synchronization in statclock() and mi_switch(). This was previously supported by sched_lock which is going away. All modifications to rusage are now done in the context of the owning thread. reads proceed without locks. - Aggregate exiting threads rusage in thread_exit() such that the exiting thread's rusage is not lost. - Provide a new routine, rufetch() to fetch an aggregate of all rusage structures from all threads in a process. This routine must be used in any place requiring a rusage from a process prior to it's exit. The exited process's rusage is still available via p_ru. - Aggregate tick statistics only on demand via rufetch() or when a thread exits. Tick statistics are kept in the thread and protected by sched_lock until it exits.
Initial patch by: attilio Reviewed by: attilio, bde (some objections), arch (mostly silent)
show more ...
|
#
873fbcd7 |
| 05-Mar-2007 |
Robert Watson <rwatson@FreeBSD.org> |
Further system call comment cleanup:
- Remove also "MP SAFE" after prior "MPSAFE" pass. (suggested by bde) - Remove extra blank lines in some cases. - Add extra blank lines in some cases. - Remove n
Further system call comment cleanup:
- Remove also "MP SAFE" after prior "MPSAFE" pass. (suggested by bde) - Remove extra blank lines in some cases. - Add extra blank lines in some cases. - Remove no-op comments consisting solely of the function name, the word "syscall", or the system call name. - Add punctuation. - Re-wrap some comments.
show more ...
|
Revision tags: release/6.2.0_cvs, release/6.2.0 |
|
#
6aeb05d7 |
| 11-Nov-2006 |
Tom Rhodes <trhodes@FreeBSD.org> |
Merge posix4/* into normal kernel hierarchy.
Reviewed by: glanced at by jhb Approved by: silence on -arch@ and -standards@
|
#
6a1162d4 |
| 15-Oct-2006 |
Alexander Leidinger <netchild@FreeBSD.org> |
MFP4 (with some minor changes):
Implement the linux_io_* syscalls (AIO). They are only enabled if the native AIO code is available (either compiled in to the kernel or as a module) at the time the f
MFP4 (with some minor changes):
Implement the linux_io_* syscalls (AIO). They are only enabled if the native AIO code is available (either compiled in to the kernel or as a module) at the time the functions are used. If the AIO stuff is not available there will be a ENOSYS.
From the submitter: ---snip--- DESIGN NOTES:
1. Linux permits a process to own multiple AIO queues (distinguished by "context"), but FreeBSD creates only one single AIO queue per process. My code maintains a request queue (STAILQ of queue(3)) per "context", and throws all AIO requests of all contexts owned by a process into the single FreeBSD per-process AIO queue.
When the process calls io_destroy(2), io_getevents(2), io_submit(2) and io_cancel(2), my code can pick out requests owned by the specified context from the single FreeBSD per-process AIO queue according to the per-context request queues maintained by my code.
2. The request queue maintained by my code stores contrast information between Linux IO control blocks (struct linux_iocb) and FreeBSD IO control blocks (struct aiocb). FreeBSD IO control block actually exists in userland memory space, required by FreeBSD native aio_XXXXXX(2).
3. It is quite troubling that the function io_getevents() of libaio-0.3.105 needs to use Linux-specific "struct aio_ring", which is a partial mirror of context in user space. I would rather take the address of context in kernel as the context ID, but the io_getevents() of libaio forces me to take the address of the "ring" in user space as the context ID.
To my surprise, one comment line in the file "io_getevents.c" of libaio-0.3.105 reads:
Ben will hate me for this
REFERENCE:
1. Linux kernel source code: http://www.kernel.org/pub/linux/kernel/v2.6/ (include/linux/aio_abi.h, fs/aio.c)
2. Linux manual pages: http://www.kernel.org/pub/linux/docs/manpages/ (io_setup(2), io_destroy(2), io_getevents(2), io_submit(2), io_cancel(2))
3. Linux Scalability Effort: http://lse.sourceforge.net/io/aio.html The design notes: http://lse.sourceforge.net/io/aionotes.txt
4. The package libaio, both source and binary: http://rpmfind.net/linux/rpm2html/search.php?query=libaio Simple transparent interface to Linux AIO system calls.
5. Libaio-oracle: http://oss.oracle.com/projects/libaio-oracle/ POSIX AIO implementation based on Linux AIO system calls (depending on libaio). ---snip---
Submitted by: Li, Xiao <intron@intron.ac>
show more ...
|
#
4db71d27 |
| 24-Sep-2006 |
John-Mark Gurney <jmg@FreeBSD.org> |
hide kqueue_register from public view, and replace it w/ kqfd_register... this eliminates a possible race in aio registering a kevent..
|
#
f6d004d5 |
| 06-Sep-2006 |
Mark Peek <mp@FreeBSD.org> |
Remove call to fdfree() for the AIO daemons to prevent kernel panics with linprocfs. This call is not needed since file descriptor sharing was removed in v1.125.
Reviewed by: alc, davidxu, ambrisko
Remove call to fdfree() for the AIO daemons to prevent kernel panics with linprocfs. This call is not needed since file descriptor sharing was removed in v1.125.
Reviewed by: alc, davidxu, ambrisko MFC after: 3 days
show more ...
|
#
993182e5 |
| 15-Aug-2006 |
Alexander Leidinger <netchild@FreeBSD.org> |
- Change process_exec function handlers prototype to include struct image_params arg. - Change struct image_params to include struct sysentvec pointer and initialize it. - Change all consumers of
- Change process_exec function handlers prototype to include struct image_params arg. - Change struct image_params to include struct sysentvec pointer and initialize it. - Change all consumers of process_exit/process_exec eventhandlers to new prototypes (includes splitting up into distinct exec/exit functions). - Add eventhandler to userret.
Sponsored by: Google SoC 2006 Submitted by: rdivacky Parts suggested by: jhb (on hackers@)
show more ...
|
#
51e37c7f |
| 02-Jun-2006 |
Doug Ambrisko <ambrisko@FreeBSD.org> |
Make lio ident more consistant with aio ident.
|
Revision tags: release/5.5.0_cvs, release/5.5.0 |
|
#
759cccca |
| 09-May-2006 |
David Xu <davidxu@FreeBSD.org> |
Use a dedicated mutex to protect aio queues, the movation is to reduce lock contention with other parts.
|
Revision tags: release/6.1.0_cvs, release/6.1.0 |
|
#
dbbccfe9 |
| 24-Mar-2006 |
David Xu <davidxu@FreeBSD.org> |
1. Move code for scanning pending I/O from aio_fsync to aio_aqueue, it has less overhead. 2. Avoid scheduling task if maximum number of I/O threads is reached.
|
#
99eee864 |
| 23-Mar-2006 |
David Xu <davidxu@FreeBSD.org> |
Implement aio_fsync() syscall.
|
#
27b8220d |
| 26-Feb-2006 |
David Xu <davidxu@FreeBSD.org> |
1. Remove aio entry from lists earlier in aio_free_entry, so other threads can not see it if we unlock the proc lock (this can happen in knlist_delete). Don't do wakeup, it is not necessary
1. Remove aio entry from lists earlier in aio_free_entry, so other threads can not see it if we unlock the proc lock (this can happen in knlist_delete). Don't do wakeup, it is not necessary.
2. Decrease kaio_buffer_count in biohelper rather than doing it in aio_bio_done_notify.
3. In aio_bio_done_notify, don't send notification if KAIO_RUNDOWN was set, because the process is already in single thread mode.
4. Use assignment to initialize aiothreadflags.
5. AIOCBLIST_RUNDOWN is not useful, axe the code using it.
6. use LIO_NOP instead of zero.
show more ...
|
#
ad8de0f2 |
| 22-Feb-2006 |
David Xu <davidxu@FreeBSD.org> |
If block size is zero, use normal file operations to do I/O, this eliminates a divided-by-zero fault.
Recommended by: phk
|
#
6d53aa62 |
| 27-Jan-2006 |
David Xu <davidxu@FreeBSD.org> |
Just like dofilewrite(), call bwillwrite before fo_write.
|
#
03d66b36 |
| 27-Jan-2006 |
David Xu <davidxu@FreeBSD.org> |
return final error code in aio_return rather than a hardcoded 0.
|
#
55a122bf |
| 26-Jan-2006 |
David Xu <davidxu@FreeBSD.org> |
in aio_aqueue, store same return code into job->_aiocb_private.error. in aio_return, unlock proc lock before suword.
|
#
1aa4c324 |
| 24-Jan-2006 |
David Xu <davidxu@FreeBSD.org> |
Add locking annotation and comments about socket, pipe, fifo problem. Temporarily fix a locking problem for socket I/O.
|
#
e6bdc05f |
| 24-Jan-2006 |
David Xu <davidxu@FreeBSD.org> |
Er, rescure a deleted comment line.
|