mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jiang Liu <jiang.liu@linux.intel.com>
To: Thomas Gleixner <tglx@linutronix.de>,
	Mika Westerberg <mika.westerberg@linux.intel.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: CPU hotplug and chained interrupts on x86
Date: Fri, 2 Oct 2015 01:07:28 +0800	[thread overview]
Message-ID: <560D6850.10504@linux.intel.com> (raw)
In-Reply-To: <alpine.DEB.2.11.1510011625000.4500@nanos>

On 2015/10/1 22:31, Thomas Gleixner wrote:
> On Thu, 1 Oct 2015, Mika Westerberg wrote:
>> Now if I plug/unplug the card I may get few interrupts to CPU0 but rest
>> of the interrupts never happen. Probably because IO-APIC forwards them
>> to the lowest priority CPU which is offline at this point.
>>
>> There is following check in fixup_irqs():
>>
>> 	if (!irq_has_action(irq) || irqd_is_per_cpu(data) ||
>> 	    cpumask_subset(affinity, cpu_online_mask)) {
>> 		raw_spin_unlock(&desc->lock);
>> 		continue;
>> 	}   
>>
>> If an interrupt is requested by a driver it will force new affinity and
>> everything works fine. However if the interrupt is chained (it does not
>> have ->action) this is skipped and the current affinity remains.
>>
>> We could detect here if the interrupt is chained but there seems to be
>> no easy way to determine it currently so we would need to add a new flag
>> to desc->status_use_accessors that gets set in __irq_do_set_handler()
>> when is_chained is 1.
> 
> Either there or in irq_data. Need to look at it in detail.
Currently  we have no flag for chained, I suggested to add one dedicated
flag for it.

>  
>> Alternative I could implement ->irq_set_affinity() in the GPIO driver in
>> question [1] which always calls directly parent chip's ->irq_set_affinity()
>> but I'm not sure if that is allowed.
> 
> I rather prefer to avoid that.
We should report chained state and parent irq, so user and irqbalance
may make smarter decision based on those info.
Thanks!
Gerry

> 
> Thanks,
> 
> 	tglx
> 

  reply	other threads:[~2015-10-01 17:09 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-01 14:21 Mika Westerberg
2015-10-01 14:31 ` Thomas Gleixner
2015-10-01 17:07   ` Jiang Liu [this message]
2015-10-01 21:45   ` Thomas Gleixner
2015-10-02  4:58     ` Mika Westerberg

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=560D6850.10504@linux.intel.com \
    --to=jiang.liu@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mika.westerberg@linux.intel.com \
    --cc=tglx@linutronix.de \
    /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

all inboxes | Powered by JetHome®