From: Christoph Hellwig <hch@infradead.org>
To: Ravikiran G Thirumalai <kiran@in.ibm.com>
Cc: linux-kernel@vger.kernel.org,
lse <lse-tech@lists.sourceforge.net>,
Andrew Morton <akpm@zip.com.au>,
Rik van Riel <riel@conectiva.com.br>
Subject: Re: [Lse-tech] [patch] Scalable statistics counters with /proc reporting
Date: Wed, 7 Aug 2002 10:02:16 +0100 [thread overview]
Message-ID: <20020807100216.A27321@infradead.org> (raw)
In-Reply-To: <20020807142227.B12301@in.ibm.com>; from kiran@in.ibm.com on Wed, Aug 07, 2002 at 02:22:27PM +0530
On Wed, Aug 07, 2002 at 02:22:27PM +0530, Ravikiran G Thirumalai wrote:
> Here's the new statctr patch (2.5.29) on top of kmalloc_percpu dynamic
> allocator. This one passes GFP_ flags for statctr_init as suggested by
> Andrew Morton and makes use of cpu_possible. Counters can be grouped into
> one or multiple /proc files as per Rik's suggestion.
> Here are the revised interfaces:
>
> 1. struct statctr_proc_entry
> *create_statctr_proc_entry(struct proc_dir_entry *parent, const char *name);
> To create a /proc file to group counters for automatic /proc reporting
>
> 2. free_statctr_proc_entry(struct statctr_proc_entry *)
>
> To free up the proc entry
>
> 3. int statctr_init(statctr_t *stctr, unsigned long val,
> struct statctr_proc_entry *pentry,
> const char *ctrname, int flags)
>
> Allocates memory to the counter , initialises it, and links the counter
> with statctr_proc_entry for automatic /proc reporting. ctrname is the
> counter label as it appears in /proc, flags are the GFP_ hints.
> /proc reporting can be turned off if pentry is NULL.
What about a general s/_proc//g for the API?
For statctr_init the flags argument would much better be named gfp_mask,
the val argument should be removed and the counter initialized to zero
by default - that's 90% of the uses..
Also the /proc-based implementation is really ugly. It should be moved
over to the seq_file interface at least, a simple ramfs-style own
filesystem ("stats" filesystem type) would be the cleanest solution.
next prev parent reply other threads:[~2002-08-07 8:58 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-08-07 8:52 Ravikiran G Thirumalai
2002-08-07 9:02 ` Christoph Hellwig [this message]
2002-08-07 19:02 ` [Lse-tech] " Andrew Morton
2002-08-08 4:41 ` Ravikiran G Thirumalai
2002-08-08 9:39 ` Ravikiran G Thirumalai
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=20020807100216.A27321@infradead.org \
--to=hch@infradead.org \
--cc=akpm@zip.com.au \
--cc=kiran@in.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lse-tech@lists.sourceforge.net \
--cc=riel@conectiva.com.br \
/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®