Re: [PATCH 3/5] mm: clear PG_dirty to mark page freeable

2015-10-26 Thread Minchan Kim
On Mon, Oct 26, 2015 at 06:28:13PM -0700, Hugh Dickins wrote: > On Mon, 19 Oct 2015, Minchan Kim wrote: > > > Basically, MADV_FREE relies on dirty bit in page table entry > > to decide whether VM allows to discard the page or not. > > IOW, if page table entry includes marked dirty bit, VM shouldn'

Re: [PATCH 3/5] mm: clear PG_dirty to mark page freeable

2015-10-26 Thread Hugh Dickins
On Mon, 19 Oct 2015, Minchan Kim wrote: > Basically, MADV_FREE relies on dirty bit in page table entry > to decide whether VM allows to discard the page or not. > IOW, if page table entry includes marked dirty bit, VM shouldn't > discard the page. > > However, as a example, if swap-in by read fau

[PATCH 3/5] mm: clear PG_dirty to mark page freeable

2015-10-18 Thread Minchan Kim
Basically, MADV_FREE relies on dirty bit in page table entry to decide whether VM allows to discard the page or not. IOW, if page table entry includes marked dirty bit, VM shouldn't discard the page. However, as a example, if swap-in by read fault happens, page table entry doesn't have dirty bit s