On Thu, 08 Nov 2018, Dave Chinner wrote:
If only we had percpu counters that had a fixed, extremely low read overhead that doesn't care about the number of CPUs in the machine.... Oh, wait, we do: percpu_counters.[ch]. This all seems like a counter implementation deficiency to me, not an interface problem...
Yeah fair point, as long as we can sacrifice accuracy by replacing kernel_stat -- or maybe just replace the hard irq stats, which I still think only accounts for 1% of all stat users. I have not looked at how filesystems tune the batch size, but it would certainly be worth looking into methinks. Thanks, Davidlohr