From: Joe Korty <joe.korty@ccur.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Sven-Thorsten Dietrich <sdietrich@novell.com>,
"H. Peter Anvin" <hpa@zytor.com>,
mingo@elte.hu, tglx@linutronix.de,
linux-rt-users@vger.kernel.org, linux-kernel@vger.kernel.org,
jason.baietto@ccur.com
Subject: Re: [PATCH] create /proc/all-interrupts
Date: Mon, 30 Jul 2007 15:42:06 -0400 [thread overview]
Message-ID: <20070730194206.GA17509@tsunami.ccur.com> (raw)
In-Reply-To: <20070730123206.abeab890.akpm@linux-foundation.org>
On Mon, Jul 30, 2007 at 12:32:06PM -0700, Andrew Morton wrote:
> On Mon, 30 Jul 2007 10:33:17 -0700
> Sven-Thorsten Dietrich <sdietrich@novell.com> wrote:
> > On Thu, 2007-07-26 at 11:56 -0700, H. Peter Anvin wrote:
> > > Joe Korty wrote:
> > > > Create /proc/all-interrupts for some architectures.
> > Would it make sense to drop this patch into -mm for feedback?
> >
>
> It's a lot of code for something which might be useful to someone sometime.
>
> It's a bit of a crappy changelog too. I'd at least like to see a list of
> all the new fields.
>
> It should be OK to add new lines to /proc/interrupts? That file varies a
> lot between machines adn between architectures - as long as the new lines
> have similar layout it is unlikely that anything will break.
>
> + atomic_inc(&__get_cpu_var(irq_thermal_counts));
>
> The patch does atomic ops on cpu-local variables. This isn't needed, and
> is expensive.
>
> If the field is only ever modified from hard interrupt context then you can
> make the field unsigned long and use plain old `foo++'.
>
> If the field is modified from both hard-IRQ and from non-IRQ then use a
> local_t and local_inc.
>
> Or even, given that this is just a statistic and grrat precision is not
> needed, use unsigned long and f++ even if that _is_ racy. Because the
> consequences of a race will just be a single lost count, which we dont'
> care about enough to add the additional overhead of an atomic op.
Hi Andrew,
Thanks for the comments. I'll, at least, make the changes you suggested.
(the /proc/interrupts version has the benefit of being smaller too).
Joe
next prev parent reply other threads:[~2007-07-30 19:43 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-26 18:05 [PATCH] create /proc/all-interrupts Joe Korty
2007-07-26 18:56 ` H. Peter Anvin
2007-07-30 17:33 ` Sven-Thorsten Dietrich
2007-07-30 19:32 ` Andrew Morton
2007-07-30 19:42 ` Joe Korty [this message]
2007-07-31 0:17 ` [PATCH] expand /proc/interrupts to include missing vectors, v2 Joe Korty
2007-07-31 0:48 ` Gabriel C
2007-07-31 1:48 ` Andrew Morton
2007-07-31 14:19 ` [PATCH] expand /proc/interrupts to include missing vectors, v3 Joe Korty
2007-07-31 17:02 ` Andi Kleen
2007-07-31 20:29 ` Joe Korty
2007-07-31 21:06 ` [PATCH] expand /proc/interrupts to include missing vectors, v4 Joe Korty
2007-08-01 13:29 ` [PATCH] expand /proc/interrupts to include missing vectors, v2 Lennart Sorensen
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=20070730194206.GA17509@tsunami.ccur.com \
--to=joe.korty@ccur.com \
--cc=akpm@linux-foundation.org \
--cc=hpa@zytor.com \
--cc=jason.baietto@ccur.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rt-users@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=sdietrich@novell.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.