Details
-
Bug
-
Resolution: Unresolved
-
Major
-
Cheshire-Cat
Description
In the code review where allocstall was added to sigar (http://review.couchbase.org/#/c/123991/) the following exchange occurred:
=== Aliaksey ===
A funny quirk, if the file lists allocstall_dma32 before allocstall_dma, this won't work as expected.
Another thing that I noticed by looking at the kernel code that that returns these stats is that some of these stats may be missing depending on the kernel configuration. And there's one more statistic that may also be present, namely, allocstall_high (though this one will probably only be present on 32-bit systems, that we don't even support).
Not sure though if it's worth fixing or not.
=== Steve ===
I'll add a space after each of them to catch the potential case you identified and future proof if something like allocstall_normal_new is added prior to allocstall_normal.
The current code will ignore summing the allocstall_* values if any of them is -1. Unless these kernel configurations that don't report values are rare it seems like I'll have to report all four of them.
I'm plan to ignore allocstall_high.
=== Aliaksey ===
Unless these kernel configurations that don't report values are rare it seems like I'll have to report all four of them.
I believe they are rare to almost non-existent.
Not suggesting that you do that. But one could see simply finding and summing up all stats with "allocstall" prefix.
=== Steve ===
I'm going to merge the change as is but open a ticket to track future proofing as well as determining what to do about allocstall* (report individual stats, sum the allocstall* (taking into account some may be unavailable, etc.).