Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755168AbcCNHcR (ORCPT ); Mon, 14 Mar 2016 03:32:17 -0400 Received: from mail-pa0-f65.google.com ([209.85.220.65]:33869 "EHLO mail-pa0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755100AbcCNHcD (ORCPT ); Mon, 14 Mar 2016 03:32:03 -0400 From: js1304@gmail.com X-Google-Original-From: iamjoonsoo.kim@lge.com To: Andrew Morton Cc: Rik van Riel , Johannes Weiner , Mel Gorman , Laura Abbott , Minchan Kim , Marek Szyprowski , Michal Nazarewicz , "Aneesh Kumar K.V" , Vlastimil Babka , linux-mm@kvack.org, linux-kernel@vger.kernel.org, "Rafael J. Wysocki" , Joonsoo Kim Subject: [PATCH 3/6] mm/memory_hotplug: add comment to some functions related to memory hotplug Date: Mon, 14 Mar 2016 16:31:34 +0900 Message-Id: <1457940697-2278-4-git-send-email-iamjoonsoo.kim@lge.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1457940697-2278-1-git-send-email-iamjoonsoo.kim@lge.com> References: <1457940697-2278-1-git-send-email-iamjoonsoo.kim@lge.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1417 Lines: 42 From: Joonsoo Kim __offline_isolated_pages() and test_pages_isolated() are used by memory hotplug. These functions require that range is in a single zone but there is no code about it because memory hotplug checks it before calling these functions. Not to confuse future user of these functions, this patch adds comment on them. Signed-off-by: Joonsoo Kim --- mm/page_alloc.c | 3 ++- mm/page_isolation.c | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/mm/page_alloc.c b/mm/page_alloc.c index 93293b4..08d5536 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -7260,7 +7260,8 @@ void zone_pcp_reset(struct zone *zone) #ifdef CONFIG_MEMORY_HOTREMOVE /* - * All pages in the range must be isolated before calling this. + * All pages in the range must be in a single zone and isolated + * before calling this. */ void __offline_isolated_pages(unsigned long start_pfn, unsigned long end_pfn) diff --git a/mm/page_isolation.c b/mm/page_isolation.c index 92c4c36..f4c0a9b 100644 --- a/mm/page_isolation.c +++ b/mm/page_isolation.c @@ -246,6 +246,7 @@ __test_page_isolated_in_pageblock(unsigned long pfn, unsigned long end_pfn, return pfn; } +/* Caller should ensure that requested range is in a single zone */ int test_pages_isolated(unsigned long start_pfn, unsigned long end_pfn, bool skip_hwpoisoned_pages) { -- 1.9.1