From patchwork Mon Aug 5 16:31:17 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aruna Ramakrishna X-Patchwork-Id: 13753821 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 06E37C3DA4A for ; Mon, 5 Aug 2024 16:31:31 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 5B0B66B00A4; Mon, 5 Aug 2024 12:31:31 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 55FE46B00A8; Mon, 5 Aug 2024 12:31:31 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 4276F6B00AA; Mon, 5 Aug 2024 12:31:31 -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 1F3CA6B00A4 for ; Mon, 5 Aug 2024 12:31:31 -0400 (EDT) Received: from smtpin21.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay03.hostedemail.com (Postfix) with ESMTP id 5DBDEA217E for ; Mon, 5 Aug 2024 16:31:30 +0000 (UTC) X-FDA: 82418732340.21.AE737CF Received: from mx0a-00069f02.pphosted.com (mx0a-00069f02.pphosted.com [205.220.165.32]) by imf08.hostedemail.com (Postfix) with ESMTP id 55FEB160012 for ; Mon, 5 Aug 2024 16:31:27 +0000 (UTC) Authentication-Results: imf08.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-11-20 header.b=nMNye1oV; dmarc=pass (policy=reject) header.from=oracle.com; spf=pass (imf08.hostedemail.com: domain of aruna.ramakrishna@oracle.com designates 205.220.165.32 as permitted sender) smtp.mailfrom=aruna.ramakrishna@oracle.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1722875419; 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-transfer-encoding:content-transfer-encoding: in-reply-to:references:dkim-signature; bh=Od6tdgsKPJMjGN18upXQn/G2mVuedNwUlfV18/Qb/9w=; b=S3cBav564/u4ZRK4x+p33c+giVkdvKLy4R/v8W/ABTrOuFOqshl1nkMtEakGDC8wAC/Ti2 jFBFwS5E1Bg/3OzyV2kE1ITAlIa6UVVkOZejZ67LUR5s2vziajKOC7tAOx3OpQcj4yT3zg kIx+ygn6IlJlOo8O58CyMMIdPL138Kg= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1722875419; a=rsa-sha256; cv=none; b=3JC0uW0n7hoEB1LUj7xN9cOdFvE+3ln2c7hymksTxQ3UUS//A94f/gSvwRmCapxt5Dtu1V AHrkhoW+Dw20kGoScycQKqD2h1BnKDemGMBNM/pjl1zpr37S8Wfc4iNm5bhy4afgtwMewA qABtTai6sNUQsHNDYAiFGsF/u6EUcEk= ARC-Authentication-Results: i=1; imf08.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-11-20 header.b=nMNye1oV; dmarc=pass (policy=reject) header.from=oracle.com; spf=pass (imf08.hostedemail.com: domain of aruna.ramakrishna@oracle.com designates 205.220.165.32 as permitted sender) smtp.mailfrom=aruna.ramakrishna@oracle.com Received: from pps.filterd (m0246629.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 475FtXiE007446; Mon, 5 Aug 2024 16:31:24 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h= from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; s=corp-2023-11-20; bh=Od6tdgsKPJMjGN 18upXQn/G2mVuedNwUlfV18/Qb/9w=; b=nMNye1oVYTC4WBz48tH/Du0NEJ+Xp4 FsjySV9EX1Ut6K9WZ36GznE5IQaHo4+n9MDs/tJ5NxQyt9TV7qs97XHU2ZblMrQy zwyWfS0u9447WO/l4p9hQ55/XOQrZmAMp/Isz/DVAOMCx7GVBNKmNk35N2wXQr+e 2Uh5WLrohR6tyB7YcYEpZskG+Hcj8u+Lt9wza7XK5O9iDnCAH5PWn5bLWyBaOxgi jEawR9FGAvQl1UEr0IfSSryPn7Irlak37Z4nBhjhPKMBJ5ASZCcYDmvK2tWeHwub DkIE6BZgusfOsQEKCF89jiCkyRduyXfFV1gUdZ4BwX0sAxytSvVExHUg== Received: from phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta03.appoci.oracle.com [138.1.37.129]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 40sce931fy-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 05 Aug 2024 16:31:23 +0000 (GMT) Received: from pps.filterd (phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 475FFp7X035030; Mon, 5 Aug 2024 16:31:23 GMT Received: from pps.reinject (localhost [127.0.0.1]) by phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 40sb07mdd8-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 05 Aug 2024 16:31:23 +0000 Received: from phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 475GPvBX002152; Mon, 5 Aug 2024 16:31:22 GMT Received: from aruramak-ol9.osdevelopmeniad.oraclevcn.com (aruramak-ol9.allregionaliads.osdevelopmeniad.oraclevcn.com [100.100.250.99]) by phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTP id 40sb07mdcs-1; Mon, 05 Aug 2024 16:31:22 +0000 From: Aruna Ramakrishna To: linux-mm@kvack.org Cc: willy@infradead.org, aruna.ramakrishna@oracle.com Subject: [PATCH 1/4] mm/mempolicy: Use folio_alloc_mpol_noprof() in alloc_pages_noprof() Date: Mon, 5 Aug 2024 16:31:17 +0000 Message-ID: <20240805163120.5971-1-aruna.ramakrishna@oracle.com> X-Mailer: git-send-email 2.43.5 MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.680,FMLib:17.12.28.16 definitions=2024-08-05_05,2024-08-02_01,2024-05-17_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 spamscore=0 phishscore=0 mlxlogscore=999 mlxscore=0 adultscore=0 malwarescore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2407110000 definitions=main-2408050119 X-Proofpoint-GUID: 4U1LaNqbcZYJjQ1n5tVyMl8HGO-JbONY X-Proofpoint-ORIG-GUID: 4U1LaNqbcZYJjQ1n5tVyMl8HGO-JbONY X-Rspamd-Server: rspam07 X-Rspamd-Queue-Id: 55FEB160012 X-Stat-Signature: gggycw8wix4k8ipfyih9sb15k71pbkz5 X-Rspam-User: X-HE-Tag: 1722875487-883307 X-HE-Meta: U2FsdGVkX19Mlvc+Znvn1hd99d1RzMCd5EHpXd5/I5BAN2S6A7LWP7NhU1skrwzGGqEXDUq6+fE5DnROZp8eFdZDpBEe5sBcFEcU6/Ms0wiGfmvZEq1WKd1Fo4PW4QgZUzFBtpDjql8pebqOJDZkZ7RObVfk4XrYItKvQ15bZtQJvCRQfG56KLVA+uqbq9tkWgoGC5/3PcDcqzk0mM+XpIsaC2oVtJ/YszVDuQ3FMAzes99aYhNCqtiPKqLr+nReMHVUTLYEZXsKNo92xjqowGioixNd0NgrbJC4wGU7ygmdTMaYGO17Ucg4mZ/gi8tXZA5Y36jG8uAz/ntxJbsXQn3vAz1bch+06dFU0izaCxYVRzg+Dyb+wQALTK2iOUgl6wuQyJUMb2ZutrtkAXPh+T9qwChyrqS1f4weMZAk4ZD9LOOszYoVTQAKC52pibqEaJFl/P1S7aNkYkdzeAYt4rZAxC0VNyx7sb5F63VhRe2bHukrMnSpg1Udpkz3J6hOOy98v16N6fTCe94riVSXSkpEA1kdqUVTW5vzME0PjUO0HpVXpC9JUZ4G2F8W7TEFIQFZ2Bde2deIGYPuvaHtdu2GZ/Y/3lyr8YtwxTHZmvX9Dq/bCOJjBXGCbzDWpC/XZTFc9ihFC15SZS/5d0eEsf484rMfVu+mKjZfWl0F9lt66eJHC5VVG0MJakPu5+msfaOXoijuB8n9023ztcTcYiGttpgXHZobbSDFQMy/E/MGbfa1q34Dj/hF/aImr8flXzFSnKuGjo2l+YiTQXyL147d48DMgA0xo3DP12I/FAOGRf7NRbDFBwYQQqrLoGO6uHfg2zf+ojdZ01Vw6GBHl+9Meevzz3fN4nd6Mp4ru9EuXn/fNqn3NYuZpNOVuC6LKUZUhvzJ188VclB2TzbW3EcPVNtW8Ov6MNrJPA3QDEs0NLz/8qxuh/gO9xrfPQxHX4H5xgq2jj2QN4QI1ly ylujWXu9 uPJIGiAnY5veac1Ld1dnPeYMiKeFNHdL/wpgucH3snV5uPol9XP59HHCjfajRFfJxX8sGZQuulkw0EIRHxvZjvoV2A5DAuqJ4h5QD679sLSRqmZ92S6L2OIQrPNgoaB7fvsxVUkIgGNSbNnlZxvK7SVYqBhnzxM//OWFU+uoP7soxJhcKsgz4qp93piyvHma4V+TnX16ztg57NKzfaDdGwNI187jQhH6m0YpGiyyEDF59ghgV2lX7dLK0l07EqWYY7/VF0e5QnWPixu6+KHGr0bDPGeIm18tmcjsaNOaaR9P/q44= 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 alloc_pages_noprof() to use folio_alloc_mpol_noprof() so that alloc_pages_mpol(_noprof)() can be removed in a future commit. Signed-off-by: Aruna Ramakrishna --- mm/mempolicy.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) base-commit: 2b820b576dfc4aa9b65f18b68f468cb5b38ece84 diff --git a/mm/mempolicy.c b/mm/mempolicy.c index b3b5f376471f..2d367ef15d0f 100644 --- a/mm/mempolicy.c +++ b/mm/mempolicy.c @@ -2332,6 +2332,7 @@ EXPORT_SYMBOL(vma_alloc_folio_noprof); struct page *alloc_pages_noprof(gfp_t gfp, unsigned int order) { struct mempolicy *pol = &default_policy; + struct folio *folio; /* * No reference counting needed for current->mempolicy @@ -2340,8 +2341,10 @@ struct page *alloc_pages_noprof(gfp_t gfp, unsigned int order) if (!in_interrupt() && !(gfp & __GFP_THISNODE)) pol = get_task_policy(current); - return alloc_pages_mpol_noprof(gfp, order, pol, NO_INTERLEAVE_INDEX, - numa_node_id()); + folio = folio_alloc_mpol_noprof(gfp, order, pol, NO_INTERLEAVE_INDEX, + numa_node_id()); + + return &folio->page; } EXPORT_SYMBOL(alloc_pages_noprof);