lkml.org 
[lkml]   [2006]   [Apr]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: smp race fix between invalidate_inode_pages* and do_no_page
Hi Andrea, seems good to me.

Andrea Arcangeli wrote:

> The PG_truncate is needed as well because we can't know in do_no_page if
> page->mapping is legitimate null or not (think bttv and other device
> drivers returning page->mapping null because they're private but not
> reserved pages etc..)
>
> From: Andrea Arcangeli <andrea@suse.de>
> Subject: avoid race between invalidate_inode_pages2 and do_no_page
>
> Use page lock and new bitflag to serialize.
>

As clean upstream solution, could we make truncatable (ie. regular
file backed) mappings set a vma flag which changes its nopage protocol
to return a locked page?

filemap_nopage itself, rather than do_no_page would then take care of
handling the truncate races. That seems to be a better layer to handle
it in.

Also, after this there should be no reason for truncate_count, right?
(At least in its truncate/nopage capacity.) If so, we should remove it
as part of the same patch / patchset.

--
SUSE Labs, Novell Inc.
Send instant messages to your online friends http://au.messenger.yahoo.com

-
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: 2006-04-03 14:41    [W:0.132 / U:0.060 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site