Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1761079Ab0GTAJu (ORCPT ); Mon, 19 Jul 2010 20:09:50 -0400 Received: from fgwmail6.fujitsu.co.jp ([192.51.44.36]:40991 "EHLO fgwmail6.fujitsu.co.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S967422Ab0GTAJh (ORCPT ); Mon, 19 Jul 2010 20:09:37 -0400 X-SecurityPolicyCheck-FJ: OK by FujitsuOutboundMailChecker v1.3.1 Date: Tue, 20 Jul 2010 09:04:40 +0900 From: KAMEZAWA Hiroyuki To: Minchan Kim Cc: Andrew Morton , Russell King , Mel Gorman , Johannes Weiner , linux-mm , linux-arm-kernel , LKML , Kukjin Kim Subject: Re: [PATCH] Tight check of pfn_valid on sparsemem - v2 Message-Id: <20100720090440.b7f85b8a.kamezawa.hiroyu@jp.fujitsu.com> In-Reply-To: <1279448311-29788-1-git-send-email-minchan.kim@gmail.com> References: <1279448311-29788-1-git-send-email-minchan.kim@gmail.com> Organization: FUJITSU Co. LTD. X-Mailer: Sylpheed 3.0.3 (GTK+ 2.10.14; i686-pc-mingw32) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2009 Lines: 47 On Sun, 18 Jul 2010 19:18:31 +0900 Minchan Kim wrote: > Kukjin reported oops happen while he change min_free_kbytes > http://www.spinics.net/lists/arm-kernel/msg92894.html > It happen by memory map on sparsemem. > > The system has a memory map following as. > section 0 section 1 section 2 > 0x20000000-0x25000000, 0x40000000-0x50000000, 0x50000000-0x58000000 > SECTION_SIZE_BITS 28(256M) > > It means section 0 is an incompletely filled section. > Nontheless, current pfn_valid of sparsemem checks pfn loosely. > It checks only mem_section's validation but ARM can free mem_map on hole > to save memory space. So in above case, pfn on 0x25000000 can pass pfn_valid's > validation check. It's not what we want. > > We can match section size to smallest valid size.(ex, above case, 16M) > But Russell doesn't like it due to mem_section's memory overhead with different > configuration(ex, 512K section). > > I tried to add valid pfn range in mem_section but everyone doesn't like it > due to size overhead. This patch is suggested by KAMEZAWA-san. > I just fixed compile error and change some naming. > > This patch registers address of mem_section to memmap itself's page struct's > pg->private field. This means the page is used for memmap of the section. > Otherwise, the page is used for other purpose and memmap has a hole. > > This patch is based on mmotm-2010-07-01-12-19. > > Signed-off-by: Minchan Kim > Signed-off-by: KAMEZAWA Hiroyuki > Reported-by: Kukjin Kim Thank you for working on this. I myself like this solution. I think ARM guys can make this default later (after rc period ?) Thanks, -Kame -- 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/