From: Eric Dumazet <dada1@cosmosbay.com>
To: Coywolf Qi Hunt <coywolf@gmail.com>
Cc: Andi Kleen <ak@suse.de>, Benjamin LaHaise <bcrl@linux.intel.com>,
"David S. Miller" <davem@davemloft.net>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] struct file cleanup : the very large file_ra_state is now allocated only on demand.
Date: Thu, 18 Aug 2005 08:51:03 +0200 [thread overview]
Message-ID: <43042FD7.40204@cosmosbay.com> (raw)
In-Reply-To: <2cd57c90050817183942b217fa@mail.gmail.com>
Coywolf Qi Hunt a écrit :
> On 8/18/05, Eric Dumazet <dada1@cosmosbay.com> wrote:
>
>>Andi Kleen a écrit :
>>
>>
>>>>(because of the insane struct file_ra_state f_ra. I wish this structure
>>>>were dynamically allocated only for files that really use it)
>>>
>>>
>>>How about you submit a patch for that instead?
>>>
>>>-Andi
>>
>>OK, could you please comment this patch ?
>>
>>The problem of dynamically allocating the readahead state data is that the allocation can fail and should not be fatal.
>>I made some choices that might be not good.
>>
>>I also chose not to align "file_ra" slab on SLAB_HWCACHE_ALIGN because the object size is 10*sizeof(long), so alignment would loose
>>6*sizeof(long) bytes for each object.
>>
>>
>>[PATCH]
>>
>>* struct file cleanup : the very large file_ra_state is now allocated only on demand, using a dedicated "file_ra" slab.
>> 64bits machines handling lot of sockets can save about 72 bytes per file.
>>* private_data : The field is moved close to f_count and f_op fields to speedup sockfd_lookups
>
>
> Why not keep the comment or fix it?
>
You mean the comment in include/linux/fs.h : /* needed for tty driver, and maybe others */ ?
I think this comment is outdated, since nearly every 'struct file' user store something of his own in this place, not only 'tty drivers'
As no other fields has comment, why should we keep this outdated comment ?
Eric
next prev parent reply other threads:[~2005-08-18 6:51 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20050810164655.GB4162@linux.intel.com>
[not found] ` <20050810.135306.79296985.davem@davemloft.net>
[not found] ` <20050810211737.GA21581@linux.intel.com>
[not found] ` <430391F1.9080900@cosmosbay.com>
[not found] ` <20050817211829.GK27628@wotan.suse.de>
[not found] ` <4303AEC4.3060901@cosmosbay.com>
[not found] ` <20050817215357.GU3996@wotan.suse.de>
2005-08-18 0:40 ` [PATCH] struct file cleanup : the very large file_ra_state is now allocated only on demand Eric Dumazet
2005-08-18 1:05 ` Andi Kleen
2005-08-18 2:43 ` David S. Miller
2005-08-18 7:14 ` Eric Dumazet
2005-08-18 7:18 ` David S. Miller
2005-08-18 2:52 ` Nick Piggin
2005-08-18 2:57 ` Andi Kleen
2005-08-18 3:00 ` Nick Piggin
2005-08-18 1:39 ` Coywolf Qi Hunt
2005-08-18 6:51 ` Eric Dumazet [this message]
2005-08-18 9:05 ` [PATCH] Put the very large file_ra_state outside of 'struct file' Eric Dumazet
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=43042FD7.40204@cosmosbay.com \
--to=dada1@cosmosbay.com \
--cc=ak@suse.de \
--cc=bcrl@linux.intel.com \
--cc=coywolf@gmail.com \
--cc=davem@davemloft.net \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@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;
as well as URLs for NNTP newsgroup(s).