From patchwork Thu Dec 5 09:05:07 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Hildenbrand X-Patchwork-Id: 13894869 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 A610DE7716C for ; Thu, 5 Dec 2024 09:05:20 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 2196F6B008C; Thu, 5 Dec 2024 04:05:20 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 1C9876B0092; Thu, 5 Dec 2024 04:05:20 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 069846B0093; Thu, 5 Dec 2024 04:05:19 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id DAF776B008C for ; Thu, 5 Dec 2024 04:05:19 -0500 (EST) Received: from smtpin08.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id 932D31C829E for ; Thu, 5 Dec 2024 09:05:19 +0000 (UTC) X-FDA: 82860320844.08.FFBDE1C Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by imf02.hostedemail.com (Postfix) with ESMTP id ED4F780017 for ; Thu, 5 Dec 2024 09:04:47 +0000 (UTC) Authentication-Results: imf02.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=Y7GGVtgD; spf=pass (imf02.hostedemail.com: domain of dhildenb@redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=dhildenb@redhat.com; dmarc=pass (policy=none) header.from=redhat.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1733389501; 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:dkim-signature; bh=lZSFDwJlAKXFJSXVwhmhlyEP18MO+pVAWVa/JNjtNys=; b=8r766AefYHKZhSa6mnw28qR7klWmDkMnwdcLwcmxJdhnCPIEywTr1x/dNQUYOvg4QVjk/W bCXbDMeoLXuW+/kudL/IMi8nV7h2fKxiIf9UdAiXi7PTFdmsuUOn6hO4QGRK+V85lJPkVC NaTjZqhk2Dd0Tgo7wo6kPeFuUJce6CE= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1733389501; a=rsa-sha256; cv=none; b=5yl6aJoSD5zXyIHSEZQDc4iY48IXPefMQ2Ku7hk0ZzLX563MCBaRPzclv5DnzLQCWZoYww PYCO3rDzXGVXEXuyeM6zvk2EeL2ApHmbkJFh0Jxax4wHUi1NxzrHyUxoZqnHD0sVQruw+8 96zPFh1VPpRu6iTg+CkjbDMaoKc1x6E= ARC-Authentication-Results: i=1; imf02.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=Y7GGVtgD; spf=pass (imf02.hostedemail.com: domain of dhildenb@redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=dhildenb@redhat.com; dmarc=pass (policy=none) header.from=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1733389516; h=from:from: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=lZSFDwJlAKXFJSXVwhmhlyEP18MO+pVAWVa/JNjtNys=; b=Y7GGVtgDXXlbE5fPCuITE4ZAub1o1Yoa4OnY1bdq0OYzjjS/l1/K2/l4y8UsdJSogxraxk KKmvXl673XfUCgJv/fGC6A+zfWKfNQO8+p0MqcQdSpRnnTpXANjoigQ1t3KegLPJ7cEM0s LwBQzVV+AUVTN/TaAkIoiufDEM2Okp4= Received: from mail-wr1-f69.google.com (mail-wr1-f69.google.com [209.85.221.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-353-b3PbIfcTMwC-QxD8XAk4eg-1; Thu, 05 Dec 2024 04:05:15 -0500 X-MC-Unique: b3PbIfcTMwC-QxD8XAk4eg-1 X-Mimecast-MFC-AGG-ID: b3PbIfcTMwC-QxD8XAk4eg Received: by mail-wr1-f69.google.com with SMTP id ffacd0b85a97d-385e27c5949so461074f8f.3 for ; Thu, 05 Dec 2024 01:05:15 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1733389514; x=1733994314; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=lZSFDwJlAKXFJSXVwhmhlyEP18MO+pVAWVa/JNjtNys=; b=mn2sYWeh+qU/5i75VwKpxrw07S7y4UGVtH2lI9uBf++s3vRZ/phyENuMyN2dyKUjV6 FZE9zeZ6wdhAeqAggjGUjgjFCwXglFRZcTggFRFvGgurX1EovjcGMgLmv1XMzmiYdV6P A3gAT7gY5YuUP5KxFm9npiruhLrkoluFUKwdAQZWggBfa/3/QnXb7kFURuHv2k6neByr Q5eCe0jBtgqWP+SII9Qi2bEt1sILmy4/LcFPGo8F1i6mfz89HLuI1xvT12L42Z1W38AT GVrYZDR0TExDzlDhF5IEm/uCRrs4ik31pOyikW62JppDUtCtKziivWWj+QZgeZo7iYmQ 8qKg== X-Gm-Message-State: AOJu0Yz081RVvBi7kASi1g++cKxO5nDJRcG6KdKfHZ4lU20I9D5WeAXa O6n2CkbJyDqu1EJRqA57ocCimXG34XZI9Jq/gxALTFigfNpmvKc1eXWxJInMiQuU9O7pJVbdZ1d Hj8sCclMzH4QsfQiK022KKmF5/MtkRcrj4CrRbk/L5xdMCxEm X-Gm-Gg: ASbGncvVLJTHLz3O+1UR+BdB8M/k2aOxOMuHsDrPp8J+s5x6WZn+JL79fCtu5dkGpvG wpNFB8Ex3piHxjp8GURS5hQ9PfWsOwOu9VGi/s+Oj5xv+RSrKbj6SURWK+MlVj2rZsfEQlDwcxk j2lUIIbJuR+OwQWtkHbeaHeZDWdCXNubuT6zkUcPfBaDgN+FVxrxgNaIhfutlB8qcfw+hQz2AiW QOVm4e8/7kGyj62LRycVaAjUU/PeBniYZ+7zK167RDzMOlXm6a6vzGuksDFfZmUlugTq8BuCME3 fnYWfn14TfgRCg+v4uLn0USluNXXSa0MqSI= X-Received: by 2002:a5d:64a4:0:b0:385:dedb:a156 with SMTP id ffacd0b85a97d-385fd3c698emr7956179f8f.6.1733389514618; Thu, 05 Dec 2024 01:05:14 -0800 (PST) X-Google-Smtp-Source: AGHT+IFCrbcpW1Xi07pKqvUBrMBHYZrVQRE4roT9Z5e8o7Kih4pqEH8fCaIymgDgFkTeIR8MpLgkow== X-Received: by 2002:a5d:64a4:0:b0:385:dedb:a156 with SMTP id ffacd0b85a97d-385fd3c698emr7956147f8f.6.1733389514244; Thu, 05 Dec 2024 01:05:14 -0800 (PST) Received: from localhost (p200300cbc70f7e0075dc9c4033fab5f8.dip0.t-ipconnect.de. [2003:cb:c70f:7e00:75dc:9c40:33fa:b5f8]) by smtp.gmail.com with UTF8SMTPSA id ffacd0b85a97d-3861ecf4395sm1365949f8f.10.2024.12.05.01.05.11 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 05 Dec 2024 01:05:12 -0800 (PST) From: David Hildenbrand To: linux-kernel@vger.kernel.org Cc: linux-mm@kvack.org, David Hildenbrand , Andrew Morton , Vlastimil Babka , Oscar Salvador , Zi Yan Subject: [PATCH RESEND v1 1/2] mm/page_alloc: don't use __GFP_HARDWALL when migrating pages via alloc_contig*() Date: Thu, 5 Dec 2024 10:05:07 +0100 Message-ID: <20241205090508.2095225-2-david@redhat.com> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20241205090508.2095225-1-david@redhat.com> References: <20241205090508.2095225-1-david@redhat.com> MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: vMrfQTmxoQe6Vui3anwIbTy4zrUkNKYSga9n-wy5qaY_1733389515 X-Mimecast-Originator: redhat.com content-type: text/plain; charset="US-ASCII"; x-default=true X-Rspamd-Queue-Id: ED4F780017 X-Rspam-User: X-Rspamd-Server: rspam07 X-Stat-Signature: duwot3dp6bbbqonuxpgazrcupydhsaze X-HE-Tag: 1733389487-409006 X-HE-Meta: U2FsdGVkX184S/Xly+NtwqFUP13jGAVVwvuy2z9++5+UCCNjK7/chE22Lycx4rdDLc6TTNQqUtF8XBvxlZhUuFqD0FjGk3O4ug/gCNNxosB3hWqxGwVhlGcmLLB6AlepHGnOLI2O7xj+T9LI6WxR1pXcOx8yILTuwzW0axjefZr5XiJq3TwSAa4on2QtHggZ1jwEqXsR3L1LcX/6YakvpvFox3lBz3xO+rMVgPPZKBSlU2Tu6PYdHNfTIp2v9Nkm0lLlVfMreL6LfcKWCsB0zY5tizMyeNGKptjUF+Ep1hCdhEvh/NCMmSLbMMMwUqh7GgHR3featx1M+KwWtYVRhn0+QOT2Ykhg421xV2VNzix4eiMFxp/bvCEEEEDuJ0XLrvQswtqNgfeEWxWyjb0TOlUwSesltn7kpZJaozmiQWUKE9bPM64rZHe/mvL/kD22vjuAB28HB6ZL2H5lC7q8YI0/lbyTakbNOHfmKXe8mnKo5Ur/oE+hzG62Wm2GNBMW85jfEtmuarX3zCi4qp+tR9ff1Db6wp2eOFteA4Xm/SfZE9Mf29+SL7lU6wq9jvM47gUMHq0/Bc76/KYGbMQrkRuoRAqZf242AuRcu9Y/wjYZL66w3ksiCGoYB86WIT0qiNDUCwPAEkGTr4fQ9yyFF6soneGhbkYV8xcdcocAe4m6iLXplgQtgRlbd3zZ+zSO0eSlxrKdpqG8rqkd45chaNzyKbgFi/XfC9qJ0QW9uaMP1cH6q7gnpX3MuPxCTx/eVvVXAWgRMeuH0V66YJHd5mIsI767ICtAnmydgJkhKrBAy16h0kZ+HDvUm5VUx7ZV3gSym6xB33SvABNnd7apWKVUKZbvylBJJSH35+HHevxILsWaRfFcYS5T+bL4UwfZjqS/q+VL3kUBJhuVWtDQ/APMydFcYIhFowkJ/elthQf+CFRwk0VOEu+B54y/0N/RL45OfUFllwb7u4EH2QF TGLZ6Y2c GYFnKfb3cAQz6dXfjd/59YzKmGv2AiTSqQeNMSN3VkOIxYB/A+WUvnTq29gav652RNPkZOIr+BAXhWlXorq0QarECP7NrzMBdBop5RxSCbpho/jriRmdjrYGsQb/8BjIsZzagetH/4EY4gY0+/givR+pHjzMfB/P5hamvglXd5LqR9QOfLwzztyGMcIcYZIqHUATTFR+spwgOrKNcURace3c01ea8tPdxy6Z2er44quFVh8QNVBxkfQjGOeI2qgPblliw9vcNs38snf5pzT1sV6yuS/rvczgCmVAWou2BggGA8w0nD/8aMLHLeqPs0RbisjGZh8mzyT+EFpgUj5eVnFjYhXvmibmHVeQ+4f7o5UjE7PYi6o5rPD5ApEjX196DSk37UXO0Sy2PaWZSeZ+zBXjd9TZEShSdps6y9hWt2jEpvsZITiJOxTCI+YJIpEGtfw/kXZRutyX5BVBYKB/wu7ytjLMQ/IqKQk+0 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: We'll migrate pages allocated by other contexts; respecting the cpuset of the alloc_contig*() caller when allocating a migration target does not make sense. Drop the __GFP_HARDWALL. Note that in an ideal world, migration code could figure out the cpuset of the original context and take that into consideration. Suggested-by: Vlastimil Babka Signed-off-by: David Hildenbrand Reviewed-by: Vlastimil Babka --- mm/page_alloc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mm/page_alloc.c b/mm/page_alloc.c index 48a291c485df..acadfcf654fd 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -6410,11 +6410,11 @@ static int __alloc_contig_verify_gfp_mask(gfp_t gfp_mask, gfp_t *gfp_cc_mask) * page range. Migratable pages are movable, __GFP_MOVABLE is implied * for them. * - * Traditionally we always had __GFP_HARDWALL|__GFP_RETRY_MAYFAIL set, - * keep doing that to not degrade callers. + * Traditionally we always had __GFP_RETRY_MAYFAIL set, keep doing that + * to not degrade callers. */ *gfp_cc_mask = (gfp_mask & (reclaim_mask | cc_action_mask)) | - __GFP_HARDWALL | __GFP_MOVABLE | __GFP_RETRY_MAYFAIL; + __GFP_MOVABLE | __GFP_RETRY_MAYFAIL; return 0; } From patchwork Thu Dec 5 09:05:08 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Hildenbrand X-Patchwork-Id: 13894870 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 C4869E77173 for ; Thu, 5 Dec 2024 09:05:22 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 5771A6B0092; Thu, 5 Dec 2024 04:05:22 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 4D7356B0093; Thu, 5 Dec 2024 04:05:22 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 350F76B0095; Thu, 5 Dec 2024 04:05:22 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id E7A996B0092 for ; Thu, 5 Dec 2024 04:05:21 -0500 (EST) Received: from smtpin11.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id 980241614E1 for ; Thu, 5 Dec 2024 09:05:21 +0000 (UTC) X-FDA: 82860321348.11.BC6FF42 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by imf21.hostedemail.com (Postfix) with ESMTP id D6E911C0010 for ; Thu, 5 Dec 2024 09:04:49 +0000 (UTC) Authentication-Results: imf21.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b="RJ/lDmVM"; dmarc=pass (policy=none) header.from=redhat.com; spf=pass (imf21.hostedemail.com: domain of dhildenb@redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=dhildenb@redhat.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1733389505; a=rsa-sha256; cv=none; b=uHYxp0Z779r9xhlBQ8Ojh0R2qjwqi3+oBWX2DZWyLvQYzPt4z0l0loQPfVqkdVg9U40j2i 7WnQ7gP2Xuc19l+pO1L8xRgG4sludLb8mfmtlzDsI8GNCNvNEvnZ9LZ0WyqOvvonk2mwdu F0eBbprtTmCd4GnyAQ9Lp6TvvZm5vnY= ARC-Authentication-Results: i=1; imf21.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b="RJ/lDmVM"; dmarc=pass (policy=none) header.from=redhat.com; spf=pass (imf21.hostedemail.com: domain of dhildenb@redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=dhildenb@redhat.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1733389505; 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:dkim-signature; bh=5/0LS59BHWZxT7JElUljbxSyn36zBZn8FjqEt24DcDM=; b=bNYGtvj/kxylQwmoJCk1380c1wl3bFROC/xQC6DGM7ssmmXqsoxJ2nXQrafFbwHN5ZAPLW vP5j+rJyhm2hYR69y0ZMj4K1ZYbZcQ8L5GzODsGjNLV5wswUqCpjXxC+s53zzf8M7lCsAc pCc8zoEFUHfjm1VqouhJDid+dxs1/GI= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1733389518; h=from:from: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=5/0LS59BHWZxT7JElUljbxSyn36zBZn8FjqEt24DcDM=; b=RJ/lDmVMQoFMqEVj1bI8cgU84JtdM1ncOwvpUATer5FJIiCXZ0yKcAublKIBg0cENuM3HV Rfpgrfj1BZhnqXJnb04xx+I8xlep4gBGVTpKjeJ1FOThh2x4vbT9UjuAHzoDrS/a8FJyvC KWKMmM674QrWysi47l6GapVdv1PK3Qs= Received: from mail-wm1-f69.google.com (mail-wm1-f69.google.com [209.85.128.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-594-rA_fQTooPPmaFJ9weGy6KA-1; Thu, 05 Dec 2024 04:05:17 -0500 X-MC-Unique: rA_fQTooPPmaFJ9weGy6KA-1 X-Mimecast-MFC-AGG-ID: rA_fQTooPPmaFJ9weGy6KA Received: by mail-wm1-f69.google.com with SMTP id 5b1f17b1804b1-4349cbf726cso3916505e9.3 for ; Thu, 05 Dec 2024 01:05:17 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1733389516; x=1733994316; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=5/0LS59BHWZxT7JElUljbxSyn36zBZn8FjqEt24DcDM=; b=gMJx9VS4Wh6uQ1legI/GXGJEm1+1SQWA7v1BkmyPtZMhzFVhrR4XX1Q6A1S757xdSU lLoHBSj2ltJ3Md9/w1JZjjDq5RSusXJEV0nN7IOucocquLMNbmC4pDAR85k7ODzVCyQc ymocGdmv+KpkYc38nlqUXiDRkzNQ8ziF0qfMRXMqZrWozA2JP0Qlk16JptmclAHbum4K b1QhbRptPc+LhzNA7tbMAnTJI3/yjjFOTKapldGsSOe0QEfIPZR171TTWrg1M+8tJqAP /0mM72Dllfrz8KU9G68AYNgEuF7gmMFhA+m7Y3lLjyOfombcDowJJwtIjP1wImHx7TOQ vh9w== X-Gm-Message-State: AOJu0YyieZT0dHNn28W98c/Exp6sVOvB38bB0Wssq1XoFwjHWoh1x5CR 2Ydr8+Md4fHzPyIRqDYXTAyatSkoN6+xYWGlk36vqvIEFQVz2Fde72fpY56bnq5EpoFkLIxdnjH WPycQl/AtPlihCqmjt3eZpbPYWxbiWIkAnKpuOh4Ry4HrOme1 X-Gm-Gg: ASbGnctDQYQxB5uhcul9KpgtqcbulWCS3kH5a4dtUWmlYP2d/eQefwRNj9XIKqbsjWf /FD+52aDVUhEqZ4L+NZWoSlta9lBlvCWtGDPLsltns8hX3Gwl58siQpdRWRIc0Bp1ce3TnQFipU 5sDu9gsaKif/B/Tny/ncyqW4KTxB85XQIbOhGu1fNgNoMci5JGl/AtolQ9aX3Wb1Yve1c4cqdiY AiIvgD96OK6epWurLkk0SEMHRNssXyLa/v5SV8Waqo82iXwqEk4ulI6P3wYB1vIoux2raoKaiur ZKcWi0TNPyOLmMCTD4wS5bwE1KoCOqJfKl0= X-Received: by 2002:a05:600c:35cf:b0:434:a468:4a57 with SMTP id 5b1f17b1804b1-434d0a05539mr70033095e9.26.1733389516090; Thu, 05 Dec 2024 01:05:16 -0800 (PST) X-Google-Smtp-Source: AGHT+IHQqVLYjIJ1d4o17MERRj4yqcyMU0hiG8tJDOLp6qs8yInZknFYNU+tG/5AZ6N4sYAJeUosgw== X-Received: by 2002:a05:600c:35cf:b0:434:a468:4a57 with SMTP id 5b1f17b1804b1-434d0a05539mr70032885e9.26.1733389515758; Thu, 05 Dec 2024 01:05:15 -0800 (PST) Received: from localhost (p200300cbc70f7e0075dc9c4033fab5f8.dip0.t-ipconnect.de. [2003:cb:c70f:7e00:75dc:9c40:33fa:b5f8]) by smtp.gmail.com with UTF8SMTPSA id 5b1f17b1804b1-434d526ac03sm55521585e9.4.2024.12.05.01.05.14 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 05 Dec 2024 01:05:15 -0800 (PST) From: David Hildenbrand To: linux-kernel@vger.kernel.org Cc: linux-mm@kvack.org, David Hildenbrand , Andrew Morton , Vlastimil Babka , Oscar Salvador , Zi Yan Subject: [PATCH RESEND v1 2/2] mm/memory_hotplug: don't use __GFP_HARDWALL when migrating pages via memory offlining Date: Thu, 5 Dec 2024 10:05:08 +0100 Message-ID: <20241205090508.2095225-3-david@redhat.com> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20241205090508.2095225-1-david@redhat.com> References: <20241205090508.2095225-1-david@redhat.com> MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: BJAuwIAxgCLRgaxDA_d5mDXWCD0eTdz8da9z0FY3-TI_1733389516 X-Mimecast-Originator: redhat.com content-type: text/plain; charset="US-ASCII"; x-default=true X-Stat-Signature: mb87zod78b56aat3ibxr3cno7upxne6a X-Rspam-User: X-Rspamd-Queue-Id: D6E911C0010 X-Rspamd-Server: rspam08 X-HE-Tag: 1733389489-992084 X-HE-Meta: U2FsdGVkX1+Xp+Pd4M8RiTEJXxsYTHn8uv+gsSnYMNQXaqp6fKjitJq7bxMk+g7dYUydGvV8S0emoEvR3eyRd1yKCZcpyA3JRoAAQX8K6JxEqSKn61962VnwaYfYvOmJWDHtyZwExtFi2dy2BgDsgDBm8a4Ns3FzK8kE0Rb9ceVFB/gzrReFGE3viyvRYlsoaOGmycBWIjA7TeTk0NKuNb7c2IQn8ldFY1P5yrDvVlMcghzGC9r9QFaM6EOFlm1cuyJvN6GwE4QpVtE4T4jlOCA7WsBTuBJKirZ14RIieGyZ80M5fR5RmzrD1lW9s0TWb86ojI4WiQarsRpTXZZnDPR+YfUNRceH/kGt02BtKjszmPrOKqrjiiryTHNpBfW6uQfOCqmfCE0ovgswM190/bsU/arbF5KNh8H0zKcMPIU0sujZZIrV3uL6x8/orjIhhg625vMHUQvLPvm8uHZUXZCdw2dPlKz371x8SZKATPZB6dCc4dTTqkKT95t3VBUg+sB/Xr6KQgnu3wRq4U64VNL0jGlVp+aPbWS7JlBvZzhNHBCZqNsvchOuwxeGkv+X7P1yMLRgx8fHW8tLUFPilsZak4P7p91LqpAGkM5BF1cpLC0Ydnx12zY3DpvgaNJ5LvPNDrIXlLDfuqTLvdHJOjhzTWg6/pmgZvVd2+aXgTVpdF+uC+PGUtL3/MQMe1TsocrLcVfxOfdAfhnpO1lWM03KjVm9+TV9QoBt6nilQDkjvcvsKR895+YMBD50izhNo5auol6Ju7EmxHho03Mnq7zRy023d4hJSpXV3adnQAdy6TWLbGBGDI28mYiu+TdJZpIwq3TvgP95e5xs2o7J9eJEAZsUzlJ8fzcaRnkf9IHGSJLbSKAY3DJvrhVvfPe1TNhjgJUBOM1KftUZa2bKFZ+b1geQJGVdSZ7rzXSibJM4l+9TR01HBVagxOqjQM/sS7h0XL4Y9gcAmW2J8m2 CrK31E0D SBaMPBr5egUvIzlu41+oviIR3NbdeynCBZDGIMv29DDEOolKJqYFuXulMpM9JXYpS/Njn5bH9+eSg2G/Cp/dUZ1cpWtmuVI0Tq9qlaqTClPdhIEqBP2qtLnR0gHYrJ9Z1Rd3bwifK9r7o6Ah/Ocf1Mdx+2ul5E2ApDCZh1OiUBXcy/SS3uM4mw1tky8aOx2VhwT7dsOOrcmmNavrkzUPVQqHOJTPvX/PxQaKlBAhKK+1TmYlHYMhGf7giTy/3zfBQcH2+izcJ7sSp5Lt6SLVx4HHkn1lSnsYQsOKmtcga11a2dPbYz2zt2DGIlU39U0+TBcb/dSkN+ThRTaJMGTcrhB/RTdXSarU1QiQtutPBVX3vLOQyBHpqtgKhD8pT5bm6EbYxa0A8AdpRnKMsOcR35C6cVHj5eHQU+VqKu73WlcSxhCLQMiaS1ybI0e2fxnXtLUzhWoyQbH2kHuDRam98ftfTZYIzlo5PSNOf 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: We'll migrate pages allocated by other context; respecting the cpuset of the memory offlining context when allocating a migration target does not make sense. Drop the __GFP_HARDWALL by using GFP_KERNEL. Note that in an ideal world, migration code could figure out the cpuset of the original context and take that into consideration. Suggested-by: Vlastimil Babka Signed-off-by: David Hildenbrand Reviewed-by: Vlastimil Babka --- mm/memory_hotplug.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/memory_hotplug.c b/mm/memory_hotplug.c index 5f497ccf473d..3b6f93962481 100644 --- a/mm/memory_hotplug.c +++ b/mm/memory_hotplug.c @@ -1838,7 +1838,7 @@ static void do_migrate_range(unsigned long start_pfn, unsigned long end_pfn) nodemask_t nmask = node_states[N_MEMORY]; struct migration_target_control mtc = { .nmask = &nmask, - .gfp_mask = GFP_USER | __GFP_MOVABLE | __GFP_RETRY_MAYFAIL, + .gfp_mask = GFP_KERNEL | __GFP_MOVABLE | __GFP_RETRY_MAYFAIL, .reason = MR_MEMORY_HOTPLUG, }; int ret;