lkml.org 
[lkml]   [2001]   [Sep]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: pre12 VM doubts and patch

On Thu, 20 Sep 2001, Andrea Arcangeli wrote:
>
> forget that, of course if write_access is set it means we can write to
> the page or the page fault would be finished much earlier. This looks
> much better:

You still need to mark the pte dirty. Becuase you know that it _is_ dirty,
or it wouldn't have had a swap cache entry allocated to it.

Or you need to not drop the swap cache.

Failing to mark it dirty will cause all kind sof interesting problems when
pages suddenly become zero-filled when the VM scanning just drops the old
contents (which sure makes for good performance, but not for nice
behaviour ;)

So I would suggest:

if (exclusive_swap_page(page)) {
if (vma->vm_flags & VM_WRITE)
pte = pte_mkwrite(pte);
pte = pte_mkdirty(pte);
delete_from_swap_cache_nolock(page);
}

or similar.

Linus

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