-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FreeBSD: add support for KSTAT_TYPE_RAW #10836
FreeBSD: add support for KSTAT_TYPE_RAW #10836
Conversation
Codecov Report
@@ Coverage Diff @@
## master #10836 +/- ##
===========================================
- Coverage 79.88% 65.77% -14.11%
===========================================
Files 395 313 -82
Lines 125066 107848 -17218
===========================================
- Hits 99905 70935 -28970
- Misses 25161 36913 +11752
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
Can you add some more description... ?:) |
A few kstats use KSTAT_TYPE_RAW to provide a string generated on demand. Implementing these as sysctls was punted until now. Signed-off-by: Matt Macy <[email protected]>
9599b14
to
1cc1aef
Compare
Done. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At last! 👍
➜ ~ sysctl -n kstat.zfs.misc.fletcher_4_bench
implementation native byteswap
scalar 4718213052 4289191810
superscalar 6103790001 5190557091
superscalar4 4783991682 3966348686
sse2 7896467714 4572329578
ssse3 7896983221 7045094265
avx2 13080592052 11051043037
fastest avx2 avx2
➜ ~ sysctl -n kstat.zfs.misc.vdev_raidz_bench
implementation gen_p gen_pq gen_pqr rec_p rec_q rec_r rec_pq rec_pr rec_qr rec_pqr
original 321256514 162625867 70124953 1181152392 210457911 26396112 62736139 15482992 15712710 10443469
scalar 1123886592 299494008 128174171 1120662593 336833534 251117481 160729139 133737740 102207369 67214395
sse2 2031949787 746825645 367459708 2029598955 964076290 674810510 493983566 420951379 269985820 181478781
ssse3 2032758781 746881016 368723915 2025218466 1083364478 826382250 599511721 489092621 363810509 275015085
avx2 3242070830 1064714074 619650935 3194125846 2001443592 1593867942 907346402 863817193 660207376 493693072
fastest avx2 avx2 avx2 avx2 avx2 avx2 avx2 avx2 avx2 avx2
A few kstats use KSTAT_TYPE_RAW to provide a string generated on demand. Implementing these as sysctls was punted until now. Reviewed by: Toomas Soome <[email protected]> Reviewed-by: Allan Jude <[email protected]> Reviewed-by: Ryan Moeller <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Matt Macy <[email protected]> Closes #10836
Without this, the sysctl system calls will acquire a global lock before invoking the handler. This is noticeable in some situations when running top(1). The global lock is mostly vestigal but continues to see some use and so contention is still a problem; until the default sense of the MPSAFE flag changes, we have to annotate each and every handler. Reviewed-by: Allan Jude <[email protected]> Reviewed-by: Ryan Moeller <[email protected]> Signed-off-by: Mark Johnston <[email protected]> Closes #10836
Without this, the sysctl system calls will acquire a global lock before invoking the handler. This is noticeable in some situations when running top(1). The global lock is mostly vestigal but continues to see some use and so contention is still a problem; until the default sense of the MPSAFE flag changes, we have to annotate each and every handler. Reviewed-by: Allan Jude <[email protected]> Reviewed-by: Ryan Moeller <[email protected]> Signed-off-by: Mark Johnston <[email protected]> Closes #10836
A few kstats use KSTAT_TYPE_RAW to provide a string generated on demand. Implementing these as sysctls was punted until now. Reviewed by: Toomas Soome <[email protected]> Reviewed-by: Allan Jude <[email protected]> Reviewed-by: Ryan Moeller <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Matt Macy <[email protected]> Closes openzfs#10836
Without this, the sysctl system calls will acquire a global lock before invoking the handler. This is noticeable in some situations when running top(1). The global lock is mostly vestigal but continues to see some use and so contention is still a problem; until the default sense of the MPSAFE flag changes, we have to annotate each and every handler. Reviewed-by: Allan Jude <[email protected]> Reviewed-by: Ryan Moeller <[email protected]> Signed-off-by: Mark Johnston <[email protected]> Closes openzfs#10836
A few kstats use KSTAT_TYPE_RAW to provide a string generated on demand. Implementing these as sysctls was punted until now. Reviewed by: Toomas Soome <[email protected]> Reviewed-by: Allan Jude <[email protected]> Reviewed-by: Ryan Moeller <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Matt Macy <[email protected]> Closes openzfs#10836
Without this, the sysctl system calls will acquire a global lock before invoking the handler. This is noticeable in some situations when running top(1). The global lock is mostly vestigal but continues to see some use and so contention is still a problem; until the default sense of the MPSAFE flag changes, we have to annotate each and every handler. Reviewed-by: Allan Jude <[email protected]> Reviewed-by: Ryan Moeller <[email protected]> Signed-off-by: Mark Johnston <[email protected]> Closes openzfs#10836
The
KSTAT_TYPE_RAW
kstat type requires supporting a number of operationsthat are really structured to fit in to Linux's
seq_operations
framework. Thesomewhat awkward nature of the interface led me to leave out support for this
kstat type in the initial merge. This change fills in that initial gap.
KSTAT_TYPE_RAW
is used by dbgmsg, spa state (currently private to Linux),dbuf stats, vdev_raidz_bench, and fletcher_4_bench. Previously these were all
inaccessible to FreeBSD users.
Signed-off-by: Matt Macy [email protected]
Motivation and Context
Description
How Has This Been Tested?
Types of changes
Checklist:
Signed-off-by
.