mirror of
https://git.freebsd.org/src.git
synced 2026-01-11 19:57:22 +00:00
|
Some checks are pending
Cross-build Kernel / amd64 ubuntu-22.04 (clang-15) (push) Waiting to run
Cross-build Kernel / aarch64 ubuntu-22.04 (clang-15) (push) Waiting to run
Cross-build Kernel / amd64 ubuntu-24.04 (clang-18) (push) Waiting to run
Cross-build Kernel / aarch64 ubuntu-24.04 (clang-18) (push) Waiting to run
Cross-build Kernel / amd64 macos-latest (clang-18) (push) Waiting to run
Cross-build Kernel / aarch64 macos-latest (clang-18) (push) Waiting to run
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
|
||
|---|---|---|
| .. | ||
| cache | ||
| concat | ||
| eli | ||
| gate | ||
| journal | ||
| label | ||
| linux_lvm | ||
| mirror | ||
| mountver | ||
| multipath | ||
| nop | ||
| part | ||
| raid | ||
| raid3 | ||
| shsec | ||
| stripe | ||
| union | ||
| uzip | ||
| virstor | ||
| zero | ||
| geom.h | ||
| geom_bsd_enc.c | ||
| geom_ccd.c | ||
| geom_ctl.c | ||
| geom_ctl.h | ||
| geom_dbg.h | ||
| geom_dev.c | ||
| geom_disk.c | ||
| geom_disk.h | ||
| geom_dump.c | ||
| geom_event.c | ||
| geom_flashmap.c | ||
| geom_flashmap.h | ||
| geom_int.h | ||
| geom_io.c | ||
| geom_kern.c | ||
| geom_slice.c | ||
| geom_slice.h | ||
| geom_subr.c | ||
| geom_vfs.c | ||
| geom_vfs.h | ||
| notes | ||