Page MenuHomeFreeBSD

Fix a bug with duplicate sysctl names.
ClosedPublic

Authored by jeff on Dec 3 2019, 9:56 PM.
Tags
None
Referenced Files
F110399950: D22655.diff
Mon, Feb 17, 9:39 PM
Unknown Object (File)
Wed, Jan 22, 10:14 PM
Unknown Object (File)
Nov 24 2024, 8:01 PM
Unknown Object (File)
Nov 24 2024, 4:48 PM
Unknown Object (File)
Nov 23 2024, 10:55 AM
Unknown Object (File)
Nov 22 2024, 2:22 PM
Unknown Object (File)
Nov 21 2024, 1:28 PM
Unknown Object (File)
Nov 21 2024, 11:52 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

Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 27922
Build 26091: arc lint + arc unit

Event Timeline

jeff added reviewers: markj, pho, rlibby.
rlibby added inline comments.
sys/vm/uma_core.c
1895–1899

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