Re: RFC: mincore: add a bit to indicate a page is dirty.

From: Andrew Morton
Date: Mon Feb 11 2013 - 17:12:46 EST

On Mon, 11 Feb 2013 11:27:01 -0500
Johannes Weiner <hannes@xxxxxxxxxxx> wrote:

> > Is PG_dirty the right choice? Is that right for huge pages? Should I
> > assume is_migration_entry(entry) means it's not dirty, or is there some
> > other check here?
> If your only consequence of finding dirty pages is to sync, would you
> be better off using fsync/fdatasync maybe?

Yes, if the data is all on disk then an fsync() will be a no-op. IOW,

if (I need to fsync)

is equivalent to


Methinks we need to understand the requirement better.

Also, having to mmap the file to be able to query pagecache state is a
hack. Whatever happened to the fincore() patch?

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