Re: [Xen-devel] [Resend PATCH 2/2] Xen/timer: Process softirq during dumping timer info

2016-10-07 Thread Lan Tianyu
On 2016年10月06日 20:56, Jan Beulich wrote:
 On 30.09.16 at 04:19,  wrote:
>> --- a/xen/common/timer.c
>> +++ b/xen/common/timer.c
>> @@ -530,6 +530,7 @@ static void dump_timerq(unsigned char key)
>>  {
>>  ts = _cpu(timers, i);
>>  
>> +process_pending_softirqs();
>>  printk("CPU%02d:\n", i);
>>  spin_lock_irqsave(>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.

-- 
Best regards
Tianyu Lan

___
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel


Re: [Xen-devel] [Resend PATCH 2/2] Xen/timer: Process softirq during dumping timer info

2016-10-06 Thread Jan Beulich
>>> On 30.09.16 at 04:19,  wrote:
> --- a/xen/common/timer.c
> +++ b/xen/common/timer.c
> @@ -530,6 +530,7 @@ static void dump_timerq(unsigned char key)
>  {
>  ts = _cpu(timers, i);
>  
> +process_pending_softirqs();
>  printk("CPU%02d:\n", i);
>  spin_lock_irqsave(>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


___
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel


Re: [Xen-devel] [Resend PATCH 2/2] Xen/timer: Process softirq during dumping timer info

2016-09-30 Thread Konrad Rzeszutek Wilk
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 

> 
> Signed-off-by: Lan Tianyu 
> ---
>  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 = _cpu(timers, i);
>  
> +process_pending_softirqs();
>  printk("CPU%02d:\n", i);
>  spin_lock_irqsave(>lock, flags);
>  for ( j = 1; j <= GET_HEAP_SIZE(ts->heap); j++ )
> -- 
> 1.7.1
> 

___
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel


[Xen-devel] [Resend PATCH 2/2] Xen/timer: Process softirq during dumping timer info

2016-09-29 Thread Lan Tianyu
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 
---
 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 = _cpu(timers, i);
 
+process_pending_softirqs();
 printk("CPU%02d:\n", i);
 spin_lock_irqsave(>lock, flags);
 for ( j = 1; j <= GET_HEAP_SIZE(ts->heap); j++ )
-- 
1.7.1


___
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel