commit | a5a03facba31c9ab7b991c3761c68ec831a05c00 | [log] [tgz] |
---|---|---|
author | Nick Maniscalco <maniscalco@google.com> | Fri Apr 19 23:42:47 2019 +0000 |
committer | CQ bot account: commit-bot@chromium.org <commit-bot@chromium.org> | Fri Apr 19 23:42:47 2019 +0000 |
tree | 67dc1839ccb9c8d1c11e217d9bc79017e6265604 | |
parent | 9c5edda25e6617080637195e1b1a43c7da74440d [diff] |
[kernel][vm] Keep per cpu counts of vm_page states The purpose of this change is to improve the performance of ZX_INFO_KMEM_STATS. By maintaining counters of vm_page states we no longer need to walk all pages to compute ZX_INFO_KMEM_STATS. A previous version of this change used global atomic integers, but that proved to be too expensive (ZX-3916). Instead, we use per cpu counters and access them with preemption disabled. Move vm_page_state to it's own file to prevent a cicular dependency between page and percpu. Add a couple static helper methods to Percpus to facilitate accessing per cpu counters like vm_page_counts. Ran zircon_benchmarks on a NUC to ensure this doesn't significantly regress performance. Looked at Channel/WriteRead/64bytes as it seems to be a bellwether. Before -- Mean Std dev Min Max Median Unit Mean Mbytes/sec Test case 562 33 542 6403 555 nanoseconds 108.552 Channel/WriteRead/64bytes 277 19 263 4391 272 nanoseconds N/A Channel/WriteRead/64bytes.write 285 17 274 2680 282 nanoseconds N/A Channel/WriteRead/64bytes.read After -- Mean Std dev Min Max Median Unit Mean Mbytes/sec Test case 571 13 558 6263 569 nanoseconds 106.880 Channel/WriteRead/64bytes 284 10 275 4458 282 nanoseconds N/A Channel/WriteRead/64bytes.write 287 7 279 1805 286 nanoseconds N/A Channel/WriteRead/64bytes.read Bug: ZX-833 #comment per cpu counts Test: booted and ran 'kstats -m' Change-Id: I18083c4dbc3d0423cc59cf3700a93dc72de8d2e3
Pink + Purple == Fuchsia (a new operating system)
Fuchsia is a modular, capability-based operating system. Fuchsia runs on modern 64-bit Intel and ARM processors.
Fuchsia is an open source project with a code of conduct that we expect everyone who interacts with the project to respect.
See Getting Started.
See the documentation.