All of lore.kernel.org
 help / color / mirror / Atom feed
From: ebiederm@xmission.com (Eric W. Biederman)
To: "Yinghai Lu" <yhlu.kernel@gmail.com>
Cc: "Ingo Molnar" <mingo@elte.hu>,
	"Thomas Gleixner" <tglx@linutronix.de>,
	"H. Peter Anvin" <hpa@zytor.com>,
	linux-kernel@vger.kernel.org,
	"Alan Cox" <alan@lxorguk.ukuu.org.uk>,
	"Andrew Morton" <akpm@linux-foundation.org>
Subject: Re: [PATCH 00/53] dyn_array/nr_irqs/sparse_irq support v10
Date: Thu, 14 Aug 2008 18:09:32 -0700	[thread overview]
Message-ID: <m1vdy36q43.fsf@frodo.ebiederm.org> (raw)
In-Reply-To: <86802c440808141749l626d59e6h888b802343916df3@mail.gmail.com> (Yinghai Lu's message of "Thu, 14 Aug 2008 17:49:31 -0700")

"Yinghai Lu" <yhlu.kernel@gmail.com> writes:

> On Thu, Aug 14, 2008 at 5:11 PM, Eric W. Biederman
> <ebiederm@xmission.com> wrote:
>> "Yinghai Lu" <yhlu.kernel@gmail.com> writes:
>>
>>> find something interesting:
>>>
>>> found new irq_cfg for irq 20
>>>  0 add_pin_to_irq: irq 20 --> apic 0 pin 20
>>> assign_irq_vector: irq 20 vector 0x59 cpu  5
>>> IOAPIC[0]: Set routing entry (0-20 -> 0x59 -> IRQ 20 Mode:1 Active:1)
>>> found new irq_desc for irq 20
>>> pci 0000:00:02.1: PCI INT B -> Link[LUS2] -> GSI 20 (level, low) -> IRQ 20
>>>
>>> IO APIC #0......
>>> .... register #00: 00000000
>>> .......    : physical APIC id: 00
>>> .......    : Delivery Type: 0
>>> .......    : LTS          : 0
>>> .... register #01: 00170011
>>> .......     : max redirection entries: 0017
>>> .......     : PRQ implemented: 0
>>> .......     : IO APIC version: 0011
>>> .... register #02: 00000000
>>> .......     : arbitration: 00
>>> .... IRQ redirection table:
>>>  NR Dst Mask Trig IRR Pol Stat Dmod Deli Vect:
>>> ...
>>>  14 09  1    1    0   1   0    0    0    59
>>> ...
>>>
>>> ehci_hcd 0000:00:02.1: USB 2.0 started, EHCI 1.00, driver 10 Dec 2004
>>> do_IRQ: cannot handle IRQ -1 vector 0x59 cpu 0
>>> ------------[ cut here ]------------
>>> Kernel BUG at 40206b11 [verbose debug info unavailable]
>>> invalid opcode: 0000 [#1] SMP
>>> Modules linked in:
>>>
>>> Pid: 70, comm: kasyncinit Not tainted (2.6.27-rc3-tip-00191-g98ccb89-dirty
> #23)
>>> EIP: 0060:[<40206b11>] EFLAGS: 00010092 CPU: 0
>>> EIP is at do_IRQ+0x6b/0xae
>>> EAX: 00000032 EBX: 00001d28 ECX: 00003434 EDX: 00000046
>>> ESI: 00000000 EDI: 00000059 EBP: c7a37d3c ESP: c7a37d14
>>>  DS: 007b ES: 007b FS: 00d8 GS: 0000 SS: 0068
>>> Process kasyncinit (pid: 70, ti=c7a36000 task=c79c9860 task.ti=c7a36000)
>>> Stack: 40a74317 40814ea0 ffffffff 00000059 00000000 00000000 ffffffff
> c421bd20
>>> c7a37d9c c7a37dac c7a37d7c 4020555f c421bd20 00000000 c421bd20 c7a37d9c
>>> c7a37dac c7a37d7c 40b717f8 0000007b 0000007b 000000d8 ffffffa6 4080db6c
>>> Call Trace:
>>>  [<4020555f>] ? common_interrupt+0x23/0x28
>>>
>>>
>>> it is on 16cores system with 32bit bigsmp, so it is using phy_flat
>>> cpu 5 has apicid 9, and ioapic reg setting right with Dmod= 0 ( phys)
>>>
>>> but io_apic controller deliver that interrupt to cpu0 (with apicid =
>>> 4) instead of cpu 5 (with apic id = 9)
>>>
>>> look at the 64 bit, TARGET_CPUS for phys_flat is cpu_online_map
>>>
>>> and 32bit bigsmp TARGET_CPUS is only one cpu set and rotating with online
> cpu...
>>>
>>> Change 32bit bigsmp TARGE_CPUS ?
>>
>> Set vector_allocation_domain to CPU_MASK_ALL on 32bit.  That doesn't give us
>> the benefit of per cpu vectors right now, but in my research there has not
>> been a 32bit kernel yet that has needed it.  We have never shared vectors
>> between 2 gsi on 32bit x86, we have only collapsed the irq space.
>
> TARGET_CPUS only used by ioapic_xx.c
>
> vector_allocator_domain will return cpumask_of_cpu(cpu)..

Note: Only vector_allocation_domain matters.  That is where
we setup the irq to be received.  TARGET_CPUS is just a request
to send the irq to someplace in that mask.

Eric

  parent reply	other threads:[~2008-08-15  1:13 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1218705441-21838-1-git-send-email-yhlu.kernel@gmail.com>
2008-08-14 13:26 ` [PATCH 00/53] dyn_array/nr_irqs/sparse_irq support v10 Ingo Molnar
2008-08-14 13:31   ` [PATCH] irq: sparse irqs, fix Ingo Molnar
2008-08-14 13:36   ` [PATCH] irq: sparse irqs, fix #2 Ingo Molnar
2008-08-14 16:33     ` Andrew Morton
2008-08-14 17:03       ` Eric W. Biederman
2008-08-14 13:53   ` [PATCH] irq: sparse irqs, fix IRQ auto-probe crash Ingo Molnar
2008-08-14 13:57   ` [PATCH] irq: sparse irqs, export nr_irqs Ingo Molnar
2008-08-14 14:07   ` [PATCH] irq: sparse irqs, fix #3 Ingo Molnar
2008-08-14 17:34     ` Yinghai Lu
2008-08-14 19:01   ` [PATCH 00/53] dyn_array/nr_irqs/sparse_irq support v10 Yinghai Lu
2008-08-14 20:05     ` Eric W. Biederman
2008-08-14 20:42       ` Yinghai Lu
2008-08-14 21:24         ` Yinghai Lu
2008-08-15  0:11           ` Eric W. Biederman
2008-08-15  0:49             ` Yinghai Lu
2008-08-15  1:01               ` Eric W. Biederman
2008-08-15  1:41                 ` Yinghai Lu
2008-08-15  2:33                   ` Eric W. Biederman
2008-08-15  1:09               ` Eric W. Biederman [this message]
2008-08-14 23:55         ` Eric W. Biederman
2008-08-15 12:18     ` Ingo Molnar
2008-08-29 21:16   ` Andrew Morton
2008-08-29 21:43     ` Yinghai Lu
2008-08-29 21:49       ` Andrew Morton
2008-08-29 21:54         ` Yinghai Lu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m1vdy36q43.fsf@frodo.ebiederm.org \
    --to=ebiederm@xmission.com \
    --cc=akpm@linux-foundation.org \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=tglx@linutronix.de \
    --cc=yhlu.kernel@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.