From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail137.messagelabs.com (mail137.messagelabs.com [216.82.249.19]) by kanga.kvack.org (Postfix) with SMTP id B0B706B004A for ; Tue, 30 Nov 2010 19:50:02 -0500 (EST) Received: by iwn42 with SMTP id 42so1984686iwn.14 for ; Tue, 30 Nov 2010 16:49:57 -0800 (PST) MIME-Version: 1.0 In-Reply-To: References: Date: Wed, 1 Dec 2010 09:49:17 +0900 Message-ID: Subject: Re: [PATCH v3 3/3] Prevent activation of page in madvise_dontneed From: Minchan Kim Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Sender: owner-linux-mm@kvack.org To: Hugh Dickins Cc: Andrew Morton , linux-mm , LKML , Ben Gamari , KOSAKI Motohiro , Johannes Weiner , Nick Piggin , Mel Gorman , Wu Fengguang List-ID: Hi Hugh, On Wed, Dec 1, 2010 at 3:34 AM, Hugh Dickins wrote: > 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: >> =A0- remove unnecessary description >> Changelog since v1: >> =A0- change word from promote to activate >> =A0- add activate argument to zap_pte_range and family function >> >> --- >> =A0include/linux/mm.h | =A0 =A04 ++-- >> =A0mm/madvise.c =A0 =A0 =A0 | =A0 =A04 ++-- >> =A0mm/memory.c =A0 =A0 =A0 =A0| =A0 38 +++++++++++++++++++++++----------= ----- >> =A0mm/mmap.c =A0 =A0 =A0 =A0 =A0| =A0 =A04 ++-- >> =A04 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. =A0That'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). Before I sent RFC, I tried it and suffered from NULL detail as you said. But it's valuable to look on it, again. Since other guys don't opposed this patch's goal, I will have a time for unifying it into zap_details. Thanks, Hugh. > Hugh > --=20 Kind regards, Minchan Kim -- 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