mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Shijith Thotton <sthotton@marvell.com>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: Julien Thierry <julien.thierry@arm.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-arm-kernel@lists.infradead.org" 
	<linux-arm-kernel@lists.infradead.org>,
	Catalin Marinas <catalin.marinas@arm.com>,
	Will Deacon <will.deacon@arm.com>,
	"Jayachandran Chandrasekharan Nair" <jnair@marvell.com>,
	Ganapatrao Kulkarni <gkulkarni@marvell.com>,
	Jan Glauber <jglauber@marvell.com>,
	Robert Richter <rrichter@marvell.com>
Subject: Re: [PATCH] genirq: update irq stats from NMI handlers
Date: Thu, 4 Jul 2019 16:31:34 +0000	[thread overview]
Message-ID: <47489142-b040-ec54-a1ac-46f0a8799ed9@marvell.com> (raw)
In-Reply-To: <alpine.DEB.2.21.1907041818360.1802@nanos.tec.linutronix.de>



On 7/4/19 9:19 AM, Thomas Gleixner wrote:
> On Thu, 4 Jul 2019, Shijith Thotton wrote:
>> On 7/4/19 12:13 AM, Julien Thierry wrote:
>>> Looking at handle_percpu_irq(), I think this might be acceptable. But
>>> does it make sense to only have kstats for percpu NMIs?
>>>
>>
>> It would be better to have stats for both.
>>
>> handle_fasteoi_nmi() can use __kstat_incr_irqs_this_cpu() if below
>> change can be added to kstat_irqs_cpu().
>>
>> diff --git a/kernel/irq/irqdesc.c b/kernel/irq/irqdesc.c
>> index a92b33593b8d..9484e88dabc2 100644
>> --- a/kernel/irq/irqdesc.c
>> +++ b/kernel/irq/irqdesc.c
>> @@ -950,6 +950,11 @@ unsigned int kstat_irqs_cpu(unsigned int irq, int cpu)
>>                           *per_cpu_ptr(desc->kstat_irqs, cpu) : 0;
>>    }
>>
>> +static bool irq_is_nmi(struct irq_desc *desc)
>> +{
>> +       return desc->istate & IRQS_NMI;
>> +}
>> +
>>    /**
>>     * kstat_irqs - Get the statistics for an interrupt
>>     * @irq:       The interrupt number
>> @@ -967,7 +972,8 @@ unsigned int kstat_irqs(unsigned int irq)
>>           if (!desc || !desc->kstat_irqs)
>>                   return 0;
>>           if (!irq_settings_is_per_cpu_devid(desc) &&
>> -           !irq_settings_is_per_cpu(desc))
>> +           !irq_settings_is_per_cpu(desc) &&
>> +           !irq_is_nmi(desc))
>>               return desc->tot_count;
>>
>>           for_each_possible_cpu(cpu)
>>
>>
>> Thomas,
>> Please suggest a better way if any.
> 
> Looks good.
> 

Thanks Thomas. Will share v2 with the changes.

Thanks,
Shijith

  reply	other threads:[~2019-07-04 16:31 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-04  4:22 Shijith Thotton
2019-07-04  7:13 ` Julien Thierry
2019-07-04 10:36   ` Shijith Thotton
2019-07-04 16:19     ` Thomas Gleixner
2019-07-04 16:31       ` Shijith Thotton [this message]
2019-07-05  7:56 ` [PATCH v2] " Shijith Thotton
2019-07-06  8:43   ` [tip:irq/core] genirq: Update " tip-bot for Shijith Thotton

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=47489142-b040-ec54-a1ac-46f0a8799ed9@marvell.com \
    --to=sthotton@marvell.com \
    --cc=catalin.marinas@arm.com \
    --cc=gkulkarni@marvell.com \
    --cc=jglauber@marvell.com \
    --cc=jnair@marvell.com \
    --cc=julien.thierry@arm.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rrichter@marvell.com \
    --cc=tglx@linutronix.de \
    --cc=will.deacon@arm.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 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®