linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jiang Liu <liuj97@gmail.com>
To: Bjorn Helgaas <bhelgaas@google.com>
Cc: Yevgeny Petrilin <yevgenyp@mellanox.co.il>,
	linux-pci@vger.kernel.org, Thomas Gleixner <tglx@linutronix.de>,
	linux-kernel@vger.kernel.org
Subject: Re: IRQ affinity enforced only after first interrupt.
Date: Mon, 26 Mar 2012 22:33:29 +0800	[thread overview]
Message-ID: <4F707E39.50502@gmail.com> (raw)
In-Reply-To: <CAErSpo7ciBYG1-jCL3F6bFcktmJj4H-SXn_1NcRnhc-gPDsHUw@mail.gmail.com>

The architecture specific code will determine whether the IRQ could be migrated
in process context. For example, the IRQ_MOVE_PCNTXT flag will be set on x86
systems if interrupt remapping is enabled.

On 03/26/2012 10:28 PM, Bjorn Helgaas wrote:
> [This is not really a PCI question, so +cc Thomas, LKML.]
> 
> On Mon, Mar 26, 2012 at 3:06 AM, Yevgeny Petrilin
> <yevgenyp@mellanox.co.il> wrote:
>> Hello,
>>
>> I'm working on an issue where affinity changes to IRQ only have effect after the first interrupt which still happens on the original core.
>> I understand that the decision regarding it takes place in this code:
>>
>>        if (irq_can_move_pcntxt(data)) {
>>                ret = chip->irq_set_affinity(data, mask, false);
>>                switch (ret) {
>>                case IRQ_SET_MASK_OK:
>>                        cpumask_copy(data->affinity, mask);
>>                case IRQ_SET_MASK_OK_NOCOPY:
>>                        irq_set_thread_affinity(desc);
>>                        ret = 0;
>>                }
>>        } else {
>>                irqd_set_move_pending(data);
>>                irq_copy_pending(desc, mask);
>>        }
>>
>> Which means that the "IRQD_MOVE_PCNTXT" flag is not set in irq_data->state_use_accessors.
>> I was able to add this flag using irq_modify_status(), which is probably not the way to go.
>> This option also doesn't exist in older kernels (2.6.32)
>>
>> So the question is, when irq_desc is created, how is it determined that "IRQD_MOVE_PCNTXT" flag is set?
>>
>> Thanks,
>> Yevgeny
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-pci" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> --
> To unsubscribe from this list: send the line "unsubscribe linux-pci" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html


  reply	other threads:[~2012-03-26 14:33 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-26  9:06 IRQ affinity enforced only after first interrupt Yevgeny Petrilin
2012-03-26 14:28 ` Bjorn Helgaas
2012-03-26 14:33   ` Jiang Liu [this message]
2012-03-26 15:24     ` Yevgeny Petrilin
2012-03-26 19:04       ` Thomas Gleixner
2012-03-27  9:39         ` Yevgeny Petrilin
2012-03-27 12:52           ` Thomas Gleixner
2012-04-04 10:01         ` Alexander Gordeev
2012-04-05  8:47           ` Thomas Gleixner

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=4F707E39.50502@gmail.com \
    --to=liuj97@gmail.com \
    --cc=bhelgaas@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=tglx@linutronix.de \
    --cc=yevgenyp@mellanox.co.il \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).