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; }