Re: [rfc][patch] remove racy sync_page?

Nick Piggin
2006-05-31T16:26:57Z

Linus Torvalds wrote:

> And I suspect your objection to unplugging is not really about unplugging
> itself. It's literally about the fact that we use the same page lock for
> IO and for the ->mapping thing, isn't it?

Nearly, but not quite that far: it's that we sync_page in lock_page.

I don't think using the single lock for both is too bad (in many
ways they are related eg. you don't want the page to be truncated
while IO is in progress).

>
> IOW, you don't actually dislike plugging itself, you dislike it due to the
> effects of a totally unrelated locking issue, namely that we use the same
> lock for two totally independent things. If the ->mapping thing were to
> use a PG_map_lock that didn't affect plugging one way or the other, you
> wouldn't have any issues with unplugging, would you?
>
> And I think _that_ is what really gets us to the problem.

No I don't dislike plugging at all ;) Just this tangle as you say.

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