From: Thomas Gleixner <tglx@linutronix.de>
To: Craig Gallek <kraigatgoog@gmail.com>
Cc: Randy Dunlap <rdunlap@infradead.org>,
David Decotigny <decot@google.com>,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v3] genirq: Machine-parsable version of /proc/interrupts
Date: Fri, 9 Sep 2016 14:39:54 +0200 (CEST) [thread overview]
Message-ID: <alpine.DEB.2.20.1609091438470.5679@nanos> (raw)
In-Reply-To: <CAEfhGixi3BY5btXkowdNkCruxhiXSDGWOaFcdLV033_cmO2Kxg@mail.gmail.com>
On Thu, 8 Sep 2016, Craig Gallek wrote:
> On Thu, Sep 8, 2016 at 6:00 PM, Randy Dunlap <rdunlap@infradead.org> wrote:
> > On 09/08/16 13:25, Craig Gallek wrote:
> >> From: Craig Gallek <kraig@google.com>
> >>
> >> Add struct kobject to struct irq_desc to allow for easy export
> >> to sysfs. This allows for much simpler userspace-parsing of
> >> the information contained in struct irq_desc.
> >>
> >> Note that sysfs is not available at the time of early irq initialization.
> >> These interrupts are accounted for using a postcore_initcall callback.
> >>
> >> Examples:
> >> /sys/kernel/irq/18/actions: i801_smbus,ehci_hcd:usb1,uhci_hcd:usb7
> >> /sys/kernel/irq/18/chip_name: IR-IO-APIC
> >> /sys/kernel/irq/18/hwirq: 18
> >> /sys/kernel/irq/18/name: fasteoi
> >> /sys/kernel/irq/18/per_cpu_count: 0,0
> >> /sys/kernel/irq/18/type: level
> >>
> >> /sys/kernel/irq/25/actions: ahci0
> >> /sys/kernel/irq/25/chip_name: IR-PCI-MSI
> >> /sys/kernel/irq/25/hwirq: 512000
> >> /sys/kernel/irq/25/name: edge
> >> /sys/kernel/irq/25/per_cpu_count: 29036,0
> >> /sys/kernel/irq/25/type: edge
> >
> > Thanks for the update.
> >
> > One concern:
> >
> > This per_cpu_count is for online CPUs only.
> > How does this help when the online CPUs change?
> >
> > E.g., above could be for CPUs 1 and 5.
> > The next time that it is read it could be for CPUs 0 and 3.
> > Seems that it could be confusing even for software reading it.
>
> Thanks for the feedback. I imagine most use cases for this will simply
> add up all the values to obtain a total. There's not a lot of use for
> the individual elements unless you additionally know something about
> the CPU id layout, interrupt pinning, and/or CPU online state. The
> /proc/interrupts interface has this same issue, but additionally uses
> column headers. There's really know way to give a similar consistent
> view of all of this data using multiple sysfs files. Given this lack
> of atomicity, across files, I don't think it's unreasonable for the
> counter order to change when the system's online CPUs change.
Can you please spell that out in the documentation?
Thanks,
tglx
next prev parent reply other threads:[~2016-09-09 12:42 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-26 14:25 [PATCH RESEND] " Craig Gallek
2016-08-10 15:26 ` Craig Gallek
2016-09-02 13:52 ` Thomas Gleixner
2016-09-02 14:59 ` Thomas Gleixner
2016-09-06 20:55 ` Craig Gallek
2016-09-09 6:15 ` Thomas Gleixner
2016-09-08 17:34 ` [PATCH v2] " Craig Gallek
2016-09-08 17:57 ` Randy Dunlap
2016-09-08 20:25 ` [PATCH v3] " Craig Gallek
2016-09-08 22:00 ` Randy Dunlap
2016-09-08 22:15 ` Craig Gallek
2016-09-09 12:39 ` Thomas Gleixner [this message]
2016-09-09 16:28 ` [PATCH v4] " Craig Gallek
2016-09-09 23:19 ` Thomas Gleixner
2016-09-12 14:12 ` [PATCH v5] " Craig Gallek
2016-09-13 14:50 ` Thomas Gleixner
2016-09-13 16:14 ` [PATCH v6] " Craig Gallek
2016-09-14 13:34 ` [tip:irq/core] genirq: Expose interrupt information through sysfs tip-bot for Craig Gallek
2016-09-14 13:36 ` [PATCH v6] genirq: Machine-parsable version of /proc/interrupts Thomas Gleixner
2016-09-14 13:59 ` Craig Gallek
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=alpine.DEB.2.20.1609091438470.5679@nanos \
--to=tglx@linutronix.de \
--cc=decot@google.com \
--cc=kraigatgoog@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=rdunlap@infradead.org \
/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®