Re: [PATCH] zap_pte_range should not mark non-uptodate pages dirty

From: Andrew Morton
Date: Tue Nov 09 2004 - 14:55:36 EST

Andrea Arcangeli <andrea@xxxxxxxxxx> wrote:
> On Tue, Nov 09, 2004 at 08:15:30AM -0600, Dave Kleikamp wrote:
> > Andrew & Andrea,
> > What is the status of this patch? It would be nice to have it in the
> > -mm4 kernel.
> I think we should add an msync in front of O_DIRECT reads too (msync
> won't hurt other users, and it'll provide full coherency), everything
> else is ok (the msync can be added as an incremental patch).

I don't think we have a simple way of syncing all ptes which map the pages
without actually shooting those pte's down, via zap_page_range(). A
filemap_sync() will only sync the caller's mm's ptes.

I guess it would be pretty simple to add a sync_but_dont_unmap field to
struct zap_details, and propagate that down. So we can reuse all the
unmap_vmas() code for an all-mms pte sync.

It could all get very expensive if someone has a bit of the file mapped
though. Testing is needed there.

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at