[lkml]   [2002]   [Sep]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: invalidate_inode_pages in 2.5.32/3
Daniel Phillips wrote:
> > I'm very unkeen about using the inaccurate invalidate_inode_pages
> > for anything which matters, really. And the consistency of pagecache
> > data matters.
> >
> > NFS should be using something stronger. And that's basically
> > vmtruncate() without the i_size manipulation.
> Yes, that looks good. Semantics are basically "and don't come back
> until every damm page is gone" which is enforced by the requirement
> that we hold the mapping->page_lock though one entire scan of the
> truncated region. (Yes, I remember sweating this one out a year
> or two ago so it doesn't eat 100% CPU on regular occasions.)
> So, specifically, we want:
> void invalidate_inode_pages(struct inode *inode)
> {
> truncate_inode_pages(mapping, 0);
> }
> Is it any harder than that?

Pretty much - need to leave i_size where it was. But there are
apparently reasons why NFS cannot sleepingly lock pages in this particular

> By the way, now that we're all happy with the radix tree, we might
> as well just go traverse that instead of all the mapping->*_pages.
> (Not that I'm seriously suggesting rocking the boat that way just
> now, but it might yield some interesting de-crufting possibilities.)

Oh absolutely.

unsigned long radix_tree_gang_lookup(void **pointers,
unsiged long starting_from_here, unsigned long this_many);

could be used nicely in readahead, drop_behind, truncate, invalidate
and invalidate2. But to use it in writeback (desirable) we would need
additional metadata in radix_tree_node. One bit per page, which means
"this page is dirty" or "this subtree has dirty pages".

I keep saying this in the hope that someone will take pity and write it.

> ...
> Now, what is this invalidate_inode_pages2 seepage about? Called from
> one place. Sheesh.

heh. We still do have some O_DIRECT/pagecache coherency problems.
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 13:28    [W:2.110 / U:19.772 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site