Page MenuHomeFreeBSD

Fix a bug with duplicate sysctl names.
ClosedPublic

Authored by jeff on Dec 3 2019, 9:56 PM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Jul 16, 9:06 PM
Unknown Object (File)
Fri, Jul 11, 9:02 PM
Unknown Object (File)
Jun 22 2025, 12:30 AM
Unknown Object (File)
Jun 18 2025, 3:34 PM
Unknown Object (File)
Jun 15 2025, 1:35 AM
Unknown Object (File)
Jun 1 2025, 1:28 AM
Unknown Object (File)
May 8 2025, 11:49 PM
Unknown Object (File)
Apr 5 2025, 7:43 AM
Subscribers

Details

Summary

Use one greater than the highest observe count. This may inflate the numbers but it will not have duplicates. If you create 4bn zones ordered to inflate the numbers you can deal with the sysctl warnings.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

jeff added reviewers: markj, pho, rlibby.
rlibby added inline comments.
sys/vm/uma_core.c
1895–1899 ↗(On Diff #65180)

An alternative might be to make use of snprintf(NULL, 0, fmt, ...); to count. (Or, maybe we ought to provide int asprintf(char **p, struct malloc_type *, const char *fmt, ...).)

This revision is now accepted and ready to land.Dec 3 2019, 11:43 PM