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;