Re: [PATCH 2/2] /proc/stat: Add sysctl parameter to control irq counts latency

2019-01-07 Thread Waiman Long
On 01/07/2019 11:33 AM, Alexey Dobriyan wrote: > On Mon, Jan 07, 2019 at 07:58:40AM -0800, Matthew Wilcox wrote: >> On Mon, Jan 07, 2019 at 10:12:58AM -0500, Waiman Long wrote: >>> A new "fs/proc-stat-irqs-latency-ms" sysctl parameter is now added to >> No. No, no, no, no, no. No. >> >> Stop addi

Re: [PATCH 2/2] /proc/stat: Add sysctl parameter to control irq counts latency

2019-01-07 Thread Alexey Dobriyan
On Mon, Jan 07, 2019 at 07:58:40AM -0800, Matthew Wilcox wrote: > On Mon, Jan 07, 2019 at 10:12:58AM -0500, Waiman Long wrote: > > A new "fs/proc-stat-irqs-latency-ms" sysctl parameter is now added to > > No. No, no, no, no, no. No. > > Stop adding new sysctls for this kind of thing. It's jus

Re: [PATCH 2/2] /proc/stat: Add sysctl parameter to control irq counts latency

2019-01-07 Thread Waiman Long
On 01/07/2019 11:14 AM, Matthew Wilcox wrote: > On Mon, Jan 07, 2019 at 11:07:47AM -0500, Waiman Long wrote: >>> Why are you caching the _output_ of calling sprintf(), rather than caching >>> the >>> values of each interrupt? >>> >> It is just faster to dump the whole string buffer than redoing th

Re: [PATCH 2/2] /proc/stat: Add sysctl parameter to control irq counts latency

2019-01-07 Thread Matthew Wilcox
On Mon, Jan 07, 2019 at 11:07:47AM -0500, Waiman Long wrote: > > Why are you caching the _output_ of calling sprintf(), rather than caching > > the > > values of each interrupt? > > > It is just faster to dump the whole string buffer than redoing the > number formatting each time when the values d

Re: [PATCH 2/2] /proc/stat: Add sysctl parameter to control irq counts latency

2019-01-07 Thread Waiman Long
On 01/07/2019 10:58 AM, Matthew Wilcox wrote: > On Mon, Jan 07, 2019 at 10:12:58AM -0500, Waiman Long wrote: >> Reading /proc/stat can be slow especially if there are many irqs and on >> systems with many CPUs as summation of all the percpu counts for each >> of the irqs is required. On some newer

Re: [PATCH 2/2] /proc/stat: Add sysctl parameter to control irq counts latency

2019-01-07 Thread Matthew Wilcox
On Mon, Jan 07, 2019 at 10:12:58AM -0500, Waiman Long wrote: > Reading /proc/stat can be slow especially if there are many irqs and on > systems with many CPUs as summation of all the percpu counts for each > of the irqs is required. On some newer systems, there can be more than > 1000 irqs per soc

[PATCH 2/2] /proc/stat: Add sysctl parameter to control irq counts latency

2019-01-07 Thread Waiman Long
Reading /proc/stat can be slow especially if there are many irqs and on systems with many CPUs as summation of all the percpu counts for each of the irqs is required. On some newer systems, there can be more than 1000 irqs per socket. Applications that need to read /proc/stat many times per second