[EMAIL PROTECTED] wrote on Mon, 30 Oct 2006 01:05 -0600:
> Attached patch (very very experimental, I haven't tested it out at all) 
> builds the necessary infrastructure for doing efficient read-caching (at 
> least for immutable files) in the page-cache of the kernel. 
> Write-caching/buffering is not hard per-se, but making it efficient is 
> hard I think (especially if we wish to avoid read-modify-writebacks). I 
> haven't thought through that completely. Without modifying the VFS core 
> to keep track of partially valid pages, I think this might be tricky to 
> do. Please correct me if I am wrong here.
> 
> Let me know if you have any comment/suggestions etc.
> I will test this out sometime this week/next weekend whenever I get 
> time, but if someone feels like jumping in and testing/modifying it, 
> that would be great too!

Whew, heavy stuff.  I don't have a lot of insight, just a few
comments for whoever does the next step with this patch.

Names COPY_TO_ADDRESSES and rw->copy_to_user are confusing, as those
are also checked in the "from" path.  Maybe COPY_USER_ADDRESSES and
rw->copy_user_buffers might help future readers.

Your pagecache_read_actor() isn't really an actor, i.e. it's not a
callback from some other function.  Just needs a different name,
like "copy_pagecache_to_user".

Use of pvfs2_readpages_fill_cb is interesting, and probably wants
a comment.  Normally this function issues IO, but you just
gather up all the would-be-issued IOs to ship later as a big chunk,
for performance reasons.

The error handling may not do the right thing.  If you get a read
error on your issue_pages, you go through and error out the entire
page_list, even though the previously cached ones are probably fine.

Little stuff:  no need to cast return value of kmalloc().  There's
also kzalloc() if you're going to do a memset(,0,) next.

I don't understand how you can do write buffering safely.  There's
no equivalent to IS_IMMUTABLE(), is there?  That seems like a scary
next step, although I understand some people do want it.

                -- Pete
_______________________________________________
Pvfs2-developers mailing list
Pvfs2-developers@beowulf-underground.org
http://www.beowulf-underground.org/mailman/listinfo/pvfs2-developers

Reply via email to