From: Andi Kleen <ak@suse.de>
To: Martin Peschke <mp3@de.ibm.com>
Cc: akpm@osdl.org, linux-kernel@vger.kernel.org
Subject: Re: [patch 5/6] statistics infrastructure
Date: 14 Dec 2005 19:38:19 +0100 [thread overview]
Message-ID: <p738xun8qxw.fsf@verdi.suse.de> (raw)
In-Reply-To: <43A04C83.2070002@de.ibm.com>
Martin Peschke <mp3@de.ibm.com> writes:
> + */
> +static inline u64 statistic_add(struct statistic *stat, s64 value, u64 incr)
> +{
> + unsigned long flags;
> + int retval;
> +
> + if (stat->on != STATISTIC_DEF_ON)
> + return 0;
> +
> + statistic_lock(stat->interface, flags);
> + retval = stat->add(stat, value, incr);
> + statistic_unlock(stat->interface, flags);
Locks and indirect function calls?
It seems very wrong to me to make such heavy weight statistic functions.
Most likely you will disturb the performance whatever is being counted
badly.
Take a look at many other subsystems - they do per CPU counters etc.
to make this all fast.
But it's still unclear why it would need such an heavyweight infrastructure.
Normally it's not that bad to reimplemented on the fly. Maybe some
common code can be refactored out of that, but probably not too much.
[... lots of other code snipped ... ]
Looks all very very overdesigned to me. How about you just start
with a minimum specification and describe what you want to do?
And then start with a *simple* base implementation. If it's really
needed it will grow later anyways, but starting off with such
a complex monstrosity is just wrong.
-Andi
next prev parent reply other threads:[~2005-12-14 18:38 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-12-14 16:46 Martin Peschke
2005-12-14 18:38 ` Andi Kleen [this message]
2005-12-16 1:00 ` Martin Peschke
2005-12-16 12:27 Martin Peschke
2006-05-19 16:13 [Patch " Martin Peschke
2006-05-24 12:33 Martin Peschke
2006-05-24 22:57 ` Andrew Morton
2006-05-29 22:17 ` Martin Peschke
2006-05-30 1:17 ` Andrew Morton
2006-05-30 17:17 ` Martin Peschke
2006-05-30 19:19 ` Andrew Morton
2006-05-25 8:05 ` Nikita Danilov
2006-05-30 11:35 ` Martin Peschke
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=p738xun8qxw.fsf@verdi.suse.de \
--to=ak@suse.de \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mp3@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
all inboxes | Powered by JetHome®