Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp5823999pxb; Mon, 28 Mar 2022 18:23:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwPp7zalVlr2x+4453zGfFzHGi+b8/kN4A7e5tM6AxOm7X8HiOpy3RejvDoVuhEo5/lPso3 X-Received: by 2002:a9d:7383:0:b0:5b2:55ac:d789 with SMTP id j3-20020a9d7383000000b005b255acd789mr126268otk.382.1648517027808; Mon, 28 Mar 2022 18:23:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1648517027; cv=none; d=google.com; s=arc-20160816; b=QGLi7lp0CbjGkxo1gmvHrC1EtNSVyv4i/kooqEgPFnK9LaiECC1y1UGj5oEna/XLBo GG01J6A0Ss2nQ2u5nzrsz7d637qNXGV2DeKo1lFBw6LIeTvEk/tAAxguUrFRxr+ORKiU SQis+JdG+x1Td4KshQl5nRhsLRQ+bOtKWg4CUYNQVzEqhHw8TjG+tABUo9c+3XohzkOc 9JADCoB56uZ3GZrfAtMXRMWzM5ItL0Sa5zy7zmLx4Xkorkel9wG25NwWHv7wyKVfbPJs kYYWZn2Zkv17YbtkVapRklyy6dtZepzEmbnfDUMYIHPDxwkM6hLivdftC1J4FfnR3TtG xM0g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:subject:user-agent:mime-version:date:message-id; bh=G/hnL93vw4XcT/olkvahpX4YswysfpgJmAMU7GCbuT8=; b=ICtumxF5dQBd5CTAUni+KoF++LsELE+6H7dBASbuFbUDQ4ih5eK7DAtHT3XVpURCLl Sj8QnYRM6qdU1amLrl5Elr7RnDj+MSE/qEegZXz0/AEb+aJwCH8hYkyKptbm3AKKOA00 ltT2Z28ln5VPIomPAmAVv+S5xYHaIz146zC0qHjHcj/HepKbzv/ZkjWk0KLDoU9H+kFf ad42MFtvZbMgUADZDVaLW8v0D9o54rzis+BElROOVuITkH2kCu5GTmXQ1cl3PGle9K2p 3ZthJJDKxjeLqYna/OweDzZJHvqB+zdyL6ixy6erZ3nSy1nf2XQkYykVKOgbwjkTaGa7 Dtpw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id p22-20020a056870831600b000de12c0b3f8si11662281oae.194.2022.03.28.18.23.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Mar 2022 18:23:47 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 00B5F9D064; Mon, 28 Mar 2022 18:15:14 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229513AbiC2BQk (ORCPT + 99 others); Mon, 28 Mar 2022 21:16:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56720 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229437AbiC2BQi (ORCPT ); Mon, 28 Mar 2022 21:16:38 -0400 Received: from szxga03-in.huawei.com (szxga03-in.huawei.com [45.249.212.189]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2A4828A31D; Mon, 28 Mar 2022 18:14:55 -0700 (PDT) Received: from dggpemm500021.china.huawei.com (unknown [172.30.72.55]) by szxga03-in.huawei.com (SkyGuard) with ESMTP id 4KSBMb1hj4z9smf; Tue, 29 Mar 2022 09:10:51 +0800 (CST) Received: from dggpemm500014.china.huawei.com (7.185.36.153) by dggpemm500021.china.huawei.com (7.185.36.109) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.21; Tue, 29 Mar 2022 09:14:53 +0800 Received: from [10.174.178.120] (10.174.178.120) by dggpemm500014.china.huawei.com (7.185.36.153) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.2308.21; Tue, 29 Mar 2022 09:14:51 +0800 Message-ID: <931b1e5a-de85-f172-a834-1496bc45535e@huawei.com> Date: Tue, 29 Mar 2022 09:14:50 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.7.0 Subject: Re: [PATCH 7/9] mm: Calc the right pfn if page size is not 4K To: , , , , CC: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , References: <20220326064632.131637-1-mawupeng1@huawei.com> <20220326064632.131637-8-mawupeng1@huawei.com> <15e3f11b-1551-a9c2-c348-bbe1ae1d9ef7@redhat.com> From: mawupeng In-Reply-To: <15e3f11b-1551-a9c2-c348-bbe1ae1d9ef7@redhat.com> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit X-Originating-IP: [10.174.178.120] X-ClientProxiedBy: dggeme708-chm.china.huawei.com (10.1.199.104) To dggpemm500014.china.huawei.com (7.185.36.153) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A, RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 在 2022/3/28 20:33, David Hildenbrand 写道: > On 26.03.22 07:46, Wupeng Ma wrote: >> From: Ma Wupeng >> >> Pervious 0x100000 is used to check the 4G limit in > > s/Pervious/Previous/ > >> find_zone_movable_pfns_for_nodes(). This is right in x86 because >> the page size can only be 4K. But 16K and 64K are available in >> arm64. So replate it with SIZE_4G >> PAGE_SHIFT. > > s/replate/replace/ > >> >> Signed-off-by: Ma Wupeng >> --- >> mm/page_alloc.c | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/mm/page_alloc.c b/mm/page_alloc.c >> index 6e0b4596cde9..41fd987b5b93 100644 >> --- a/mm/page_alloc.c >> +++ b/mm/page_alloc.c >> @@ -7811,7 +7811,7 @@ static void __init find_zone_movable_pfns_for_nodes(void) >> >> usable_startpfn = memblock_region_memory_base_pfn(r); >> >> - if (usable_startpfn < 0x100000) { >> + if (usable_startpfn < (SZ_4G >> PAGE_SHIFT)) { > > PHYS_PFN(SZ_4G) > > ? > Thanks for reviewing, will be fixed in the next version. Thanks. >> mem_below_4gb_not_mirrored = true; >> continue; >> } > >