From: Andrew Morton <akpm@osdl.org>
To: Martin Peschke3 <MPESCHKE@de.ibm.com>
Cc: linux-kernel@vger.kernel.org, mschwid2@de.ibm.com
Subject: Re: [patch 1/14] s390: statistics infrastructure.
Date: Mon, 31 Oct 2005 11:16:59 -0800 [thread overview]
Message-ID: <20051031111659.14fdc055.akpm@osdl.org> (raw)
In-Reply-To: <OFF65B1AC3.67015638-ONC12570AB.00340CB7-C12570AB.0054A095@de.ibm.com>
Martin Peschke3 <MPESCHKE@de.ibm.com> wrote:
>
> Andrew,
>
> > I agree with Christoph on this: please present it as a Kconfigurable
> > generic option
>
> Sure. Scanning through the kernel configuration with menuconfig, I see
> several options:
> general setup,
> library routines,
> profiling support,
> device drivers (the most obvious potential exploiters,
> though not the only ones),
> kernel hacking.
> Please advise.
Nothing really fits, does it.
There is a patch in -mm which moves oprofile and kprobes into a new
"instrumentation" menu.
ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.14-rc5/2.6.14-rc5-mm1/broken-out/moving-kprobes-and-oprofile-to-instrumentation-support-menu.patch
I held off on merging that because the oprofile guys asked "why bother". I
guess the statistics infrastructure answers that question. I'll send it
on.
>
> ...
>
> > (If we end up deciding to keep all this in arch/s390 then I guess
> > we can live with s390 peculiarities though)
>
> I will be happy to see some feature like this included outside arch/s390.
> What is about lib/, or kernel/?
lib/, I guess.
It could concievably go in fs/debugfs, depending upon how tightly coupled
it is to debugfs.
> > > + list_for_each_entry(seg, &rb->seg_lh, list)
> > > + break;
> >
> > eh? Something's gone rather wrong here.
>
> Intention here is to find the entry at the list's head.
> Should work, though it might look fishy at first sight.
> A substitute for this construct would look like this:
>
> seg = list_entry(rb->seg_lh.next, struct sgrb_seg, list);
>
> I don't feel very comfortably messing with pointers inside struct
> list_head. I know many people don't object. But IMHO the next and prev
> pointers look like implementation specifics of list heads that are nicely
> abstracted away for almost any purpose by list_for_each() and friends -
> with the exception of something like the above.
>
> Anyway, I will change these and similar lines if you want me to.
Yes, we do poke inside list_head a lot and yes, it does feel a bit wrong.
Do whatever you think is best here. A little explanatory comment would
help.
> > > +/**
> > > + * sgrb_produce_nooverwrite - put an entry into the ringbuffer
> > > + * if there is room whithout the need to overwrite the oldest
> >
> > spello
>
> Thanks. Will fix it along with a few more that have gone unnoticed so far.
I noticed that there was a /* in there somewhere where a kerneldoc /** was
intended.
> I don't think it would be beneficial to do locking inside these
> functions, because exploiters most likely do some locking anyway.
Yes, caller-provided locking is superior.
> ...
> > Can you help us decide whether there's actually any point in making
> > it generic?
> > What problems was it designed to solve, and what additional
> > problems might it all be useful for?
>
> I am convinced that its worthwile to provide some statictics facility
> for any device driver programmer or whoever thinks about implementing
> statistics for his devices or algorithms.
OK, thanks. Let's take a closer look at the actual facilities in the next
iteration.
next prev parent reply other threads:[~2005-10-31 19:17 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-10-31 14:15 [patch 1/14] s390: statistics infrastructure Martin Peschke3
2005-10-31 19:16 ` Andrew Morton [this message]
-- strict thread matches above, loose matches on Subject: below --
2005-10-31 20:44 Martin Peschke3
2005-10-31 9:36 Martin Peschke3
2005-10-28 14:06 Martin Schwidefsky
2005-10-28 18:08 ` Christoph Hellwig
2005-10-31 8:40 ` Andrew Morton
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=20051031111659.14fdc055.akpm@osdl.org \
--to=akpm@osdl.org \
--cc=MPESCHKE@de.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mschwid2@de.ibm.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