Re: [PATCH v5 08/12] x86/ioapic: Refactor the delay logic in timer_irq_works()

2017-07-02 Thread Dou Liyang
Hi Thomas, At 07/03/2017 03:15 AM, Thomas Gleixner wrote: On Fri, 30 Jun 2017, Dou Liyang wrote: +static void __init delay_with_tsc(void) +{ + unsigned long long start, now; + unsigned long ticks = jiffies; Please make that unsigned long end = jiffies + 4; ticks really

Re: [PATCH v5 08/12] x86/ioapic: Refactor the delay logic in timer_irq_works()

2017-07-02 Thread Dou Liyang
Hi Thomas, At 07/03/2017 03:15 AM, Thomas Gleixner wrote: On Fri, 30 Jun 2017, Dou Liyang wrote: +static void __init delay_with_tsc(void) +{ + unsigned long long start, now; + unsigned long ticks = jiffies; Please make that unsigned long end = jiffies + 4; ticks really

Re: [PATCH v5 08/12] x86/ioapic: Refactor the delay logic in timer_irq_works()

2017-07-02 Thread Thomas Gleixner
On Fri, 30 Jun 2017, Dou Liyang wrote: > +static void __init delay_with_tsc(void) > +{ > + unsigned long long start, now; > + unsigned long ticks = jiffies; Please make that unsigned long end = jiffies + 4; ticks really means: number of ticks. But that variable is doing something

Re: [PATCH v5 08/12] x86/ioapic: Refactor the delay logic in timer_irq_works()

2017-07-02 Thread Thomas Gleixner
On Fri, 30 Jun 2017, Dou Liyang wrote: > +static void __init delay_with_tsc(void) > +{ > + unsigned long long start, now; > + unsigned long ticks = jiffies; Please make that unsigned long end = jiffies + 4; ticks really means: number of ticks. But that variable is doing something

[PATCH v5 08/12] x86/ioapic: Refactor the delay logic in timer_irq_works()

2017-06-29 Thread Dou Liyang
Kernel use timer_irq_works() to detects the timer IRQs. It calls mdelay(10) to delay ten ticks and check whether the timer IRQ work or not. The mdelay() depends on the loops_per_jiffy which is set up in calibrate_delay(). Current kernel defaults the IRQ 0 is available when it calibrates delay.

[PATCH v5 08/12] x86/ioapic: Refactor the delay logic in timer_irq_works()

2017-06-29 Thread Dou Liyang
Kernel use timer_irq_works() to detects the timer IRQs. It calls mdelay(10) to delay ten ticks and check whether the timer IRQ work or not. The mdelay() depends on the loops_per_jiffy which is set up in calibrate_delay(). Current kernel defaults the IRQ 0 is available when it calibrates delay.