From: Dipankar Sarma <dipankar@in.ibm.com>
To: Christoph Hellwig <hch@infradead.org>,
Ravikiran G Thirumalai <kiran@in.ibm.com>,
Andrew Morton <akpm@zip.com.au>,
linux-kernel@vger.kernel.org
Subject: Re: [patch 1 of 2] Scalable statistics counters
Date: Tue, 13 Aug 2002 11:07:25 +0530 [thread overview]
Message-ID: <20020813110725.A10332@in.ibm.com> (raw)
In-Reply-To: <20020812210952.A17329@infradead.org>; from hch@infradead.org on Mon, Aug 12, 2002 at 09:09:52PM +0100
On Mon, Aug 12, 2002 at 09:09:52PM +0100, Christoph Hellwig wrote:
> On Tue, Aug 13, 2002 at 01:35:46AM +0530, Dipankar Sarma wrote:
> > Suppose I use seq_file interface and not put all statctrs in one /proc
> > file, how do I associate the statctr data structure with the /proc
> > inode ? IOW, how do I quickly get the statctr_pentry corresponding to the
> > counter in statctr_open() ?
>
> Stuff it into the ->private member of struct seq_file in your open method.
Yes, that I learnt by looking at mounts_open(), the problem is how
do I get the statctr_pentry (or statctr_group if you like) in
the open method ? It seems to me that in order to do this, we
need the following -
1. An exported wrapper create_statctr_entry() around
create_seq_entry() code that sticks the statctr_group pointer into
proc_entry->data.
2. Some way to get the proc entry from the inode in statctr_open()
and stick it to seq_file->private for seq_file methods to use.
Is this understanding correct or is there a better and simpler
way to do this ?
Thanks
--
Dipankar Sarma <dipankar@in.ibm.com> http://lse.sourceforge.net
Linux Technology Center, IBM Software Lab, Bangalore, India.
next prev parent reply other threads:[~2002-08-13 5:29 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-08-12 13:05 [patch 1 of 2] Scalable statistics counters Ravikiran G Thirumalai
2002-08-12 13:46 ` Christoph Hellwig
2002-08-12 20:05 ` Dipankar Sarma
2002-08-12 20:09 ` Christoph Hellwig
2002-08-13 5:37 ` Dipankar Sarma [this message]
2002-08-13 13:29 ` 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=20020813110725.A10332@in.ibm.com \
--to=dipankar@in.ibm.com \
--cc=akpm@zip.com.au \
--cc=hch@infradead.org \
--cc=kiran@in.ibm.com \
--cc=linux-kernel@vger.kernel.org \
/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