lkml.org 
[lkml]   [2002]   [Jan]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] pagecache lock ordering
Hugh Dickins wrote:
>
> There's two places, do_buffer_fdatasync

generic_buffer_fdatasync() and hence do_buffer_fdatasync()
are completely unused. It may be simpler to just trash
them.

> and __find_lock_page_helper,

Yeah. The code can't deadlock because:

page_cache_get();
spin_lock(&pagecache_lock);
page_cache_release();

we implicitly *know* that page_cache_release won't try
to acquire pagemap_lru_lock, because the page is in the
pagecache and has count=2 or more. Which is a bit, umm,
subtle.

I get the feeling that a lot of this would be cleaned up
if presence on an LRU contributed to page->count. It
seems strange, kludgy and probably racy that this is not
the case.

-
-
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: 2005-03-22 13:15    [W:0.065 / U:0.016 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site