lkml.org 
[lkml]   [2005]   [Aug]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] struct file cleanup : the very large file_ra_state is now allocated only on demand.
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?

--
Coywolf Qi Hunt
http://ahbl.org/~coywolf/
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-08-18 03:42    [W:0.141 / U:0.616 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site