Re: [RFC PATCH v2 0/3] genirq, serial: 8250: Workaround to avoid irq=0 for console

2015-08-02 Thread Thomas Gleixner
On Fri, 31 Jul 2015, Taichi Kageyama wrote: > On 2015/07/31 8:43, Peter Hurley wrote: > >> If you look at the actual autoprobe users aside of 8250. That's really > >> all ancient ISA hardware and hardly interesting. So all we really care > >> about are the 8250 serial ports. > > In this case, I

Re: [RFC PATCH v2 0/3] genirq, serial: 8250: Workaround to avoid irq=0 for console

2015-08-02 Thread Thomas Gleixner
On Fri, 31 Jul 2015, Taichi Kageyama wrote: On 2015/07/31 8:43, Peter Hurley wrote: If you look at the actual autoprobe users aside of 8250. That's really all ancient ISA hardware and hardly interesting. So all we really care about are the 8250 serial ports. In this case, I think [patch

Re: [RFC PATCH v2 0/3] genirq, serial: 8250: Workaround to avoid irq=0 for console

2015-07-31 Thread Taichi Kageyama
On 2015/07/31 8:43, Peter Hurley wrote: > On 07/30/2015 06:12 PM, Thomas Gleixner wrote: >> On Thu, 30 Jul 2015, Peter Hurley wrote: >>> Honestly, I'm not too sure this is the way to go. >>> >>> Messing around with irqsoff tracer for 30 mins turned up: >>> 3.664ms in intel_unmap_page >>> - iotlb

Re: [RFC PATCH v2 0/3] genirq, serial: 8250: Workaround to avoid irq=0 for console

2015-07-31 Thread Taichi Kageyama
On 2015/07/31 8:43, Peter Hurley wrote: On 07/30/2015 06:12 PM, Thomas Gleixner wrote: On Thu, 30 Jul 2015, Peter Hurley wrote: Honestly, I'm not too sure this is the way to go. Messing around with irqsoff tracer for 30 mins turned up: 3.664ms in intel_unmap_page - iotlb flush, spinlock

Re: [RFC PATCH v2 0/3] genirq, serial: 8250: Workaround to avoid irq=0 for console

2015-07-30 Thread Peter Hurley
On 07/30/2015 06:12 PM, Thomas Gleixner wrote: > On Thu, 30 Jul 2015, Peter Hurley wrote: >> Honestly, I'm not too sure this is the way to go. >> >> Messing around with irqsoff tracer for 30 mins turned up: >> 3.664ms in intel_unmap_page >> - iotlb flush, spinlock contention on iova_rbtree_lock

Re: [RFC PATCH v2 0/3] genirq, serial: 8250: Workaround to avoid irq=0 for console

2015-07-30 Thread Thomas Gleixner
On Thu, 30 Jul 2015, Peter Hurley wrote: > Honestly, I'm not too sure this is the way to go. > > Messing around with irqsoff tracer for 30 mins turned up: > 3.664ms in intel_unmap_page > - iotlb flush, spinlock contention on iova_rbtree_lock > 1.726ms in intel_map_page() > - iommu core @

Re: [RFC PATCH v2 0/3] genirq, serial: 8250: Workaround to avoid irq=0 for console

2015-07-30 Thread Peter Hurley
On 07/30/2015 06:12 AM, Thomas Gleixner wrote: > On Thu, 30 Jul 2015, Taichi Kageyama wrote: >> On 2015/07/29 22:35, Thomas Gleixner wrote: >> I know your code is sample (console.h is required), >> but it is conflict with [patch v2 1/3]. >> I think serial8250_console_write should not touch ctrl

Re: [RFC PATCH v2 0/3] genirq, serial: 8250: Workaround to avoid irq=0 for console

2015-07-30 Thread Thomas Gleixner
On Thu, 30 Jul 2015, Taichi Kageyama wrote: > On 2015/07/29 22:35, Thomas Gleixner wrote: > I know your code is sample (console.h is required), > but it is conflict with [patch v2 1/3]. > I think serial8250_console_write should not touch ctrl reg during > autoconfig_irq. > To resolve the real

Re: [RFC PATCH v2 0/3] genirq, serial: 8250: Workaround to avoid irq=0 for console

2015-07-30 Thread Peter Hurley
On 07/30/2015 06:12 AM, Thomas Gleixner wrote: On Thu, 30 Jul 2015, Taichi Kageyama wrote: On 2015/07/29 22:35, Thomas Gleixner wrote: I know your code is sample (console.h is required), but it is conflict with [patch v2 1/3]. I think serial8250_console_write should not touch ctrl reg during

