From: Stefan Richter <stefanr@s5r6.in-berlin.de>
To: Theodore Tso <tytso@mit.edu>
Cc: Al Viro <viro@ftp.linux.org.uk>,
linux-kernel@vger.kernel.org,
linux1394-devel@lists.sourceforge.net
Subject: Re: [RFC] Slimming down struct inode
Date: Sat, 10 Jun 2006 08:24:43 +0200 [thread overview]
Message-ID: <448A65AB.3090509@s5r6.in-berlin.de> (raw)
In-Reply-To: <20060610015631.GA29805@thunk.org>
Theodore Tso wrote at lkml:
[saving space in the numerously instantiated struct inode]
> On Sat, Jun 10, 2006 at 02:27:57AM +0100, Al Viro wrote:
>>>5) Nuke i_cindex. This is only used by ieee1394's
>>> ieee_file_to_instance. There must be another place where we can
>>> store this --- say, in a ieee1394-specific field in struct file? Or
>>> maybe it can be derived some other way, but to chew up 4 bytes in
>>> i_cindex for all inodes just for ieee1394's benefit seems like the
>>> Wrong Thing(tm).
>>
>>No, it's actually the right thing for _all_ char devices. And it's used
>>before we get a struct file. If anything, ->i_rdev should go long-term...
>
> i_cindex is set by fs/char_dev.h, and the only user of that field (I
> grepped the entire sources) is ./drivers/ieee1394/ieee1394_core.h:
>
> /* return the index (within a minor number block) of a file */
> static inline unsigned char ieee1394_file_to_instance(struct file *file)
> {
> return file->f_dentry->d_inode->i_cindex;
> }
...
Also, the places where ieee1394_file_to_instance() is used appear not to
be fast paths. (It's the struct file_operations.open() hook of two
protocol drivers.) I.e. there is no harm in replacing it by whatever
more expensive lookup method.
Dv1394 calls ieee1394_file_to_instance() from within spin_lock_irqsave()
/unlock_irqrestore(), but it can easily moved out of it if need be.
--
Stefan Richter
-=====-=-==- -==- -=-=-
http://arcgraph.de/sr/
next prev parent reply other threads:[~2006-06-10 6:27 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-06-09 23:50 Theodore Ts'o
2006-06-10 0:24 ` Bernd Eckenfels
2006-06-10 1:27 ` Al Viro
2006-06-10 1:56 ` Theodore Tso
2006-06-10 6:24 ` Stefan Richter [this message]
2006-06-10 10:48 ` Jan Engelhardt
2006-06-10 15:04 ` Jeff Garzik
2006-06-13 4:35 ` Nathan Scott
2006-06-13 4:32 ` Nathan Scott
2006-06-13 14:00 ` Avi Kivity
2006-06-13 17:44 ` Theodore Tso
2006-06-13 18:08 ` Avi Kivity
2006-06-13 20:10 ` Jan Engelhardt
2006-06-13 20:25 ` Avi Kivity
2006-06-13 22:41 ` Nathan Scott
2006-06-14 10:29 ` Nikita Danilov
2006-06-14 21:50 ` Nathan Scott
2006-06-15 5:49 ` Theodore Tso
2006-06-15 7:01 ` Nathan Scott
2006-06-15 8:46 ` Brian F. G. Bidulock
2006-06-15 10:20 ` Nathan Scott
2006-06-14 23:27 ` Jan Engelhardt
2006-06-15 10:09 ` Nikita Danilov
2006-06-10 11:03 ` Tomasz Torcz
2006-06-10 15:06 ` Jeff Garzik
2006-06-15 0:16 ` Brian F. G. Bidulock
2006-06-15 4:43 ` Theodore Tso
2006-06-15 8:27 ` Brian F. G. Bidulock
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=448A65AB.3090509@s5r6.in-berlin.de \
--to=stefanr@s5r6.in-berlin.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux1394-devel@lists.sourceforge.net \
--cc=tytso@mit.edu \
--cc=viro@ftp.linux.org.uk \
/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®