Re: [PATCH 1/2] Page migration via Swap V2: Page Eviction

Nick Piggin
2005-10-18T08:51:50Z

Andrew Morton wrote:

>Christoph Lameter <clameter@sgi.com> wrote:
>
>>+ write_lock_irq(&mapping->tree_lock);
>> +
>> + if (page_count(page) != 2 || PageDirty(page)) {
>> + write_unlock_irq(&mapping->tree_lock);
>> + goto retry_later_locked;
>> + }
>>
>
>This needs the (uncommented (grr)) smp_rmb() copied-and-pasted as well.
>
>It's a shame about the copy-and-pasting :( Is it unavoidable?
>
>

It is commented. The comment says that page_count must be tested
before PageDirty. The code simply didn't match the comment before,
so it didn't warrant any more commenting aside from the changelog.

Nick

Send instant messages to your online friends http://au.messenger.yahoo.com