Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757161Ab1DLK2F (ORCPT ); Tue, 12 Apr 2011 06:28:05 -0400 Received: from fgwmail5.fujitsu.co.jp ([192.51.44.35]:45364 "EHLO fgwmail5.fujitsu.co.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757133Ab1DLK2D (ORCPT ); Tue, 12 Apr 2011 06:28:03 -0400 X-SecurityPolicyCheck-FJ: OK by FujitsuOutboundMailChecker v1.3.1 From: KOSAKI Motohiro To: Minchan Kim Subject: Re: [PATCH 1/3] mm, mem-hotplug: fix section mismatch. setup_per_zone_inactive_ratio() should be __meminit. Cc: kosaki.motohiro@jp.fujitsu.com, linux-mm , LKML , Andrew Morton , Yasunori Goto , Rik van Riel , Johannes Weiner , KAMEZAWA Hiroyuki , Mel Gorman , Christoph Lameter In-Reply-To: References: <20110411170033.0356.A69D9226@jp.fujitsu.com> Message-Id: <20110412192751.B52B.A69D9226@jp.fujitsu.com> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit X-Mailer: Becky! ver. 2.56.05 [ja] Date: Tue, 12 Apr 2011 19:28:00 +0900 (JST) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1377 Lines: 43 Hi > On Mon, Apr 11, 2011 at 5:00 PM, KOSAKI Motohiro > wrote: > > Commit bce7394a3e (page-allocator: reset wmark_min and inactive ratio of > > zone when hotplug happens) introduced invalid section references. > > Now, setup_per_zone_inactive_ratio() is marked __init and then it can't > > be referenced from memory hotplug code. > > > > Then, this patch marks it as __meminit and also marks caller as __ref. > > > > Signed-off-by: KOSAKI Motohiro > Reviewed-by: Minchan Kim > > Just a nitpick. > > As below comment of __ref said, It would be better to add _why_ such > as memory_hotplug.c. > > "so optimally document why the __ref is needed and why it's OK" Hmm... All of memory_hotplug.c function can call __meminit function. It's definition of __meminit. We can put the same comment to every function in memory_hotplug.c. like hotadd_newpgdat(). /* we are OK calling __meminit stuff here - we have CONFIG_MEMORY_HOTPLUG */ static pg_data_t __ref *hotadd_new_pgdat(int nid, u64 start) { (snip) } But it has zero information. ;) -- 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/