Re: [RFC PATCH v2 0/3] genirq, serial: 8250: Workaround to avoid irq=0 for console

2015-07-30 Thread Peter Hurley
On 07/30/2015 06:12 PM, Thomas Gleixner wrote: On Thu, 30 Jul 2015, Peter Hurley wrote: Honestly, I'm not too sure this is the way to go. Messing around with irqsoff tracer for 30 mins turned up: 3.664ms in intel_unmap_page - iotlb flush, spinlock contention on iova_rbtree_lock 1.726ms in

Re: [RFC PATCH v2 0/3] genirq, serial: 8250: Workaround to avoid irq=0 for console

2015-07-30 Thread Thomas Gleixner
On Thu, 30 Jul 2015, Peter Hurley wrote: Honestly, I'm not too sure this is the way to go. Messing around with irqsoff tracer for 30 mins turned up: 3.664ms in intel_unmap_page - iotlb flush, spinlock contention on iova_rbtree_lock 1.726ms in intel_map_page() - iommu core @

Re: [RFC PATCH v2 0/3] genirq, serial: 8250: Workaround to avoid irq=0 for console

2015-07-30 Thread Thomas Gleixner
On Thu, 30 Jul 2015, Taichi Kageyama wrote: On 2015/07/29 22:35, Thomas Gleixner wrote: I know your code is sample (console.h is required), but it is conflict with [patch v2 1/3]. I think serial8250_console_write should not touch ctrl reg during autoconfig_irq. To resolve the real

Re: [RFC PATCH v2 0/3] genirq, serial: 8250: Workaround to avoid irq=0 for console

2015-07-29 Thread Taichi Kageyama
On 2015/07/29 22:35, Thomas Gleixner wrote: > On Wed, 29 Jul 2015, Peter Hurley wrote: >> On 07/29/2015 07:53 AM, Thomas Gleixner wrote: >>> On Wed, 29 Jul 2015, Peter Hurley wrote: On 07/29/2015 06:32 AM, Thomas Gleixner wrote: > On Wed, 29 Jul 2015, Taichi Kageyama wrote: >> - Keep

Re: [RFC PATCH v2 0/3] genirq, serial: 8250: Workaround to avoid irq=0 for console

2015-07-29 Thread Thomas Gleixner
On Wed, 29 Jul 2015, Peter Hurley wrote: > On 07/29/2015 07:53 AM, Thomas Gleixner wrote: > > On Wed, 29 Jul 2015, Peter Hurley wrote: > >> On 07/29/2015 06:32 AM, Thomas Gleixner wrote: > >>> On Wed, 29 Jul 2015, Taichi Kageyama wrote: > - Keep interrupt disabled on the CPU which is used to

Re: [RFC PATCH v2 0/3] genirq, serial: 8250: Workaround to avoid irq=0 for console

2015-07-29 Thread Peter Hurley
On 07/29/2015 07:53 AM, Thomas Gleixner wrote: > On Wed, 29 Jul 2015, Peter Hurley wrote: >> On 07/29/2015 06:32 AM, Thomas Gleixner wrote: >>> On Wed, 29 Jul 2015, Taichi Kageyama wrote: - Keep interrupt disabled on the CPU which is used to detect an interrupt during the timeout of

Re: [RFC PATCH v2 0/3] genirq, serial: 8250: Workaround to avoid irq=0 for console

2015-07-29 Thread Thomas Gleixner
On Wed, 29 Jul 2015, Peter Hurley wrote: > On 07/29/2015 06:32 AM, Thomas Gleixner wrote: > > On Wed, 29 Jul 2015, Taichi Kageyama wrote: > >> - Keep interrupt disabled on the CPU which is used to detect > >> an interrupt during the timeout of autoconfig_irq(). > >> + Kick printk() on the

Re: [RFC PATCH v2 0/3] genirq, serial: 8250: Workaround to avoid irq=0 for console

2015-07-29 Thread Peter Hurley
On 07/29/2015 06:32 AM, Thomas Gleixner wrote: > On Wed, 29 Jul 2015, Taichi Kageyama wrote: >> - Keep interrupt disabled on the CPU which is used to detect >> an interrupt during the timeout of autoconfig_irq(). >> + Kick printk() on the CPU which detects interrupt >>from a

