From: Avi Kivity <avi@argo.co.il>
To: Jan Engelhardt <jengelh@linux01.gwdg.de>
Cc: Theodore Tso <tytso@mit.edu>, Nathan Scott <nathans@sgi.com>,
linux-kernel@vger.kernel.org
Subject: Re: [RFC] Slimming down struct inode
Date: Tue, 13 Jun 2006 23:25:25 +0300 [thread overview]
Message-ID: <448F1F35.4020109@argo.co.il> (raw)
In-Reply-To: <Pine.LNX.4.61.0606132209420.11918@yvahk01.tjqt.qr>
Jan Engelhardt wrote:
>>>> if (inode->i_ops->getblksize)
>>>> return inode->i_ops->getblksize(inode);
>>>> else
>>>> return inode->i_sb->s_blksize;
>>>>
>>>> Trading some efficiency for space.
>>>>
>>> Yep, that was what I was planning on doing....
>>>
>>>
>> Maybe
>>
>> if (inode->i_sb->s_blksize)
>> return inode->i_sb->s_blksize;
>> else
>> ...
>>
>> is a tiny little bit faster...
>>
>>
>
> The compiler will anyway pick the one it thinks is better by itself.
> Influence can be taken using likely/unlikely of course.
>
The compiler cannot infer that (inode->i_ops->getblksize == 0) is
equivalent to (inode->i_sb->s_blksize != 0).
Maybe someday the language will allow us to specify it, but not today.
--
Do not meddle in the internals of kernels, for they are subtle and quick to panic.
next prev parent reply other threads:[~2006-06-13 20:25 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-06-09 23:50 [RFC] Slimming down struct inode 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
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 [this message]
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=448F1F35.4020109@argo.co.il \
--to=avi@argo.co.il \
--cc=jengelh@linux01.gwdg.de \
--cc=linux-kernel@vger.kernel.org \
--cc=nathans@sgi.com \
--cc=tytso@mit.edu \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.