Messages in this thread |  | | Date | Wed, 19 Sep 2001 23:31:45 -0700 (PDT) | From | Linus Torvalds <> | Subject | Re: 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/
|  |