Re: [PATCH] sched/cputime: correct account of irqtime

2020-10-14 Thread Pingfan Liu
On Wed, Oct 14, 2020 at 9:02 PM Peter Zijlstra wrote: > > On Mon, Oct 12, 2020 at 09:50:44PM +0800, Pingfan Liu wrote: > > __do_softirq() may be interrupted by hardware interrupts. In this case, > > irqtime_account_irq() will account the time slice as CPUTIME_SOFTIRQ by > > mistake. > > > > By

Re: [PATCH] sched/cputime: correct account of irqtime

2020-10-14 Thread Peter Zijlstra
On Mon, Oct 12, 2020 at 09:50:44PM +0800, Pingfan Liu wrote: > __do_softirq() may be interrupted by hardware interrupts. In this case, > irqtime_account_irq() will account the time slice as CPUTIME_SOFTIRQ by > mistake. > > By passing irqtime_account_irq() an extra param about either hardirq or >

Re: [PATCH] sched/cputime: correct account of irqtime

2020-10-12 Thread Pingfan Liu
On Tue, Oct 13, 2020 at 11:10 AM jun qian wrote: > > Pingfan Liu 于2020年10月12日周一 下午9:54写道: > > > > __do_softirq() may be interrupted by hardware interrupts. In this case, > > irqtime_account_irq() will account the time slice as CPUTIME_SOFTIRQ by > > mistake. > > > > By passing

Re: [PATCH] sched/cputime: correct account of irqtime

2020-10-12 Thread jun qian
Pingfan Liu 于2020年10月12日周一 下午9:54写道: > > __do_softirq() may be interrupted by hardware interrupts. In this case, > irqtime_account_irq() will account the time slice as CPUTIME_SOFTIRQ by > mistake. > > By passing irqtime_account_irq() an extra param about either hardirq or > softirq,

[PATCH] sched/cputime: correct account of irqtime

2020-10-12 Thread Pingfan Liu
__do_softirq() may be interrupted by hardware interrupts. In this case, irqtime_account_irq() will account the time slice as CPUTIME_SOFTIRQ by mistake. By passing irqtime_account_irq() an extra param about either hardirq or softirq, irqtime_account_irq() can handle the above case.