| #
4605a99b
|
| 15-Nov-2024 |
Andrew Gallatin <gallatin@FreeBSD.org> |
aio: remove write-only jobid & kernelinfo
The jobid (which was stored in kernelinfo) was used to look up jobs until 1ce9182407f6, where it became essentially write only. Remove it to simplify the co
aio: remove write-only jobid & kernelinfo
The jobid (which was stored in kernelinfo) was used to look up jobs until 1ce9182407f6, where it became essentially write only. Remove it to simplify the code and pave the way for future work to make aio scale better.
Note this has been slated for removal "soon" for 18 years.
Suggested by: jhb Reviewed by: kib Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D47583
show more ...
|
| #
8dfc788b
|
| 03-Feb-2024 |
Konstantin Belousov <kib@FreeBSD.org> |
aio_read2/aio_write2: add AIO_OP2_VECTORED
Suggested by: Vinícius dos Santos Oliveira <vini.ipsmaker@gmail.com> Reviewed by: jhb Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential r
aio_read2/aio_write2: add AIO_OP2_VECTORED
Suggested by: Vinícius dos Santos Oliveira <vini.ipsmaker@gmail.com> Reviewed by: jhb Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D43448
show more ...
|
| #
06cb1c3f
|
| 01-Feb-2024 |
Konstantin Belousov <kib@FreeBSD.org> |
libc: add aio_read2() and aio_write2() functions
as wrappers around lio_listio(LIO_READ/WRITE | LIO_FOFFSET, &iocb, 1);
Suggested and reviewed by: jhb Discussed with: asomers Sponsored by: The Free
libc: add aio_read2() and aio_write2() functions
as wrappers around lio_listio(LIO_READ/WRITE | LIO_FOFFSET, &iocb, 1);
Suggested and reviewed by: jhb Discussed with: asomers Sponsored by: The FreeBSD Foundation MFC after: 1 week Differrential revision: https://reviews.freebsd.org/D43448
show more ...
|
| #
e4b7bbd6
|
| 13-Jan-2024 |
Konstantin Belousov <kib@FreeBSD.org> |
lio_listio(2): add LIO_FOFFSET flag to ignore aiocb aio_offset
and use the current file offset instead.
Requested by: Vinícius dos Santos Oliveira <vini.ipsmaker@gmail.com> Reviewed by: jhb Discuss
lio_listio(2): add LIO_FOFFSET flag to ignore aiocb aio_offset
and use the current file offset instead.
Requested by: Vinícius dos Santos Oliveira <vini.ipsmaker@gmail.com> Reviewed by: jhb Discussed with: asomers Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D43448
show more ...
|
| #
95ee2897
|
| 16-Aug-2023 |
Warner Losh <imp@FreeBSD.org> |
sys: Remove $FreeBSD$: two-line .h pattern
Remove /^\s*\*\n \*\s+\$FreeBSD\$$\n/
|
| #
4d846d26
|
| 10-May-2023 |
Warner Losh <imp@FreeBSD.org> |
spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD
The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch up to that fact and revert to their recommended match of
spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD
The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch up to that fact and revert to their recommended match of BSD-2-Clause.
Discussed with: pfg MFC After: 3 days Sponsored by: Netflix
show more ...
|
| #
98844e99
|
| 15-Feb-2023 |
John Baldwin <jhb@FreeBSD.org> |
aio: Fix more synchronization issues in aio_biowakeup.
- Use atomic_store to set job->error. atomic_set does an or operation, not assignment.
- Use refcount_* to manage job->nbio.
This ensure
aio: Fix more synchronization issues in aio_biowakeup.
- Use atomic_store to set job->error. atomic_set does an or operation, not assignment.
- Use refcount_* to manage job->nbio.
This ensures proper memory barriers are present so that the last bio won't see a possibly stale value of job->error.
- Don't re-read job->error after reading it via atomic_load.
Reported by: markj (1) Reviewed by: mjg, markj Differential Revision: https://reviews.freebsd.org/D38611
show more ...
|
| #
f30a1ae8
|
| 22-Aug-2021 |
Thomas Munro <tmunro@FreeBSD.org> |
lio_listio(2): Allow LIO_READV and LIO_WRITEV.
Allow multiple vector IOs to be started with one system call. aio_readv() and aio_writev() already used these opcodes under the covers. This commit m
lio_listio(2): Allow LIO_READV and LIO_WRITEV.
Allow multiple vector IOs to be started with one system call. aio_readv() and aio_writev() already used these opcodes under the covers. This commit makes them available to user space.
Being non-standard extensions, they're only visible if __BSD_VISIBLE is defined, like the functions.
Reviewed by: asomers, kib MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D31627
show more ...
|
| #
2247f489
|
| 03-Jan-2021 |
Alan Somers <asomers@FreeBSD.org> |
aio: micro-optimize the lio_opcode assignments
This allows slightly more efficient opcode testing in-kernel. It is transparent to userland, except to applications that sneakily submit aio fsync or
aio: micro-optimize the lio_opcode assignments
This allows slightly more efficient opcode testing in-kernel. It is transparent to userland, except to applications that sneakily submit aio fsync or aio mlock operations via lio_listio, which has never been documented, requires the use of deliberately undefined constants (LIO_SYNC and LIO_MLOCK), and is arguably a bug.
Reviewed by: jhb Differential Revision: https://reviews.freebsd.org/D27942
show more ...
|
| #
ff1a3078
|
| 10-Jan-2021 |
Alan Somers <asomers@FreeBSD.org> |
lio_listio: validate aio_lio_opcode
Previously, we would accept any kind of LIO_* opcode, including ones that were intended for in-kernel use only like LIO_SYNC (which is not defined in userland).
lio_listio: validate aio_lio_opcode
Previously, we would accept any kind of LIO_* opcode, including ones that were intended for in-kernel use only like LIO_SYNC (which is not defined in userland). The situation became more serious with 022ca2fc7fe08d51f33a1d23a9be49e6d132914e. After that revision, setting aio_lio_opcode to LIO_WRITEV or LIO_READV would trigger an assertion.
Note that POSIX does not specify what should happen if aio_lio_opcode is invalid.
MFC-with: 022ca2fc7fe08d51f33a1d23a9be49e6d132914e Reviewed by: jhb, tmunro, 0mp Differential Revision: <https://reviews.freebsd.org/D28078
show more ...
|
| #
801ac943
|
| 07-Jan-2021 |
Thomas Munro <tmunro@FreeBSD.org> |
aio_fsync(2): Support O_DSYNC.
aio_fsync(O_DSYNC, ...) is the asynchronous version of fdatasync(2).
Reviewed by: kib, asomers, jhb Differential Review: https://reviews.freebsd.org/D25071
|
| #
022ca2fc
|
| 02-Jan-2021 |
Alan Somers <asomers@FreeBSD.org> |
Add aio_writev and aio_readv
POSIX AIO is great, but it lacks vectored I/O functions. This commit fixes that shortcoming by adding aio_writev and aio_readv. They aren't part of the standard, but the
Add aio_writev and aio_readv
POSIX AIO is great, but it lacks vectored I/O functions. This commit fixes that shortcoming by adding aio_writev and aio_readv. They aren't part of the standard, but they're an obvious extension. They work just like their synchronous equivalents pwritev and preadv.
It isn't yet possible to use vectored aiocbs with lio_listio, but that could be added in the future.
Reviewed by: jhb, kib, bcr Relnotes: yes Differential Revision: https://reviews.freebsd.org/D27743
show more ...
|
| #
01206038
|
| 21-Dec-2020 |
Alan Somers <asomers@FreeBSD.org> |
AIO: remove the kaiocb->bio linkage
Vectored aio will require each aiocb to be associated with multiple bios, so we can't store a link to the latter from the former. But we don't really need to. a
AIO: remove the kaiocb->bio linkage
Vectored aio will require each aiocb to be associated with multiple bios, so we can't store a link to the latter from the former. But we don't really need to. aio_biowakeup already knows the bio it's using, and the other fields can be stored within the bio and/or buf itself.
Also, remove the unused kaiocb.backend2 field.
Reviewed By: kib Differential Revision: https://reviews.freebsd.org/D27682
show more ...
|
| #
cd853791
|
| 28-Nov-2020 |
Konstantin Belousov <kib@FreeBSD.org> |
Make MAXPHYS tunable. Bump MAXPHYS to 1M.
Replace MAXPHYS by runtime variable maxphys. It is initialized from MAXPHYS by default, but can be also adjusted with the tunable kern.maxphys.
Make b_pag
Make MAXPHYS tunable. Bump MAXPHYS to 1M.
Replace MAXPHYS by runtime variable maxphys. It is initialized from MAXPHYS by default, but can be also adjusted with the tunable kern.maxphys.
Make b_pages[] array in struct buf flexible. Size b_pages[] for buffer cache buffers exactly to atop(maxbcachebuf) (currently it is sized to atop(MAXPHYS)), and b_pages[] for pbufs is sized to atop(maxphys) + 1. The +1 for pbufs allow several pbuf consumers, among them vmapbuf(), to use unaligned buffers still sized to maxphys, esp. when such buffers come from userspace (*). Overall, we save significant amount of otherwise wasted memory in b_pages[] for buffer cache buffers, while bumping MAXPHYS to desired high value.
Eliminate all direct uses of the MAXPHYS constant in kernel and driver sources, except a place which initialize maxphys. Some random (and arguably weird) uses of MAXPHYS, e.g. in linuxolator, are converted straight. Some drivers, which use MAXPHYS to size embeded structures, get private MAXPHYS-like constant; their convertion is out of scope for this work.
Changes to cam/, dev/ahci, dev/ata, dev/mpr, dev/mpt, dev/mvs, dev/siis, where either submitted by, or based on changes by mav.
Suggested by: mav (*) Reviewed by: imp, mav, imp, mckusick, scottl (intermediate versions) Tested by: pho Sponsored by: The FreeBSD Foundation Differential revision: https://reviews.freebsd.org/D27225
show more ...
|
| #
4605a99b
|
| 15-Nov-2024 |
Andrew Gallatin <gallatin@FreeBSD.org> |
aio: remove write-only jobid & kernelinfo
The jobid (which was stored in kernelinfo) was used to look up jobs until 1ce9182407f6, where it became essentially write only. Remove it to simplify the co
aio: remove write-only jobid & kernelinfo
The jobid (which was stored in kernelinfo) was used to look up jobs until 1ce9182407f6, where it became essentially write only. Remove it to simplify the code and pave the way for future work to make aio scale better.
Note this has been slated for removal "soon" for 18 years.
Suggested by: jhb Reviewed by: kib Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D47583
show more ...
|
| #
8dfc788b
|
| 03-Feb-2024 |
Konstantin Belousov <kib@FreeBSD.org> |
aio_read2/aio_write2: add AIO_OP2_VECTORED
Suggested by: Vinícius dos Santos Oliveira <vini.ipsmaker@gmail.com> Reviewed by: jhb Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential r
aio_read2/aio_write2: add AIO_OP2_VECTORED
Suggested by: Vinícius dos Santos Oliveira <vini.ipsmaker@gmail.com> Reviewed by: jhb Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D43448
show more ...
|
| #
06cb1c3f
|
| 01-Feb-2024 |
Konstantin Belousov <kib@FreeBSD.org> |
libc: add aio_read2() and aio_write2() functions
as wrappers around lio_listio(LIO_READ/WRITE | LIO_FOFFSET, &iocb, 1);
Suggested and reviewed by: jhb Discussed with: asomers Sponsored by: The Free
libc: add aio_read2() and aio_write2() functions
as wrappers around lio_listio(LIO_READ/WRITE | LIO_FOFFSET, &iocb, 1);
Suggested and reviewed by: jhb Discussed with: asomers Sponsored by: The FreeBSD Foundation MFC after: 1 week Differrential revision: https://reviews.freebsd.org/D43448
show more ...
|
| #
e4b7bbd6
|
| 13-Jan-2024 |
Konstantin Belousov <kib@FreeBSD.org> |
lio_listio(2): add LIO_FOFFSET flag to ignore aiocb aio_offset
and use the current file offset instead.
Requested by: Vinícius dos Santos Oliveira <vini.ipsmaker@gmail.com> Reviewed by: jhb Discuss
lio_listio(2): add LIO_FOFFSET flag to ignore aiocb aio_offset
and use the current file offset instead.
Requested by: Vinícius dos Santos Oliveira <vini.ipsmaker@gmail.com> Reviewed by: jhb Discussed with: asomers Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D43448
show more ...
|
| #
95ee2897
|
| 16-Aug-2023 |
Warner Losh <imp@FreeBSD.org> |
sys: Remove $FreeBSD$: two-line .h pattern
Remove /^\s*\*\n \*\s+\$FreeBSD\$$\n/
|
| #
4d846d26
|
| 10-May-2023 |
Warner Losh <imp@FreeBSD.org> |
spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD
The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch up to that fact and revert to their recommended match of
spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD
The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch up to that fact and revert to their recommended match of BSD-2-Clause.
Discussed with: pfg MFC After: 3 days Sponsored by: Netflix
show more ...
|
| #
98844e99
|
| 15-Feb-2023 |
John Baldwin <jhb@FreeBSD.org> |
aio: Fix more synchronization issues in aio_biowakeup.
- Use atomic_store to set job->error. atomic_set does an or operation, not assignment.
- Use refcount_* to manage job->nbio.
This ensure
aio: Fix more synchronization issues in aio_biowakeup.
- Use atomic_store to set job->error. atomic_set does an or operation, not assignment.
- Use refcount_* to manage job->nbio.
This ensures proper memory barriers are present so that the last bio won't see a possibly stale value of job->error.
- Don't re-read job->error after reading it via atomic_load.
Reported by: markj (1) Reviewed by: mjg, markj Differential Revision: https://reviews.freebsd.org/D38611
show more ...
|
| #
f30a1ae8
|
| 22-Aug-2021 |
Thomas Munro <tmunro@FreeBSD.org> |
lio_listio(2): Allow LIO_READV and LIO_WRITEV.
Allow multiple vector IOs to be started with one system call. aio_readv() and aio_writev() already used these opcodes under the covers. This commit m
lio_listio(2): Allow LIO_READV and LIO_WRITEV.
Allow multiple vector IOs to be started with one system call. aio_readv() and aio_writev() already used these opcodes under the covers. This commit makes them available to user space.
Being non-standard extensions, they're only visible if __BSD_VISIBLE is defined, like the functions.
Reviewed by: asomers, kib MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D31627
show more ...
|
| #
2247f489
|
| 03-Jan-2021 |
Alan Somers <asomers@FreeBSD.org> |
aio: micro-optimize the lio_opcode assignments
This allows slightly more efficient opcode testing in-kernel. It is transparent to userland, except to applications that sneakily submit aio fsync or
aio: micro-optimize the lio_opcode assignments
This allows slightly more efficient opcode testing in-kernel. It is transparent to userland, except to applications that sneakily submit aio fsync or aio mlock operations via lio_listio, which has never been documented, requires the use of deliberately undefined constants (LIO_SYNC and LIO_MLOCK), and is arguably a bug.
Reviewed by: jhb Differential Revision: https://reviews.freebsd.org/D27942
show more ...
|
| #
ff1a3078
|
| 10-Jan-2021 |
Alan Somers <asomers@FreeBSD.org> |
lio_listio: validate aio_lio_opcode
Previously, we would accept any kind of LIO_* opcode, including ones that were intended for in-kernel use only like LIO_SYNC (which is not defined in userland).
lio_listio: validate aio_lio_opcode
Previously, we would accept any kind of LIO_* opcode, including ones that were intended for in-kernel use only like LIO_SYNC (which is not defined in userland). The situation became more serious with 022ca2fc7fe08d51f33a1d23a9be49e6d132914e. After that revision, setting aio_lio_opcode to LIO_WRITEV or LIO_READV would trigger an assertion.
Note that POSIX does not specify what should happen if aio_lio_opcode is invalid.
MFC-with: 022ca2fc7fe08d51f33a1d23a9be49e6d132914e Reviewed by: jhb, tmunro, 0mp Differential Revision: <https://reviews.freebsd.org/D28078
show more ...
|
| #
801ac943
|
| 07-Jan-2021 |
Thomas Munro <tmunro@FreeBSD.org> |
aio_fsync(2): Support O_DSYNC.
aio_fsync(O_DSYNC, ...) is the asynchronous version of fdatasync(2).
Reviewed by: kib, asomers, jhb Differential Review: https://reviews.freebsd.org/D25071
|