Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759721AbYARKYh (ORCPT ); Fri, 18 Jan 2008 05:24:37 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754769AbYARKYa (ORCPT ); Fri, 18 Jan 2008 05:24:30 -0500 Received: from nz-out-0506.google.com ([64.233.162.224]:15852 "EHLO nz-out-0506.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755030AbYARKY3 (ORCPT ); Fri, 18 Jan 2008 05:24:29 -0500 DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=KV6IYpf0Jq0QtD8T+vpH1u44uepICZbPNwkZYOBCtZUTTWidyYNnZeiS1A497iDWTMMMJ3wz6wSnXCJQuJtMANmmtQIdVMKM4fxbK31fCL/W9dqLgdPROCqnNjSIt1mZFxa5xdYesRXx1BMLi2fJxFbdLx0AzMDadeNPd0O7U0I= Message-ID: Date: Fri, 18 Jan 2008 11:24:27 +0100 From: "=?ISO-8859-1?Q?Daniel_Sp=E5ng?=" To: "KOSAKI Motohiro" Subject: Re: [RFC][PATCH 4/5] memory_pressure_notify() caller Cc: "Rik van Riel" , linux-mm@kvack.org, linux-kernel@vger.kernel.org, "Marcelo Tosatti" , "Andrew Morton" In-Reply-To: <20080117120112.11CE.KOSAKI.MOTOHIRO@jp.fujitsu.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <20080116104536.11AE.KOSAKI.MOTOHIRO@jp.fujitsu.com> <20080117120112.11CE.KOSAKI.MOTOHIRO@jp.fujitsu.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2850 Lines: 82 On 1/17/08, KOSAKI Motohiro wrote: > Hi Daniel > > > > Thank you for good point out! > > > Could you please post your test program and reproduced method? > > > > Sure: > > > > 1. Fill almost all available memory with page cache in a system without swap. > > 2. Run attached alloc-test program. > > 3. Notification fires when page cache is reclaimed. > > Unfortunately, I can't reproduce it. > > my machine > CPU: Pentium4 2.8GHz with HT > memory: 512M > > > 1. I doubt ZONE_DMA, please shipment ignore zone_dma patch(below). > 2. Could you please send your .config and /etc/sysctl.conf? > I hope more reproduce challenge. > > thanks. > > - kosaki > > > > > Signed-off-by: KOSAKI Motohiro > > --- > include/linux/mem_notify.h | 3 +++ > mm/page_alloc.c | 6 +++++- > 2 files changed, 8 insertions(+), 1 deletion(-) > > Index: linux-2.6.24-rc6-mm1-memnotify/include/linux/mem_notify.h > =================================================================== > --- linux-2.6.24-rc6-mm1-memnotify.orig/include/linux/mem_notify.h > 2008-01-16 21:31:09.000000000 +0900 > +++ linux-2.6.24-rc6-mm1-memnotify/include/linux/mem_notify.h > 2008-01-16 21:34:24.000000000 +0900 > @@ -22,6 +22,9 @@ static inline void memory_pressure_notif > unsigned long target; > unsigned long pages_high, pages_free, pages_reserve; > > + if (unlikely(zone->mem_notify_status == -1)) > + return; > + > if (pressure) { > target = atomic_long_read(&last_mem_notify) + MEM_NOTIFY_FREQ; > if (likely(time_before(jiffies, target))) > Index: linux-2.6.24-rc6-mm1-memnotify/mm/page_alloc.c > =================================================================== > --- linux-2.6.24-rc6-mm1-memnotify.orig/mm/page_alloc.c 2008-01-13 > 19:50:27.000000000 +0900 > +++ linux-2.6.24-rc6-mm1-memnotify/mm/page_alloc.c 2008-01-16 > 21:41:58.000000000 +0900 > @@ -3467,7 +3467,11 @@ static void __meminit free_area_init_cor > zone->zone_pgdat = pgdat; > > zone->prev_priority = DEF_PRIORITY; > - zone->mem_notify_status = 0; > + > + if (zone->present_pages < (pgdat->node_present_pages / 10)) > + zone->mem_notify_status = -1; > + else > + zone->mem_notify_status = 0; > > zone_pcp_init(zone); > INIT_LIST_HEAD(&zone->active_list); Your patch above solves the problem I had with early notification. Cheers, Daniel -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/