Re: [PATCH 1/6] compacting file_ra_state

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Jul 20, 2007 at 01:34:42PM +0200, Andi Kleen wrote:
> Fengguang Wu <[email protected]> writes:
> 
> > Use 'unsigned int' instead of 'unsigned long' for the readahead indexes/sizes.
> > 
> > This helps reduce memory consumption on 64bit CPU when
> > a lot of files are opened.
> > 
> > Note that the (smaller) 32bit index can support up to 16PB file.
                                                          ~~~~
                                                sorry, it's 16TB ;)

> > Which should be sufficient large at least for now.
> 
> This would add a new limit to 64bit architectures.  Surely keeping
> start at pgoff_t will not be a big issue? The other fields can be
> 32bit.

Yeah, it counts for about 4MB memory for 1M opened files.

But, the filp size is now 296 on x86_64, so slab-objects-per-page = 13.
Adding another 4bytes, it remains in 13;
Taking 4bytes more, it increases to 14.
So pgoff_t consumes no more memory actually.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux