LKML Archive on
 help / Atom feed
From: Dou Liyang <>
To: Thomas Gleixner <>
Cc: LKML <>,
	Ingo Molnar <>,
	Peter Zijlstra <>,
	Borislav Petkov <>,
	Dmitry Safonov <>,
	Tariq Toukan <>,
	Song Liu <>, Joerg Roedel <>,
	Mike Travis <>, <>
Subject: Re: [patch 3/8] x86/apic: Provide apic_ack_irq()
Date: Wed, 6 Jun 2018 11:48:55 +0800
Message-ID: <> (raw)
In-Reply-To: <>

Hi Thomas,

At 06/05/2018 07:41 PM, Thomas Gleixner wrote:
> On Tue, 5 Jun 2018, Dou Liyang wrote:
>>> +{
>>> +	if (unlikely(irqd_is_setaffinity_pending(irqd)))
>> Affinity pending is also judged in
>>> +		irq_move_irq(irqd);
>> If we can remove the if(...) statement here
> That requires to fix all call sites in ia64 and that's why I didn't.  But

I didn't express clearly, I meant remove the if(...) statement from
apic_ack_irq(), it doesn't require to fix the call sites in ia64.

+void apic_ack_irq(struct irq_data *irqd)
+	irq_move_irq(irqd);
+	ack_APIC_irq();

BTW, If apic_ack_irq() can accept _any_ irq_data when hierarchical
irqdomains are enabled[1]? If it is true, If there is a situation in
the original code that we should avoid:

   If the top-level irq_data has the IRQD_SETAFFINITY_PENDING state, but
   non-top-level irq_data state not, when using non-top-level irq_data in
   apic_ack_irq(), we may skip the irq_move_irq() which we should call.

[1] commit 77ed42f18edd("genirq: Prevent crash in irq_move_irq()")

> we can make irq_move_irq() an inline function and have the check in the
> inline.

I don't know why do we need to make irq_move_irq() an inline function.

And, yes, irq_move_irq() has already had the check

   	if (likely(!irqd_is_setaffinity_pending(idata)))


  reply index

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-04 15:33 Thomas Gleixner
2018-06-05  7:07 ` Song Liu
2018-06-05 11:31 ` Dou Liyang
2018-06-05 11:41   ` Thomas Gleixner
2018-06-06  3:48     ` Dou Liyang [this message]
2018-06-06  8:04       ` Thomas Gleixner
2018-06-06  8:18         ` Dou Liyang
2018-06-06 13:31 ` [tip:x86/urgent] genirq/migration: Avoid out of line call if pending is not set tip-bot for Thomas Gleixner
2018-06-06 13:32 ` [tip:x86/urgent] x86/apic: Provide apic_ack_irq() tip-bot for Thomas Gleixner

Reply instructions:

You may reply publically 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:

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

  git send-email \ \ \ \ \ \ \ \ \ \ \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

LKML Archive on

Archives are clonable:
	git clone --mirror lkml/git/0.git
	git clone --mirror lkml/git/1.git
	git clone --mirror lkml/git/2.git
	git clone --mirror lkml/git/3.git
	git clone --mirror lkml/git/4.git
	git clone --mirror lkml/git/5.git
	git clone --mirror lkml/git/6.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 lkml lkml/ \
	public-inbox-index lkml

Newsgroup available over NNTP:

AGPL code for this site: git clone public-inbox