Re: [RFC PATCH v2 0/3] genirq, serial: 8250: Workaround to avoid irq=0 for console

2015-07-29 Thread Thomas Gleixner
On Wed, 29 Jul 2015, Taichi Kageyama wrote: > - Keep interrupt disabled on the CPU which is used to detect > an interrupt during the timeout of autoconfig_irq(). > + Kick printk() on the CPU which detects interrupt >from a console serial port. This is wrong to begin with. How is

[RFC PATCH v2 0/3] genirq, serial: 8250: Workaround to avoid irq=0 for console

2015-07-29 Thread Taichi Kageyama
This patch set provides a workaround to avoid the following problem. It's based on Linux 4.2-rc4 mainstream kernel. I've tested this patch set on x86-64 machine and KVM. RFC -- During interrupt probing phase, irq affinity of candidate IRQs can be changed immediately and

Re: [RFC PATCH v2 0/3] genirq, serial: 8250: Workaround to avoid irq=0 for console

2015-07-29 Thread Taichi Kageyama
On 2015/07/29 22:35, Thomas Gleixner wrote: On Wed, 29 Jul 2015, Peter Hurley wrote: On 07/29/2015 07:53 AM, Thomas Gleixner wrote: On Wed, 29 Jul 2015, Peter Hurley wrote: On 07/29/2015 06:32 AM, Thomas Gleixner wrote: On Wed, 29 Jul 2015, Taichi Kageyama wrote: - Keep interrupt disabled on

[RFC PATCH v2 0/3] genirq, serial: 8250: Workaround to avoid irq=0 for console

2015-07-29 Thread Taichi Kageyama
This patch set provides a workaround to avoid the following problem. It's based on Linux 4.2-rc4 mainstream kernel. I've tested this patch set on x86-64 machine and KVM. RFC -- During interrupt probing phase, irq affinity of candidate IRQs can be changed immediately and

Re: [RFC PATCH v2 0/3] genirq, serial: 8250: Workaround to avoid irq=0 for console

2015-07-29 Thread Peter Hurley
On 07/29/2015 06:32 AM, Thomas Gleixner wrote: On Wed, 29 Jul 2015, Taichi Kageyama wrote: - Keep interrupt disabled on the CPU which is used to detect an interrupt during the timeout of autoconfig_irq(). + Kick printk() on the CPU which detects interrupt from a console serial

Re: [RFC PATCH v2 0/3] genirq, serial: 8250: Workaround to avoid irq=0 for console

2015-07-29 Thread Thomas Gleixner
On Wed, 29 Jul 2015, Peter Hurley wrote: On 07/29/2015 06:32 AM, Thomas Gleixner wrote: On Wed, 29 Jul 2015, Taichi Kageyama wrote: - Keep interrupt disabled on the CPU which is used to detect an interrupt during the timeout of autoconfig_irq(). + Kick printk() on the CPU which

Re: [RFC PATCH v2 0/3] genirq, serial: 8250: Workaround to avoid irq=0 for console

2015-07-29 Thread Thomas Gleixner
On Wed, 29 Jul 2015, Taichi Kageyama wrote: - Keep interrupt disabled on the CPU which is used to detect an interrupt during the timeout of autoconfig_irq(). + Kick printk() on the CPU which detects interrupt from a console serial port. This is wrong to begin with. How is that

Re: [RFC PATCH v2 0/3] genirq, serial: 8250: Workaround to avoid irq=0 for console

2015-07-29 Thread Peter Hurley
On 07/29/2015 07:53 AM, Thomas Gleixner wrote: On Wed, 29 Jul 2015, Peter Hurley wrote: On 07/29/2015 06:32 AM, Thomas Gleixner wrote: On Wed, 29 Jul 2015, Taichi Kageyama wrote: - Keep interrupt disabled on the CPU which is used to detect an interrupt during the timeout of

Re: [RFC PATCH v2 0/3] genirq, serial: 8250: Workaround to avoid irq=0 for console

2015-07-29 Thread Thomas Gleixner
On Wed, 29 Jul 2015, Peter Hurley wrote: On 07/29/2015 07:53 AM, Thomas Gleixner wrote: On Wed, 29 Jul 2015, Peter Hurley wrote: On 07/29/2015 06:32 AM, Thomas Gleixner wrote: On Wed, 29 Jul 2015, Taichi Kageyama wrote: - Keep interrupt disabled on the CPU which is used to detect an