linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dou Liyang <douly.fnst@cn.fujitsu.com>
To: Thomas Gleixner <tglx@linutronix.de>,
	LKML <linux-kernel@vger.kernel.org>
Cc: Ingo Molnar <mingo@kernel.org>,
	Peter Zijlstra <peterz@infradead.org>,
	Borislav Petkov <bp@alien8.de>,
	Dmitry Safonov <0x7f454c46@gmail.com>,
	Tariq Toukan <tariqt@mellanox.com>,
	Song Liu <liu.song.a23@gmail.com>, Joerg Roedel <jroedel@suse.de>,
	Mike Travis <mike.travis@hpe.com>, <stable@vger.kernel.org>
Subject: Re: [patch 3/8] x86/apic: Provide apic_ack_irq()
Date: Tue, 5 Jun 2018 19:31:11 +0800	[thread overview]
Message-ID: <94117bd8-352b-1077-e8ae-8722d7ec213f@cn.fujitsu.com> (raw)
In-Reply-To: <20180604162224.471925894@linutronix.de>

Hi Thomas,

At 06/04/2018 11:33 PM, Thomas Gleixner wrote:
> apic_ack_edge() is explicitely for handling interrupt affinity cleanup when
> interrupt remapping is not available or disable.
> 
> Remapped interrupts and also some of the platform specific special
> interrupts, e.g. UV, invoke ack_APIC_irq() directly.
> 
> To address the issue of failing an affinity update with -EBUSY the delayed
> affinity mechanism can be reused, but ack_APIC_irq() does not handle
> that. Adding this to ack_APIC_irq() is not possible, because that function
> is also used for exceptions and directly handled interrupts like IPIs.
> 
> Create a new function, which just contains the conditional invocation of
> irq_move_irq() and the final ack_APIC_irq(). Making the invocation of
> irq_move_irq() conditional avoids the out of line call if the pending bit
> is not set.
> 
> Reuse the new function in apic_ack_edge().
> 
> Preparatory change for the real fix
> 
> Fixes: dccfe3147b42 ("x86/vector: Simplify vector move cleanup")
> Signed-off-by: Thomas Gleixner<tglx@linutronix.de>
> Cc:stable@vger.kernel.org
> ---
>   arch/x86/include/asm/apic.h   |    2 ++
>   arch/x86/kernel/apic/vector.c |   10 ++++++++--
>   2 files changed, 10 insertions(+), 2 deletions(-)
> 
> --- a/arch/x86/include/asm/apic.h
> +++ b/arch/x86/include/asm/apic.h
> @@ -436,6 +436,8 @@ static inline void apic_set_eoi_write(vo
>   
>   #endif /* CONFIG_X86_LOCAL_APIC */
>   
> +extern void apic_ack_irq(struct irq_data *data);
> +
>   static inline void ack_APIC_irq(void)
>   {
>   	/*
> --- a/arch/x86/kernel/apic/vector.c
> +++ b/arch/x86/kernel/apic/vector.c
> @@ -809,11 +809,17 @@ static int apic_retrigger_irq(struct irq
>   	return 1;
>   }
>   
> +void apic_ack_irq(struct irq_data *irqd)
> +{
> +	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

Thanks,
	dou

> +	ack_APIC_irq();
> +}
> +
>   void apic_ack_edge(struct irq_data *irqd)
>   {
>   	irq_complete_move(irqd_cfg(irqd));
> -	irq_move_irq(irqd);
> -	ack_APIC_irq();
> +	apic_ack_irq(irqd);
>   }
>   
>   static struct irq_chip lapic_controller = {

  parent reply	other threads:[~2018-06-05 11:31 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-04 15:33 [patch 3/8] x86/apic: Provide apic_ack_irq() Thomas Gleixner
2018-06-05  7:07 ` Song Liu
2018-06-05 11:31 ` Dou Liyang [this message]
2018-06-05 11:41   ` Thomas Gleixner
2018-06-06  3:48     ` Dou Liyang
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 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=94117bd8-352b-1077-e8ae-8722d7ec213f@cn.fujitsu.com \
    --to=douly.fnst@cn.fujitsu.com \
    --cc=0x7f454c46@gmail.com \
    --cc=bp@alien8.de \
    --cc=jroedel@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=liu.song.a23@gmail.com \
    --cc=mike.travis@hpe.com \
    --cc=mingo@kernel.org \
    --cc=peterz@infradead.org \
    --cc=stable@vger.kernel.org \
    --cc=tariqt@mellanox.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;
as well as URLs for NNTP newsgroup(s).