<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src/sys/geom/zero, branch main</title>
<subtitle>FreeBSD source tree</subtitle>
<id>https://cgit-dev.freebsd.org/src/atom?h=main</id>
<link rel='self' href='https://cgit-dev.freebsd.org/src/atom?h=main'/>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/'/>
<updated>2025-11-11T16:06:59Z</updated>
<entry>
<title>geom/zero: Add support for unmapped I/O</title>
<updated>2025-11-11T16:06:59Z</updated>
<author>
<name>Mateusz Piotrowski</name>
<email>0mp@FreeBSD.org</email>
</author>
<published>2025-09-26T07:08:30Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=d01183fddf37b15da7ab3d69039e7759ae144451'/>
<id>urn:sha1:d01183fddf37b15da7ab3d69039e7759ae144451</id>
<content type='text'>
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:

```
==&gt; 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

==&gt; 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

==&gt; 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

==&gt; 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
</content>
</entry>
<entry>
<title>geom: zero: Let sysctls .byte and .clear to be settable in loader</title>
<updated>2025-10-24T14:38:48Z</updated>
<author>
<name>Mateusz Piotrowski</name>
<email>0mp@FreeBSD.org</email>
</author>
<published>2025-09-27T15:21:13Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=ae17bca63f0a03e6e46ea679a5be7f8851f82099'/>
<id>urn:sha1:ae17bca63f0a03e6e46ea679a5be7f8851f82099</id>
<content type='text'>
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
</content>
</entry>
<entry>
<title>call g_new_geom instead for callers that pass regular string to g_new_geomf</title>
<updated>2025-09-05T18:42:21Z</updated>
<author>
<name>Wuyang Chung</name>
<email>wy-chung@outlook.com</email>
</author>
<published>2025-07-29T03:42:24Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=656f7f43f204ad1e6956f8257f66b50e032a6c61'/>
<id>urn:sha1:656f7f43f204ad1e6956f8257f66b50e032a6c61</id>
<content type='text'>
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1786
</content>
</entry>
<entry>
<title>sys: Automated cleanup of cdefs and other formatting</title>
<updated>2023-11-27T05:24:00Z</updated>
<author>
<name>Warner Losh</name>
<email>imp@FreeBSD.org</email>
</author>
<published>2023-11-24T20:12:57Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=fdafd315ad0d0f28a11b9fb4476a9ab059c62b92'/>
<id>urn:sha1:fdafd315ad0d0f28a11b9fb4476a9ab059c62b92</id>
<content type='text'>
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+&lt;sys/cdefs.h&gt;.*\n/
Remove /\n+#include\s+&lt;sys/cdefs.h&gt;.*\n+#if.*\n#endif.*\n+/
Remove /\n+#if.*\n#endif.*\n+/
Remove /^#if.*\n#endif.*\n/
Remove /\n+#include\s+&lt;sys/cdefs.h&gt;\n#include\s+&lt;sys/types.h&gt;/
Remove /\n+#include\s+&lt;sys/cdefs.h&gt;\n#include\s+&lt;sys/param.h&gt;/
Remove /\n+#include\s+&lt;sys/cdefs.h&gt;\n#include\s+&lt;sys/capsicum.h&gt;/

Sponsored by:		Netflix
</content>
</entry>
<entry>
<title>sys: Remove $FreeBSD$: one-line .c pattern</title>
<updated>2023-08-16T17:54:36Z</updated>
<author>
<name>Warner Losh</name>
<email>imp@FreeBSD.org</email>
</author>
<published>2023-08-16T17:54:36Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=685dc743dc3b5645e34836464128e1c0558b404b'/>
<id>urn:sha1:685dc743dc3b5645e34836464128e1c0558b404b</id>
<content type='text'>
Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/
</content>
</entry>
<entry>
<title>spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD</title>
<updated>2023-05-12T16:44:03Z</updated>
<author>
<name>Warner Losh</name>
<email>imp@FreeBSD.org</email>
</author>
<published>2023-05-10T15:40:58Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=4d846d260e2b9a3d4d0a701462568268cbfe7a5b'/>
<id>urn:sha1:4d846d260e2b9a3d4d0a701462568268cbfe7a5b</id>
<content type='text'>
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
</content>
</entry>
<entry>
<title>geom(4): Mark all sysctls as CTLFLAG_MPSAFE.</title>
<updated>2021-08-11T00:18:46Z</updated>
<author>
<name>Alexander Motin</name>
<email>mav@FreeBSD.org</email>
</author>
<published>2021-08-11T00:18:46Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=c2da954203c0feb933d3be304710e0346c9ed222'/>
<id>urn:sha1:c2da954203c0feb933d3be304710e0346c9ed222</id>
<content type='text'>
This code does not use Giant lock for very long time.

MFC after:	2 weeks
</content>
</entry>
<entry>
<title>geom: clean up empty lines in .c and .h files</title>
<updated>2020-09-01T22:14:09Z</updated>
<author>
<name>Mateusz Guzik</name>
<email>mjg@FreeBSD.org</email>
</author>
<published>2020-09-01T22:14:09Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=d40bc607528a613afeb59bdaabd09ad4d33c67be'/>
<id>urn:sha1:d40bc607528a613afeb59bdaabd09ad4d33c67be</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (17 of many)</title>
<updated>2020-02-26T14:26:36Z</updated>
<author>
<name>Pawel Biernacki</name>
<email>kaktus@FreeBSD.org</email>
</author>
<published>2020-02-26T14:26:36Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=7029da5c36f2d3cf6bb6c81bf551229f416399e8'/>
<id>urn:sha1:7029da5c36f2d3cf6bb6c81bf551229f416399e8</id>
<content type='text'>
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
</content>
</entry>
<entry>
<title>Annotate geom modules with MODULE_VERSION</title>
<updated>2018-04-10T19:18:16Z</updated>
<author>
<name>Kyle Evans</name>
<email>kevans@FreeBSD.org</email>
</author>
<published>2018-04-10T19:18:16Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=74d6c131cbe23e88d13763cb056a03b4d077868f'/>
<id>urn:sha1:74d6c131cbe23e88d13763cb056a03b4d077868f</id>
<content type='text'>
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
</content>
</entry>
</feed>
