Message ID | 1475201946-31898-3-git-send-email-tianyu.lan@intel.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Fri, Sep 30, 2016 at 10:19:06AM +0800, Lan Tianyu wrote: > Dumping timer info may run for a long time on the huge machine with > a lot of physical cpus. To avoid triggering NMI watchdog, add > process_pending_softirqs() in the loop of dumping timer info. Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> > > Signed-off-by: Lan Tianyu <tianyu.lan@intel.com> > --- > xen/common/timer.c | 1 + > 1 files changed, 1 insertions(+), 0 deletions(-) > > diff --git a/xen/common/timer.c b/xen/common/timer.c > index 29a60a9..ab6bca0 100644 > --- a/xen/common/timer.c > +++ b/xen/common/timer.c > @@ -530,6 +530,7 @@ static void dump_timerq(unsigned char key) > { > ts = &per_cpu(timers, i); > > + process_pending_softirqs(); > printk("CPU%02d:\n", i); > spin_lock_irqsave(&ts->lock, flags); > for ( j = 1; j <= GET_HEAP_SIZE(ts->heap); j++ ) > -- > 1.7.1 >
>>> On 30.09.16 at 04:19, <tianyu.lan@intel.com> wrote: > --- a/xen/common/timer.c > +++ b/xen/common/timer.c > @@ -530,6 +530,7 @@ static void dump_timerq(unsigned char key) > { > ts = &per_cpu(timers, i); > > + process_pending_softirqs(); > printk("CPU%02d:\n", i); > spin_lock_irqsave(&ts->lock, flags); > for ( j = 1; j <= GET_HEAP_SIZE(ts->heap); j++ ) Hmm - is that enough when there are many timers on one CPU? But well, adding something inside the lock region would of course make things quite a bit harder, so I guess this has to be enough for now. Jan
On 2016年10月06日 20:56, Jan Beulich wrote: >>>> On 30.09.16 at 04:19, <tianyu.lan@intel.com> wrote: >> --- a/xen/common/timer.c >> +++ b/xen/common/timer.c >> @@ -530,6 +530,7 @@ static void dump_timerq(unsigned char key) >> { >> ts = &per_cpu(timers, i); >> >> + process_pending_softirqs(); >> printk("CPU%02d:\n", i); >> spin_lock_irqsave(&ts->lock, flags); >> for ( j = 1; j <= GET_HEAP_SIZE(ts->heap); j++ ) > > Hmm - is that enough when there are many timers on one CPU? But > well, adding something inside the lock region would of course make > things quite a bit harder, so I guess this has to be enough for now. > Yes, it's hard to add process_pending_softirqs() under lock just like you said. I search init_timer() and there are 28 callers. Printing 28 lines of timer info is supposed to last a brief of time.
diff --git a/xen/common/timer.c b/xen/common/timer.c index 29a60a9..ab6bca0 100644 --- a/xen/common/timer.c +++ b/xen/common/timer.c @@ -530,6 +530,7 @@ static void dump_timerq(unsigned char key) { ts = &per_cpu(timers, i); + process_pending_softirqs(); printk("CPU%02d:\n", i); spin_lock_irqsave(&ts->lock, flags); for ( j = 1; j <= GET_HEAP_SIZE(ts->heap); j++ )
Dumping timer info may run for a long time on the huge machine with a lot of physical cpus. To avoid triggering NMI watchdog, add process_pending_softirqs() in the loop of dumping timer info. Signed-off-by: Lan Tianyu <tianyu.lan@intel.com> --- xen/common/timer.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)