| #
d01183fd
|
| 26-Sep-2025 |
Mateusz Piotrowski <0mp@FreeBSD.org> |
geom/zero: Add support for unmapped I/O
This patch adds support for unmapped I/O to gzero(4).
Let's consider the following script to illustrate the change in gzero(4)'s behavior:
``` dd="dd if=/de
geom/zero: Add support for unmapped I/O
This patch adds support for unmapped I/O to gzero(4).
Let's consider the following script to illustrate the change in gzero(4)'s behavior:
``` dd="dd if=/dev/gzero of=/dev/null bs=512 count=100000" dtrace -q -c "$dd" -n ' fbt::pmap_qenter:entry, fbt::uiomove_fromphys:entry, fbt::memset:entry /execname == "dd"/ { @[probefunc] = count(); } ' ```
Let's run that script 4 times:
``` ==> 1: unmapped I/O not supported (fallback to mapped I/O), kern.geom.zero.clear=1 51200000 bytes transferred in 1.795809 secs (28510829 bytes/sec) pmap_qenter 100000 memset 400011
==> 2: unmapped I/O not supported (fallback to mapped I/O), kern.geom.zero.clear=0 51200000 bytes transferred in 0.701079 secs (73030337 bytes/sec) memset 300011
==> 3: unmapped I/O supported, kern.geom.zero.clear=1 51200000 bytes transferred in 0.771680 secs (66348750 bytes/sec) uiomove_fromphys 100000 memset 300011
==> 4: unmapped I/O supported, kern.geom.zero.clear=0 51200000 bytes transferred in 0.621303 secs (82407407 bytes/sec) memset 300011 ```
If kern.geom.zero.clear=0, then nothing really changes as no copying takes place. Otherwise, we see by adding unmapped I/O support we avoid calls to pmap_qenter(), which was called by GEOM to turn unmapped I/O requests into mapped ones before passing them for processing to gzero(4).
Reviewed by: bnovkov, markj Approved by: bnovkov (mentor), markj (mentor) MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D52998
show more ...
|
| #
ae17bca6
|
| 27-Sep-2025 |
Mateusz Piotrowski <0mp@FreeBSD.org> |
geom: zero: Let sysctls .byte and .clear to be settable in loader
There is no reason to not allow kern.geom.zero.byte and kern.geom.zero.clear to be settable as a tunable.
Reviewed by: imp, markj A
geom: zero: Let sysctls .byte and .clear to be settable in loader
There is no reason to not allow kern.geom.zero.byte and kern.geom.zero.clear to be settable as a tunable.
Reviewed by: imp, markj Approved by: markj (mentor) MFC after: 1 week Event: EuroBSDCon 2025 Differential Revision: https://reviews.freebsd.org/D52763
show more ...
|
| #
656f7f43
|
| 29-Jul-2025 |
Wuyang Chung <wy-chung@outlook.com> |
call g_new_geom instead for callers that pass regular string to g_new_geomf
Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1786
|
| #
fdafd315
|
| 24-Nov-2023 |
Warner Losh <imp@FreeBSD.org> |
sys: Automated cleanup of cdefs and other formatting
Apply the following automated changes to try to eliminate no-longer-needed sys/cdefs.h includes as well as now-empty blank lines in a row.
Remov
sys: Automated cleanup of cdefs and other formatting
Apply the following automated changes to try to eliminate no-longer-needed sys/cdefs.h includes as well as now-empty blank lines in a row.
Remove /^#if.*\n#endif.*\n#include\s+<sys/cdefs.h>.*\n/ Remove /\n+#include\s+<sys/cdefs.h>.*\n+#if.*\n#endif.*\n+/ Remove /\n+#if.*\n#endif.*\n+/ Remove /^#if.*\n#endif.*\n/ Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/types.h>/ Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/param.h>/ Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/capsicum.h>/
Sponsored by: Netflix
show more ...
|
| #
685dc743
|
| 16-Aug-2023 |
Warner Losh <imp@FreeBSD.org> |
sys: Remove $FreeBSD$: one-line .c pattern
Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\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 ...
|
| #
c2da9542
|
| 11-Aug-2021 |
Alexander Motin <mav@FreeBSD.org> |
geom(4): Mark all sysctls as CTLFLAG_MPSAFE.
This code does not use Giant lock for very long time.
MFC after: 2 weeks
|
| #
d40bc607
|
| 01-Sep-2020 |
Mateusz Guzik <mjg@FreeBSD.org> |
geom: clean up empty lines in .c and .h files
|
| #
75dfc66c
|
| 27-Feb-2020 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r358269 through r358399.
|
| #
7029da5c
|
| 26-Feb-2020 |
Pawel Biernacki <kaktus@FreeBSD.org> |
Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (17 of many)
r357614 added CTLFLAG_NEEDGIANT to make it easier to find nodes that are still not MPSAFE (or already are but aren’t properly mark
Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (17 of many)
r357614 added CTLFLAG_NEEDGIANT to make it easier to find nodes that are still not MPSAFE (or already are but aren’t properly marked). Use it in preparation for a general review of all nodes.
This is non-functional change that adds annotations to SYSCTL_NODE and SYSCTL_PROC nodes using one of the soon-to-be-required flags.
Mark all obvious cases as MPSAFE. All entries that haven't been marked as MPSAFE before are by default marked as NEEDGIANT
Approved by: kib (mentor, blanket) Commented by: kib, gallatin, melifaro Differential Revision: https://reviews.freebsd.org/D23718
show more ...
|
| #
d01183fd
|
| 26-Sep-2025 |
Mateusz Piotrowski <0mp@FreeBSD.org> |
geom/zero: Add support for unmapped I/O
This patch adds support for unmapped I/O to gzero(4).
Let's consider the following script to illustrate the change in gzero(4)'s behavior:
``` dd="dd if=/de
geom/zero: Add support for unmapped I/O
This patch adds support for unmapped I/O to gzero(4).
Let's consider the following script to illustrate the change in gzero(4)'s behavior:
``` dd="dd if=/dev/gzero of=/dev/null bs=512 count=100000" dtrace -q -c "$dd" -n ' fbt::pmap_qenter:entry, fbt::uiomove_fromphys:entry, fbt::memset:entry /execname == "dd"/ { @[probefunc] = count(); } ' ```
Let's run that script 4 times:
``` ==> 1: unmapped I/O not supported (fallback to mapped I/O), kern.geom.zero.clear=1 51200000 bytes transferred in 1.795809 secs (28510829 bytes/sec) pmap_qenter 100000 memset 400011
==> 2: unmapped I/O not supported (fallback to mapped I/O), kern.geom.zero.clear=0 51200000 bytes transferred in 0.701079 secs (73030337 bytes/sec) memset 300011
==> 3: unmapped I/O supported, kern.geom.zero.clear=1 51200000 bytes transferred in 0.771680 secs (66348750 bytes/sec) uiomove_fromphys 100000 memset 300011
==> 4: unmapped I/O supported, kern.geom.zero.clear=0 51200000 bytes transferred in 0.621303 secs (82407407 bytes/sec) memset 300011 ```
If kern.geom.zero.clear=0, then nothing really changes as no copying takes place. Otherwise, we see by adding unmapped I/O support we avoid calls to pmap_qenter(), which was called by GEOM to turn unmapped I/O requests into mapped ones before passing them for processing to gzero(4).
Reviewed by: bnovkov, markj Approved by: bnovkov (mentor), markj (mentor) MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D52998
show more ...
|
| #
ae17bca6
|
| 27-Sep-2025 |
Mateusz Piotrowski <0mp@FreeBSD.org> |
geom: zero: Let sysctls .byte and .clear to be settable in loader
There is no reason to not allow kern.geom.zero.byte and kern.geom.zero.clear to be settable as a tunable.
Reviewed by: imp, markj A
geom: zero: Let sysctls .byte and .clear to be settable in loader
There is no reason to not allow kern.geom.zero.byte and kern.geom.zero.clear to be settable as a tunable.
Reviewed by: imp, markj Approved by: markj (mentor) MFC after: 1 week Event: EuroBSDCon 2025 Differential Revision: https://reviews.freebsd.org/D52763
show more ...
|
| #
656f7f43
|
| 29-Jul-2025 |
Wuyang Chung <wy-chung@outlook.com> |
call g_new_geom instead for callers that pass regular string to g_new_geomf
Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1786
|
| #
fdafd315
|
| 24-Nov-2023 |
Warner Losh <imp@FreeBSD.org> |
sys: Automated cleanup of cdefs and other formatting
Apply the following automated changes to try to eliminate no-longer-needed sys/cdefs.h includes as well as now-empty blank lines in a row.
Remov
sys: Automated cleanup of cdefs and other formatting
Apply the following automated changes to try to eliminate no-longer-needed sys/cdefs.h includes as well as now-empty blank lines in a row.
Remove /^#if.*\n#endif.*\n#include\s+<sys/cdefs.h>.*\n/ Remove /\n+#include\s+<sys/cdefs.h>.*\n+#if.*\n#endif.*\n+/ Remove /\n+#if.*\n#endif.*\n+/ Remove /^#if.*\n#endif.*\n/ Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/types.h>/ Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/param.h>/ Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/capsicum.h>/
Sponsored by: Netflix
show more ...
|
| #
685dc743
|
| 16-Aug-2023 |
Warner Losh <imp@FreeBSD.org> |
sys: Remove $FreeBSD$: one-line .c pattern
Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\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 ...
|
| #
c2da9542
|
| 11-Aug-2021 |
Alexander Motin <mav@FreeBSD.org> |
geom(4): Mark all sysctls as CTLFLAG_MPSAFE.
This code does not use Giant lock for very long time.
MFC after: 2 weeks
|
| #
d40bc607
|
| 01-Sep-2020 |
Mateusz Guzik <mjg@FreeBSD.org> |
geom: clean up empty lines in .c and .h files
|
| #
75dfc66c
|
| 27-Feb-2020 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r358269 through r358399.
|
| #
7029da5c
|
| 26-Feb-2020 |
Pawel Biernacki <kaktus@FreeBSD.org> |
Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (17 of many)
r357614 added CTLFLAG_NEEDGIANT to make it easier to find nodes that are still not MPSAFE (or already are but aren’t properly mark
Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (17 of many)
r357614 added CTLFLAG_NEEDGIANT to make it easier to find nodes that are still not MPSAFE (or already are but aren’t properly marked). Use it in preparation for a general review of all nodes.
This is non-functional change that adds annotations to SYSCTL_NODE and SYSCTL_PROC nodes using one of the soon-to-be-required flags.
Mark all obvious cases as MPSAFE. All entries that haven't been marked as MPSAFE before are by default marked as NEEDGIANT
Approved by: kib (mentor, blanket) Commented by: kib, gallatin, melifaro Differential Revision: https://reviews.freebsd.org/D23718
show more ...
|
| #
74d6c131
|
| 10-Apr-2018 |
Kyle Evans <kevans@FreeBSD.org> |
Annotate geom modules with MODULE_VERSION
GEOM ELI may double ask the password during boot. Once at loader time, and once at init time.
This happens due a module loading bug. By default GEOM ELI ca
Annotate geom modules with MODULE_VERSION
GEOM ELI may double ask the password during boot. Once at loader time, and once at init time.
This happens due a module loading bug. By default GEOM ELI caches the password in the kernel, but without the MODULE_VERSION annotation, the kernel loads over the kernel module, even if the GEOM ELI was compiled into the kernel. In this case, the newly loaded module purges/invalidates/overwrites the GEOM ELI's password cache, which causes the double asking.
MFC Note: There's a pc98 component to the original submission that is omitted here due to pc98 removal in head. This part will need to be revived upon MFC.
Reviewed by: imp Submitted by: op Obtained from: opBSD MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D14992
show more ...
|
| #
3728855a
|
| 27-Nov-2017 |
Pedro F. Giffuni <pfg@FreeBSD.org> |
sys/geom: adoption of SPDX licensing ID tags.
Mainly focus on files that use BSD 2-Clause license, however the tool I was using misidentified many licenses so this was mostly a manual - error prone
sys/geom: adoption of SPDX licensing ID tags.
Mainly focus on files that use BSD 2-Clause license, however the tool I was using misidentified many licenses so this was mostly a manual - error prone - task.
The Software Package Data Exchange (SPDX) group provides a specification to make it easier for automated tools to detect and summarize well known opensource licenses. We are gradually adopting the specification, noting that the tags are considered only advisory and do not, in any way, superceed or replace the license texts.
show more ...
|
| #
3b8f0845
|
| 28-Apr-2014 |
Simon J. Gerraty <sjg@FreeBSD.org> |
Merge head
|
| #
84e51a1b
|
| 23-Apr-2014 |
Alan Somers <asomers@FreeBSD.org> |
IFC @264767
|
| #
485ac45a
|
| 04-Feb-2014 |
Peter Grehan <grehan@FreeBSD.org> |
MFC @ r259205 in preparation for some SVM updates. (for real this time)
|