From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail172.messagelabs.com (mail172.messagelabs.com [216.82.254.3]) by kanga.kvack.org (Postfix) with ESMTP id 28CA36B004A for ; Tue, 30 Nov 2010 13:35:03 -0500 (EST) Received: from wpaz5.hot.corp.google.com (wpaz5.hot.corp.google.com [172.24.198.69]) by smtp-out.google.com with ESMTP id oAUIYwZh022690 for ; Tue, 30 Nov 2010 10:34:58 -0800 Received: from pxi19 (pxi19.prod.google.com [10.243.27.19]) by wpaz5.hot.corp.google.com with ESMTP id oAUIYccr024016 for ; Tue, 30 Nov 2010 10:34:57 -0800 Received: by pxi19 with SMTP id 19so1166307pxi.29 for ; Tue, 30 Nov 2010 10:34:57 -0800 (PST) Date: Tue, 30 Nov 2010 10:34:41 -0800 (PST) From: Hugh Dickins Subject: Re: [PATCH v3 3/3] Prevent activation of page in madvise_dontneed In-Reply-To: Message-ID: References: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-linux-mm@kvack.org To: Minchan Kim Cc: Andrew Morton , linux-mm , LKML , Ben Gamari , KOSAKI Motohiro , Johannes Weiner , Nick Piggin , Mel Gorman , Wu Fengguang List-ID: On Tue, 30 Nov 2010, Minchan Kim wrote: > Now zap_pte_range alwayas activates pages which are pte_young && > !VM_SequentialReadHint(vma). But in case of calling MADV_DONTNEED, > it's unnecessary since the page wouldn't use any more. > > Signed-off-by: Minchan Kim > Acked-by: Rik van Riel > Cc: KOSAKI Motohiro > Cc: Johannes Weiner > Cc: Nick Piggin > Cc: Mel Gorman > Cc: Wu Fengguang > > Changelog since v2: > - remove unnecessary description > Changelog since v1: > - change word from promote to activate > - add activate argument to zap_pte_range and family function > > --- > include/linux/mm.h | 4 ++-- > mm/madvise.c | 4 ++-- > mm/memory.c | 38 +++++++++++++++++++++++--------------- > mm/mmap.c | 4 ++-- > 4 files changed, 29 insertions(+), 21 deletions(-) Everyone else seems pretty happy with this, and I've not checked at all whether it achieves your purpose; but personally I'd much prefer a smaller patch which adds your "activate" or "ignore_references" flag to struct zap_details, instead of passing this exceptional arg down lots of levels. That's precisely the purpose of zap_details, to gather together a few things that aren't needed in the common case (though I admit the NULL details defaulting may be ugly). Hugh -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Fight unfair telecom policy in Canada: sign http://dissolvethecrtc.ca/ Don't email: email@kvack.org