Re: [PATCH] proc/stat: Separate out individual irq counts into /proc/stat_irqs

2018-05-01 Thread Andrew Morton
On Tue, 24 Apr 2018 09:18:59 +0300 Alexey Dobriyan wrote: > On Mon, Apr 23, 2018 at 10:54:18PM -0700, David Rientjes wrote: > > On Sat, 21 Apr 2018, Alexey Dobriyan wrote: > > > > > > On Thu, Apr 19, 2018 at 04:23:02PM -0700, Joel Fernandes (Google) wrote: > > > > > Can we

Re: [PATCH] proc/stat: Separate out individual irq counts into /proc/stat_irqs

2018-05-01 Thread Andrew Morton
On Tue, 24 Apr 2018 09:18:59 +0300 Alexey Dobriyan wrote: > On Mon, Apr 23, 2018 at 10:54:18PM -0700, David Rientjes wrote: > > On Sat, 21 Apr 2018, Alexey Dobriyan wrote: > > > > > > On Thu, Apr 19, 2018 at 04:23:02PM -0700, Joel Fernandes (Google) wrote: > > > > > Can we not just remove

Re: [PATCH] proc/stat: Separate out individual irq counts into /proc/stat_irqs

2018-04-24 Thread Alexey Dobriyan
On Mon, Apr 23, 2018 at 10:54:18PM -0700, David Rientjes wrote: > On Sat, 21 Apr 2018, Alexey Dobriyan wrote: > > > > On Thu, Apr 19, 2018 at 04:23:02PM -0700, Joel Fernandes (Google) wrote: > > > > Can we not just remove per-IRQ stats from /proc/stat (since I gather > > > > from this discussion

Re: [PATCH] proc/stat: Separate out individual irq counts into /proc/stat_irqs

2018-04-24 Thread Alexey Dobriyan
On Mon, Apr 23, 2018 at 10:54:18PM -0700, David Rientjes wrote: > On Sat, 21 Apr 2018, Alexey Dobriyan wrote: > > > > On Thu, Apr 19, 2018 at 04:23:02PM -0700, Joel Fernandes (Google) wrote: > > > > Can we not just remove per-IRQ stats from /proc/stat (since I gather > > > > from this discussion

Re: [PATCH] proc/stat: Separate out individual irq counts into /proc/stat_irqs

2018-04-23 Thread David Rientjes
On Sat, 21 Apr 2018, Alexey Dobriyan wrote: > > On Thu, Apr 19, 2018 at 04:23:02PM -0700, Joel Fernandes (Google) wrote: > > > Can we not just remove per-IRQ stats from /proc/stat (since I gather > > > from this discussion it isn't scalable), and just have applications > > > that need per-IRQ

Re: [PATCH] proc/stat: Separate out individual irq counts into /proc/stat_irqs

2018-04-23 Thread David Rientjes
On Sat, 21 Apr 2018, Alexey Dobriyan wrote: > > On Thu, Apr 19, 2018 at 04:23:02PM -0700, Joel Fernandes (Google) wrote: > > > Can we not just remove per-IRQ stats from /proc/stat (since I gather > > > from this discussion it isn't scalable), and just have applications > > > that need per-IRQ

Re: [PATCH] proc/stat: Separate out individual irq counts into /proc/stat_irqs

2018-04-21 Thread Alexey Dobriyan
On Sat, Apr 21, 2018 at 11:34:22PM +0300, Alexey Dobriyan wrote: > On Thu, Apr 19, 2018 at 04:23:02PM -0700, Joel Fernandes (Google) wrote: > > Can we not just remove per-IRQ stats from /proc/stat (since I gather > > from this discussion it isn't scalable), and just have applications > > that need

Re: [PATCH] proc/stat: Separate out individual irq counts into /proc/stat_irqs

2018-04-21 Thread Alexey Dobriyan
On Sat, Apr 21, 2018 at 11:34:22PM +0300, Alexey Dobriyan wrote: > On Thu, Apr 19, 2018 at 04:23:02PM -0700, Joel Fernandes (Google) wrote: > > Can we not just remove per-IRQ stats from /proc/stat (since I gather > > from this discussion it isn't scalable), and just have applications > > that need

Re: [PATCH] proc/stat: Separate out individual irq counts into /proc/stat_irqs

2018-04-21 Thread Alexey Dobriyan
On Thu, Apr 19, 2018 at 04:23:02PM -0700, Joel Fernandes (Google) wrote: > Can we not just remove per-IRQ stats from /proc/stat (since I gather > from this discussion it isn't scalable), and just have applications > that need per-IRQ stats use /proc/interrupts ? If you can prove noone is using

Re: [PATCH] proc/stat: Separate out individual irq counts into /proc/stat_irqs

2018-04-21 Thread Alexey Dobriyan
On Thu, Apr 19, 2018 at 04:23:02PM -0700, Joel Fernandes (Google) wrote: > Can we not just remove per-IRQ stats from /proc/stat (since I gather > from this discussion it isn't scalable), and just have applications > that need per-IRQ stats use /proc/interrupts ? If you can prove noone is using

Re: [PATCH] proc/stat: Separate out individual irq counts into /proc/stat_irqs

2018-04-19 Thread Joel Fernandes (Google)
Hi, Or maintain array of registered irqs and iterate over them only. >>> Right, we can allocate a bitmap of used irqs to do that. >>> I have another idea. perf record shows mutex_lock/mutex_unlock at the top. Most of them are irq mutex not seqfile mutex as there are many

Re: [PATCH] proc/stat: Separate out individual irq counts into /proc/stat_irqs

2018-04-19 Thread Joel Fernandes (Google)
Hi, Or maintain array of registered irqs and iterate over them only. >>> Right, we can allocate a bitmap of used irqs to do that. >>> I have another idea. perf record shows mutex_lock/mutex_unlock at the top. Most of them are irq mutex not seqfile mutex as there are many

Re: [PATCH] proc/stat: Separate out individual irq counts into /proc/stat_irqs

2018-04-19 Thread Waiman Long
On 04/19/2018 04:39 PM, Alexey Dobriyan wrote: >> >> Yes, that can probably help. >> >> This is the data from the problematic skylake server: >> >> model name: Intel(R) Xeon(R) Gold 6136 CPU @ 3.00GHz >> 56 sosreport-carevalo.02076935-20180413085327/proc/stat >> Interrupts: 5370 >> Interrupts

Re: [PATCH] proc/stat: Separate out individual irq counts into /proc/stat_irqs

2018-04-19 Thread Waiman Long
On 04/19/2018 04:39 PM, Alexey Dobriyan wrote: >> >> Yes, that can probably help. >> >> This is the data from the problematic skylake server: >> >> model name: Intel(R) Xeon(R) Gold 6136 CPU @ 3.00GHz >> 56 sosreport-carevalo.02076935-20180413085327/proc/stat >> Interrupts: 5370 >> Interrupts

Re: [PATCH] proc/stat: Separate out individual irq counts into /proc/stat_irqs

2018-04-19 Thread Waiman Long
On 04/19/2018 04:39 PM, Alexey Dobriyan wrote: > On Thu, Apr 19, 2018 at 04:21:14PM -0400, Waiman Long wrote: >> On 04/19/2018 03:55 PM, Alexey Dobriyan wrote: >>> On Thu, Apr 19, 2018 at 03:28:40PM -0400, Waiman Long wrote: On 04/19/2018 03:08 PM, Alexey Dobriyan wrote: >> Therefore,

Re: [PATCH] proc/stat: Separate out individual irq counts into /proc/stat_irqs

2018-04-19 Thread Waiman Long
On 04/19/2018 04:39 PM, Alexey Dobriyan wrote: > On Thu, Apr 19, 2018 at 04:21:14PM -0400, Waiman Long wrote: >> On 04/19/2018 03:55 PM, Alexey Dobriyan wrote: >>> On Thu, Apr 19, 2018 at 03:28:40PM -0400, Waiman Long wrote: On 04/19/2018 03:08 PM, Alexey Dobriyan wrote: >> Therefore,

Re: [PATCH] proc/stat: Separate out individual irq counts into /proc/stat_irqs

2018-04-19 Thread Alexey Dobriyan
On Thu, Apr 19, 2018 at 04:21:14PM -0400, Waiman Long wrote: > On 04/19/2018 03:55 PM, Alexey Dobriyan wrote: > > On Thu, Apr 19, 2018 at 03:28:40PM -0400, Waiman Long wrote: > >> On 04/19/2018 03:08 PM, Alexey Dobriyan wrote: > Therefore, application performance can be impacted if the

Re: [PATCH] proc/stat: Separate out individual irq counts into /proc/stat_irqs

2018-04-19 Thread Alexey Dobriyan
On Thu, Apr 19, 2018 at 04:21:14PM -0400, Waiman Long wrote: > On 04/19/2018 03:55 PM, Alexey Dobriyan wrote: > > On Thu, Apr 19, 2018 at 03:28:40PM -0400, Waiman Long wrote: > >> On 04/19/2018 03:08 PM, Alexey Dobriyan wrote: > Therefore, application performance can be impacted if the

Re: [PATCH] proc/stat: Separate out individual irq counts into /proc/stat_irqs

2018-04-19 Thread Alexey Dobriyan
On Thu, Apr 19, 2018 at 12:43:19PM -0700, Andrew Morton wrote: > On Thu, 19 Apr 2018 13:09:29 -0400 Waiman Long wrote: > > > It was found that reading /proc/stat could be time consuming on > > systems with a lot of irqs. For example, reading /proc/stat in a > > certain

Re: [PATCH] proc/stat: Separate out individual irq counts into /proc/stat_irqs

2018-04-19 Thread Alexey Dobriyan
On Thu, Apr 19, 2018 at 12:43:19PM -0700, Andrew Morton wrote: > On Thu, 19 Apr 2018 13:09:29 -0400 Waiman Long wrote: > > > It was found that reading /proc/stat could be time consuming on > > systems with a lot of irqs. For example, reading /proc/stat in a > > certain 2-socket Skylake server

Re: [PATCH] proc/stat: Separate out individual irq counts into /proc/stat_irqs

2018-04-19 Thread Waiman Long
On 04/19/2018 03:43 PM, Andrew Morton wrote: > On Thu, 19 Apr 2018 13:09:29 -0400 Waiman Long wrote: > >> It was found that reading /proc/stat could be time consuming on >> systems with a lot of irqs. For example, reading /proc/stat in a >> certain 2-socket Skylake server took

Re: [PATCH] proc/stat: Separate out individual irq counts into /proc/stat_irqs

2018-04-19 Thread Waiman Long
On 04/19/2018 03:43 PM, Andrew Morton wrote: > On Thu, 19 Apr 2018 13:09:29 -0400 Waiman Long wrote: > >> It was found that reading /proc/stat could be time consuming on >> systems with a lot of irqs. For example, reading /proc/stat in a >> certain 2-socket Skylake server took about 4.6ms because

Re: [PATCH] proc/stat: Separate out individual irq counts into /proc/stat_irqs

2018-04-19 Thread Alexey Dobriyan
On Thu, Apr 19, 2018 at 03:28:40PM -0400, Waiman Long wrote: > On 04/19/2018 03:08 PM, Alexey Dobriyan wrote: > >> Therefore, application performance can be impacted if the application > >> reads /proc/stat rather frequently. > > [nods] > > Text interfaces can be designed in a very stupid way. > >

Re: [PATCH] proc/stat: Separate out individual irq counts into /proc/stat_irqs

2018-04-19 Thread Alexey Dobriyan
On Thu, Apr 19, 2018 at 03:28:40PM -0400, Waiman Long wrote: > On 04/19/2018 03:08 PM, Alexey Dobriyan wrote: > >> Therefore, application performance can be impacted if the application > >> reads /proc/stat rather frequently. > > [nods] > > Text interfaces can be designed in a very stupid way. > >

Re: [PATCH] proc/stat: Separate out individual irq counts into /proc/stat_irqs

2018-04-19 Thread Andrew Morton
On Thu, 19 Apr 2018 13:09:29 -0400 Waiman Long wrote: > It was found that reading /proc/stat could be time consuming on > systems with a lot of irqs. For example, reading /proc/stat in a > certain 2-socket Skylake server took about 4.6ms because it had over > 5k irqs. In that

Re: [PATCH] proc/stat: Separate out individual irq counts into /proc/stat_irqs

2018-04-19 Thread Andrew Morton
On Thu, 19 Apr 2018 13:09:29 -0400 Waiman Long wrote: > It was found that reading /proc/stat could be time consuming on > systems with a lot of irqs. For example, reading /proc/stat in a > certain 2-socket Skylake server took about 4.6ms because it had over > 5k irqs. In that particular case,

Re: [PATCH] proc/stat: Separate out individual irq counts into /proc/stat_irqs

2018-04-19 Thread Waiman Long
On 04/19/2018 03:08 PM, Alexey Dobriyan wrote: >> Therefore, application performance can be impacted if the application >> reads /proc/stat rather frequently. > [nods] > Text interfaces can be designed in a very stupid way. > >> For example, reading /proc/stat in a certain 2-socket Skylake server

Re: [PATCH] proc/stat: Separate out individual irq counts into /proc/stat_irqs

2018-04-19 Thread Waiman Long
On 04/19/2018 03:08 PM, Alexey Dobriyan wrote: >> Therefore, application performance can be impacted if the application >> reads /proc/stat rather frequently. > [nods] > Text interfaces can be designed in a very stupid way. > >> For example, reading /proc/stat in a certain 2-socket Skylake server

Re: [PATCH] proc/stat: Separate out individual irq counts into /proc/stat_irqs

2018-04-19 Thread Alexey Dobriyan
> Therefore, application performance can be impacted if the application > reads /proc/stat rather frequently. [nods] Text interfaces can be designed in a very stupid way. > For example, reading /proc/stat in a certain 2-socket Skylake server > took about 4.6ms because it had over 5k irqs. Is

Re: [PATCH] proc/stat: Separate out individual irq counts into /proc/stat_irqs

2018-04-19 Thread Alexey Dobriyan
> Therefore, application performance can be impacted if the application > reads /proc/stat rather frequently. [nods] Text interfaces can be designed in a very stupid way. > For example, reading /proc/stat in a certain 2-socket Skylake server > took about 4.6ms because it had over 5k irqs. Is

Re: [PATCH] proc/stat: Separate out individual irq counts into /proc/stat_irqs

2018-04-19 Thread Waiman Long
On 04/19/2018 01:38 PM, Randy Dunlap wrote: > On 04/19/18 10:09, Waiman Long wrote: >> It was found that reading /proc/stat could be time consuming on >> systems with a lot of irqs. For example, reading /proc/stat in a >> certain 2-socket Skylake server took about 4.6ms because it had over >> 5k

Re: [PATCH] proc/stat: Separate out individual irq counts into /proc/stat_irqs

2018-04-19 Thread Waiman Long
On 04/19/2018 01:38 PM, Randy Dunlap wrote: > On 04/19/18 10:09, Waiman Long wrote: >> It was found that reading /proc/stat could be time consuming on >> systems with a lot of irqs. For example, reading /proc/stat in a >> certain 2-socket Skylake server took about 4.6ms because it had over >> 5k

Re: [PATCH] proc/stat: Separate out individual irq counts into /proc/stat_irqs

2018-04-19 Thread Randy Dunlap
On 04/19/18 10:09, Waiman Long wrote: > It was found that reading /proc/stat could be time consuming on > systems with a lot of irqs. For example, reading /proc/stat in a > certain 2-socket Skylake server took about 4.6ms because it had over > 5k irqs. In that particular case, the majority of the

Re: [PATCH] proc/stat: Separate out individual irq counts into /proc/stat_irqs

2018-04-19 Thread Randy Dunlap
On 04/19/18 10:09, Waiman Long wrote: > It was found that reading /proc/stat could be time consuming on > systems with a lot of irqs. For example, reading /proc/stat in a > certain 2-socket Skylake server took about 4.6ms because it had over > 5k irqs. In that particular case, the majority of the

[PATCH] proc/stat: Separate out individual irq counts into /proc/stat_irqs

2018-04-19 Thread Waiman Long
It was found that reading /proc/stat could be time consuming on systems with a lot of irqs. For example, reading /proc/stat in a certain 2-socket Skylake server took about 4.6ms because it had over 5k irqs. In that particular case, the majority of the CPU cycles for reading /proc/stat was spent in

[PATCH] proc/stat: Separate out individual irq counts into /proc/stat_irqs

2018-04-19 Thread Waiman Long
It was found that reading /proc/stat could be time consuming on systems with a lot of irqs. For example, reading /proc/stat in a certain 2-socket Skylake server took about 4.6ms because it had over 5k irqs. In that particular case, the majority of the CPU cycles for reading /proc/stat was spent in