From patchwork Wed May 15 07:07:07 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kefeng Wang X-Patchwork-Id: 13664663 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4494DC25B7A for ; Wed, 15 May 2024 06:42:00 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 4D7B46B0109; Wed, 15 May 2024 02:41:59 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 43B3C6B010A; Wed, 15 May 2024 02:41:59 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 2B24B6B010F; Wed, 15 May 2024 02:41:59 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id 0E1BA6B0109 for ; Wed, 15 May 2024 02:41:59 -0400 (EDT) Received: from smtpin16.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id DE85D1613F5 for ; Wed, 15 May 2024 06:41:57 +0000 (UTC) X-FDA: 82119685074.16.42F6092 Received: from szxga04-in.huawei.com (szxga04-in.huawei.com [45.249.212.190]) by imf03.hostedemail.com (Postfix) with ESMTP id 108C320013 for ; Wed, 15 May 2024 06:41:54 +0000 (UTC) Authentication-Results: imf03.hostedemail.com; dkim=none; dmarc=pass (policy=quarantine) header.from=huawei.com; spf=pass (imf03.hostedemail.com: domain of wangkefeng.wang@huawei.com designates 45.249.212.190 as permitted sender) smtp.mailfrom=wangkefeng.wang@huawei.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1715755316; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=sVlsRBiViqq6LQYR2Gd0z3+5NVhBvNQDRQi413iU5Xc=; b=LQ+x4NMnrLBxz2iaB9d+kU57spjdBoLpNCfJAtudLHV6jWDt9ZSsdw69bxKSNCRBqumux4 ExF6P7OXXGpu5E2N7GwL3Pep/C20H6oLjqAty5fyy14yesi3LLHLnGkaGWmPebHgoZ/jie izA7x8lVP3wAyotU7ryqZE4oDDQUW5g= ARC-Authentication-Results: i=1; imf03.hostedemail.com; dkim=none; dmarc=pass (policy=quarantine) header.from=huawei.com; spf=pass (imf03.hostedemail.com: domain of wangkefeng.wang@huawei.com designates 45.249.212.190 as permitted sender) smtp.mailfrom=wangkefeng.wang@huawei.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1715755316; a=rsa-sha256; cv=none; b=EzyK4Abp2NjPMK8p+hEftFStlPEbFh8IeQXXOP93ZQGnw2GC3XeCz+IM8GzSpsPXuRgC2d OVH+wD3vhVWPtmtk1mT24TsErbBQviZPWGTnrJ0wKT3e7bnHWQdZ4MA4Wl+WYHO04pYXuz 6qxtF9OPXgmtrD1S9SD8bpUNWxX12M8= Received: from mail.maildlp.com (unknown [172.19.163.17]) by szxga04-in.huawei.com (SkyGuard) with ESMTP id 4VfNpX4ZlXz2Chgv; Wed, 15 May 2024 14:38:28 +0800 (CST) Received: from dggpemm100001.china.huawei.com (unknown [7.185.36.93]) by mail.maildlp.com (Postfix) with ESMTPS id 497FE1A0188; Wed, 15 May 2024 14:41:51 +0800 (CST) Received: from localhost.localdomain.localdomain (10.175.113.25) by dggpemm100001.china.huawei.com (7.185.36.93) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.35; Wed, 15 May 2024 14:41:50 +0800 From: Kefeng Wang To: Andrew Morton CC: Hugh Dickins , , Kefeng Wang Subject: [PATCH 2/4] mm: mempolicy: use folio_alloc_mpol_noprof() in vma_alloc_folio_noprof() Date: Wed, 15 May 2024 15:07:07 +0800 Message-ID: <20240515070709.78529-3-wangkefeng.wang@huawei.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240515070709.78529-1-wangkefeng.wang@huawei.com> References: <20240515070709.78529-1-wangkefeng.wang@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.175.113.25] X-ClientProxiedBy: dggems706-chm.china.huawei.com (10.3.19.183) To dggpemm100001.china.huawei.com (7.185.36.93) X-Rspam-User: X-Rspamd-Server: rspam02 X-Rspamd-Queue-Id: 108C320013 X-Stat-Signature: 5fcj3ppi4isi4cafu8tk74w5dtpon97i X-HE-Tag: 1715755314-458900 X-HE-Meta: U2FsdGVkX1+z4KkkYAyQheBF6R22S/FW5Lfe9pQnU7xBdRQVOy/EkLvzv7Hxl1GUVfNeo7qT6QLszfQ80fwM9NzUj7fm5TLStb5HQom1ke4BfeQWy5CgJhijOhlikQa/4zd88o/+W27WKy2bZuAYMjFoRI3Dvawn5ptByUwdCDalyr7BH6f3V419SL6JWMFzwOPNgfSTA5nuuxI8v+4fTGkgmd8rLLjHqQhJlvarqQWnnyt2uAGv9VMm1Q50WkF1WURXXn2vlZfz1SKdCxQSaXnQo16qnWXDO5rHeKwm45LbR+8A7IjMkuG4YwZl1Rh5q15m8wo/2peNs3TjwM64/Dv8m53png2ZZv2HXzfnrnQ6jnFbAYpov8SSwVGJwwBYMss/F/tUrZusCnKD0MT+t0emcRd5w4eRvZgTw/A7ae8Sf8YINGV6mwghvOsEqDBS3HTYVSDTr6b14dw9QtN0+LejKLZggH6StMn/Rfynkj92Apr9p7D7dKx8EBxe7HvOhMiNVLxeK2drtAWsgbGHv+lZG9gePqNuStrxtdHIEoqueaKcIioaUAhYuhHTexeHCYOLMiAS0n6T1JX1Ca8Jg1gl4do2/uDS52xHecT8yxaj/9Rx+Acdht7JMq98wpB66tozXSBtSdpvuEQBTvvVZwx6IB4kFS6gZQQHGOVAUyzXXSCOi13HfOOO9bBYC5xyAmIHuok/VLSZ7e/V6I86JWdealIKCEEq3KVa9vesfFEyj2ayZND94noNn8g+E6lIq5W4AUuyIvDMx0pA6j63DC7DnrHIaaHTxOUw2gPCsGRHHTuNdfhqw/Km/u4b9MWEM2/d8sTQXPPIbX83ors8rc7SdYGp6GAh46MVUXXXu/+VHP+G4+tHLVdnUIqOQNaZSV9SnEEC0gvD3UsOKXY71JwjQT2oWNlAxeKl3/u3356/vZT5RuN0FXla+UolsD73WdbdPibg/xo74fJ7DDv QV7iXosy YwBsCvBK5y9M0b5jp3EZpvDrpAPZHKFUQ5OHt1h4/qxliHwFt0EdVoF5a0qCECyiOUykvUhjT2ToWymkkQalrFnUjyGczbMHXDaTq55eplPjcf8DEK54KRzfo0ISybv3JzNCwsbMRUniiZ3VNwBejLWcSuY87zGlq5QxCzlskmB5znIsQgQ6uPJ65Xmg0Yem7T8PW X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: Convert to use folio_alloc_mpol_noprof() to make vma_alloc_folio_noprof() to use folio throughout. Signed-off-by: Kefeng Wang --- mm/mempolicy.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/mm/mempolicy.c b/mm/mempolicy.c index 69c431ef15d5..205d129c6744 100644 --- a/mm/mempolicy.c +++ b/mm/mempolicy.c @@ -2305,13 +2305,12 @@ struct folio *vma_alloc_folio_noprof(gfp_t gfp, int order, struct vm_area_struct { struct mempolicy *pol; pgoff_t ilx; - struct page *page; + struct folio *folio; pol = get_vma_policy(vma, addr, order, &ilx); - page = alloc_pages_mpol_noprof(gfp | __GFP_COMP, order, - pol, ilx, numa_node_id()); + folio = folio_alloc_mpol_noprof(gfp, order, pol, ilx, numa_node_id()); mpol_cond_put(pol); - return page_rmappable_folio(page); + return folio; } EXPORT_SYMBOL(vma_alloc_folio_noprof);