lkml.org 
[lkml]   [1999]   [Apr]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: Q: generic_file_write sets PG_locked???
Date
In article <14111.40097.154796.570022@dukat.scot.redhat.com>,
Stephen C. Tweedie <sct@redhat.com> wrote:
>
>Yes and no. PageLocked may just indicate a background writeback in
>progress. That definitely happens in the swap cache right now, but the
>vfs code doesn't use it for the page cache (yet). It will do.

In fact, it already does for NFS, which uses PageLocked for exactly that
reason (to serialize read and write requests to the same page).

> However,
>if a given filesystem provides its own write-page strategy functions
>which have their own locking semantics, there's no real reason to
>prevent it from doing so as long as the page mapping functions continue
>to block on a non-uptodate page.

For "valid to read", you only check Uptodate. For any actual IO
(whether it's because you're going to actually _do_ the read or set up
some write), PageLocked should be used to synchronize. NFS already does
this, and generic_file_read() already understands about it.

Linus

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

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