Re: [08/17] Define functions for page cache handling
From: Eric Dumazet
Date: Tue Apr 24 2007 - 19:01:49 EST
clameter@xxxxxxx 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@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/