lkml.org 
[lkml]   [2007]   [Apr]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [08/17] Define functions for page cache handling
clameter@sgi.com a écrit :

> --- linux-2.6.21-rc7.orig/include/linux/fs.h 2007-04-24 11:31:49.000000000 -0700
> +++ linux-2.6.21-rc7/include/linux/fs.h 2007-04-24 11:37:21.000000000 -0700
> @@ -435,6 +435,11 @@ struct address_space {
> struct inode *host; /* owner: inode, block_device */
> struct radix_tree_root page_tree; /* radix tree of all pages */
> rwlock_t tree_lock; /* and rwlock protecting it */
> +#ifdef CONFIG_LARGE_BLOCKSIZE
> + unsigned int order; /* Page order of the pages in here */
> + unsigned int shift; /* Shift of index */
> + loff_t offset_mask; /* Mask to get to offset bits */
> +#endif
> unsigned int i_mmap_writable;/* count VM_SHARED mappings */
> struct prio_tree_root i_mmap; /* tree of private and shared mappings */
> struct list_head i_mmap_nonlinear;/*list VM_NONLINEAR mappings */

Some comments about this :

1) not optimal placement on 64bits arches (it creates one hole before
i_mmap_writeable)

2) sizeof(struct address_space) is an issue, given it is included in every
inode, even sockets or pipes.

-> 2.1) Do we really need 32 bits for 'order' and 'shift'
-> 2.2) Do we really need a 64bits offset_mask since it's a trivial arithmetic
from 'shift' (or 'order') ?

BTW, I presume splice() is not yet supported ? If yes, each pipe could hold 16
'big pages' so we probably can hit some DOS condition sooner...


-
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: 2007-04-25 01:03    [W:0.663 / U:0.056 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site