From: Dipankar Sarma <dipankar@in.ibm.com>
To: akpm@digeo.com
Cc: Rick Lindsley <ricklind@us.ibm.com>,
linux-kernel@vger.kernel.org,
Ravikiran G Thirumalai <kiran@in.ibm.com>
Subject: Re: [RFC][PATCH] sard changes for 2.5.34
Date: Fri, 13 Sep 2002 17:09:43 +0530 [thread overview]
Message-ID: <20020913170943.A11038@in.ibm.com> (raw)
In article <3D80EE1D.34AF4FF2@digeo.com> Andrew Morton wrote:
> Rick Lindsley wrote:
>> Regardless of which route we go, can you suggest a good exercise to
>> demonstrate the advantage of per-cpu counters? It seems intuitive to
>> me, but I'm much more comfortable when I have numbers to back me up.
> I don't think this is enough to justify a new subsystem like
> statctr_t (struct statctr, please).
statctr_t was originally used to hide the fact that in UP kernels
it reduces to unsigned long. But I think that was not necessary -
#ifdef CONFIG_SMP
struct statctr {
unsigned long ctr;
};
#else
struct statctr {
unsigned long *ctr;
};
#endif
struct disk_stats {
....
....
struct statctr nr_reads;
};
I would presume that for UP kernels,
static inline void statctr_inc(struct statctr *stctr)
{
(stctr->ctr)++;
}
statctr_inc(&disk_stats.nr_reads) would generate the same code
as diskstats.nr_reads++; We will verify this and remove statctr_t.
I think justifying statctrs based on numbers from one single usage will
likely be difficult. Our measurements (e.g. net_device_stats and
cache event profiling with kernprof) showed that while cache misses
in those routines are reduced significantly, it isn't enough to make
an impact in the benchmark throughput. We need to adopt statctrs
in many subsystems. Perhaps that will show some benefits specially
on higher-end hardware (16CPU+).
Since we are beginning to run linux on such hardware, why not adopt a simple
framework now ?
Thanks
--
Dipankar Sarma <dipankar@in.ibm.com> http://lse.sourceforge.net
Linux Technology Center, IBM Software Lab, Bangalore, India.
next reply other threads:[~2002-09-13 11:29 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-09-13 11:39 Dipankar Sarma [this message]
-- strict thread matches above, loose matches on Subject: below --
2002-09-14 18:57 [RFC][PATCH] sard changes for 2.5.34 Lev Makhlis
2002-09-18 17:54 ` Randy.Dunlap
2002-09-18 19:43 ` Lev Makhlis
2002-09-12 2:10 Rick Lindsley
2002-09-12 2:42 ` Andrew Morton
2002-09-12 2:50 ` Rik van Riel
2002-09-12 6:40 ` Rick Lindsley
2002-09-12 7:20 ` Andrew Morton
2002-09-12 9:18 ` Rick Lindsley
2002-09-12 10:01 ` Alexander Viro
2002-09-12 10:33 ` Rick Lindsley
2002-09-12 19:42 ` Andrew Morton
2002-09-12 20:38 ` Rik van Riel
2002-09-12 16:16 ` Rik van Riel
2002-09-12 16:48 ` Andrew Morton
2002-09-12 23:32 ` Denis Vlasenko
2002-09-12 18:49 ` Andrew Morton
2002-09-12 19:50 ` Rick Lindsley
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=20020913170943.A11038@in.ibm.com \
--to=dipankar@in.ibm.com \
--cc=akpm@digeo.com \
--cc=kiran@in.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=ricklind@us.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