From patchwork Mon Jul 21 03:46:42 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wang Nan X-Patchwork-Id: 33940 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-pa0-f72.google.com (mail-pa0-f72.google.com [209.85.220.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 7548220492 for ; Mon, 21 Jul 2014 03:57:29 +0000 (UTC) Received: by mail-pa0-f72.google.com with SMTP id eu11sf51539661pac.11 for ; Sun, 20 Jul 2014 20:57:28 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe:content-type; bh=GdIBWi5sSEAu6QOkJIIRmr9Ls3srGNOpMFkv/PIuFsM=; b=hoG498HtBWmRsoPxq9yqZ3m6xC1fBlP062t6MRrRWwiV9fsY5XWQJ9k3CyVyxRlrGn KZAn+mwTazmhxzXsdiaCtu8o8nrjp6OzQJU6lRB63he4OwFECgZwmqEXIht9NnT+pwPx Izhm0ThrIyI6EEmJw4ql3DleYswL+yZO2CBLNJXDs75k/sWlZ77p38afXgNpEcnK/zR8 hvZdlOSWw45DCI/g/+i/Bjs/Abb6xOVlwP4cKh4U+sOFsHyD1ApGzpe6eCaDEo4lwtd9 igIICBslEPeeD3Rd32lzGSWAvegLt5YiSUHLHE8pK8eJ6tinWuWgZQ4Uy8gYlJXr0VwY sNTg== X-Gm-Message-State: ALoCoQn0fNXOk5wR9uOpybUs5I2LeNg7kc0RI8u0HoGAPmBb3MZ9PXVcztIWBmTiKtdbVucqmj4K X-Received: by 10.66.65.142 with SMTP id x14mr11375229pas.14.1405915048760; Sun, 20 Jul 2014 20:57:28 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.44.75 with SMTP id f69ls1602270qga.96.gmail; Sun, 20 Jul 2014 20:57:28 -0700 (PDT) X-Received: by 10.220.190.197 with SMTP id dj5mr25923586vcb.19.1405915048626; Sun, 20 Jul 2014 20:57:28 -0700 (PDT) Received: from mail-vc0-f182.google.com (mail-vc0-f182.google.com [209.85.220.182]) by mx.google.com with ESMTPS id vp2si10638437vcb.66.2014.07.20.20.57.28 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 20 Jul 2014 20:57:28 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.182 as permitted sender) client-ip=209.85.220.182; Received: by mail-vc0-f182.google.com with SMTP id hy4so11119530vcb.41 for ; Sun, 20 Jul 2014 20:57:28 -0700 (PDT) X-Received: by 10.220.163.3 with SMTP id y3mr26095000vcx.7.1405915048540; Sun, 20 Jul 2014 20:57:28 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.221.37.5 with SMTP id tc5csp79982vcb; Sun, 20 Jul 2014 20:57:28 -0700 (PDT) X-Received: by 10.70.34.73 with SMTP id x9mr22284575pdi.27.1405915047712; Sun, 20 Jul 2014 20:57:27 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id ta6si12903122pab.54.2014.07.20.20.57.27; Sun, 20 Jul 2014 20:57:27 -0700 (PDT) Received-SPF: none (google.com: linux-kernel-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752989AbaGUD5N (ORCPT + 9 others); Sun, 20 Jul 2014 23:57:13 -0400 Received: from szxga01-in.huawei.com ([119.145.14.64]:25261 "EHLO szxga01-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752213AbaGUD46 (ORCPT ); Sun, 20 Jul 2014 23:56:58 -0400 Received: from 172.24.2.119 (EHLO lggeml420-hub.china.huawei.com) ([172.24.2.119]) by szxrg01-dlp.huawei.com (MOS 4.3.7-GA FastPath queued) with ESMTP id BYZ66479; Mon, 21 Jul 2014 11:56:48 +0800 (CST) Received: from kernel-host.huawei (10.107.197.247) by lggeml420-hub.china.huawei.com (10.72.61.115) with Microsoft SMTP Server id 14.3.158.1; Mon, 21 Jul 2014 11:56:37 +0800 From: Wang Nan To: Ingo Molnar , Yinghai Lu , "Mel Gorman" , Andrew Morton , "Dave Hansen" , Zhang Yanfei CC: , , , , , , , Subject: [PATCH v2 7/7] memory-hotplug: tile: suitable memory should go to ZONE_MOVABLE Date: Mon, 21 Jul 2014 11:46:42 +0800 Message-ID: <1405914402-66212-8-git-send-email-wangnan0@huawei.com> X-Mailer: git-send-email 1.8.4 In-Reply-To: <1405914402-66212-1-git-send-email-wangnan0@huawei.com> References: <1405914402-66212-1-git-send-email-wangnan0@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.107.197.247] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: wangnan0@huawei.com X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.182 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , This patch introduces zone_for_memory() to arch_add_memory() on tile to ensure new, higher memory added into ZONE_MOVABLE if movable zone has already setup. This patch also fix a problem: on tile, new memory should be added into ZONE_HIGHMEM by default, not MAX_NR_ZONES-1, which is ZONE_MOVABLE. Signed-off-by: Wang Nan Cc: Zhang Yanfei Cc: Dave Hansen --- arch/tile/mm/init.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/tile/mm/init.c b/arch/tile/mm/init.c index bfb3127..22ac6c1 100644 --- a/arch/tile/mm/init.c +++ b/arch/tile/mm/init.c @@ -872,7 +872,8 @@ void __init mem_init(void) int arch_add_memory(u64 start, u64 size) { struct pglist_data *pgdata = &contig_page_data; - struct zone *zone = pgdata->node_zones + MAX_NR_ZONES-1; + struct zone *zone = pgdata->node_zones + + zone_for_memory(nid, start, size, ZONE_HIGHMEM); unsigned long start_pfn = start >> PAGE_SHIFT; unsigned long nr_pages = size >> PAGE_SHIFT;