From patchwork Tue Dec 3 09:47:26 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Hildenbrand X-Patchwork-Id: 13892058 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 51C33D7833F for ; Tue, 3 Dec 2024 09:47:42 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id CD9E66B007B; Tue, 3 Dec 2024 04:47:41 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id C89ED6B0083; Tue, 3 Dec 2024 04:47:41 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id B2A316B0085; Tue, 3 Dec 2024 04:47:41 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id 93CCE6B007B for ; Tue, 3 Dec 2024 04:47:41 -0500 (EST) Received: from smtpin05.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay04.hostedemail.com (Postfix) with ESMTP id 196AD1A07C9 for ; Tue, 3 Dec 2024 09:47:41 +0000 (UTC) X-FDA: 82853170428.05.A0152A4 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by imf27.hostedemail.com (Postfix) with ESMTP id B7D7440019 for ; Tue, 3 Dec 2024 09:47:22 +0000 (UTC) Authentication-Results: imf27.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=VHg26Ek6; spf=pass (imf27.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=1733219245; 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: references:dkim-signature; bh=I+WpaV6OWdi5kvpk6n/53fQFkDnKmQdF+vIgGPak5jU=; b=oC/5va+E2sMu4LtFuEpJXnfubWDl2fdumezREuHYFE0QPNa1zdRw3wE9/yw+F9qkWszFaS 1YkIrEkJUaerPHfNo+HYR9SJxF89LQfgEA/eTFocwSlOqGlT/ECDbP2PLsOi/6lxTinQ34 IX1QWh53zewEGfJBAZ8bq+71AGeONJc= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1733219245; a=rsa-sha256; cv=none; b=SAFio308CIrMlx7yVCoku7ezsq2MN0TEq4xBe2KnAg7QpemWEZxRMYspoqMvZiE7Zea4Eq yC5bMJ9bqqaTF16k/FgzFJOfKTZE4Uv2G/sGsTNnHAR4VOo5P1b713fHyJrfiysewhU66H uL9ll7WgrYI6og9g4d90ScHF039KjnY= ARC-Authentication-Results: i=1; imf27.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=VHg26Ek6; spf=pass (imf27.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=1733219258; 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; bh=I+WpaV6OWdi5kvpk6n/53fQFkDnKmQdF+vIgGPak5jU=; b=VHg26Ek6cYMzZ2nMA3wtK824Ty8O5gqzQQsVY7GRrDlZip3ORdBm2HT349mD2ur6qjNZMz V7gQfcYB5uRaJZVGENy3A8R2TT1FBbeCpYU4CFaorqoLYS6Z5rGuJtkdenF32oewjUaoUn VoRb49QBHx51S95SwcU0DewzCdj/OJc= Received: from mail-lj1-f197.google.com (mail-lj1-f197.google.com [209.85.208.197]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-597-EO7a4iWFNHC_TEhpqKfIRA-1; Tue, 03 Dec 2024 04:47:37 -0500 X-MC-Unique: EO7a4iWFNHC_TEhpqKfIRA-1 X-Mimecast-MFC-AGG-ID: EO7a4iWFNHC_TEhpqKfIRA Received: by mail-lj1-f197.google.com with SMTP id 38308e7fff4ca-2ffc3b6bb58so32141421fa.0 for ; Tue, 03 Dec 2024 01:47:36 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1733219255; x=1733824055; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=I+WpaV6OWdi5kvpk6n/53fQFkDnKmQdF+vIgGPak5jU=; b=FSeqzqT4J21Vw52cmAxIfI48C+9nJR8QNUiyccD4qNMrUZIA27M9LlExw3qwgJtLSA tDN7lgx6NiprKimEE1X76A6usxdL0S4zVCfM7IibAeDedEIYGmrvLNQenjDSomQV4kOd /fZCXMCOazdBsADsQjkoF0+CbnK68TexF7WzkUf/VHp7G+Cca5KKHcG6k1FVzlbFVKQF XCQW51PAo1Zyoa3bAlgi2AAbWYx50tu8EU8mKSHpCeNEiHBh7hmDcXSrTG6sJgiQtQxe diEGqHOR03DA/ZnhiKwDcba16mSKpYBBRezvMz1V2FpybmzP2Lqm4k9GKI/RdV9jjKBX yU8g== X-Gm-Message-State: AOJu0Yw5jMDFuacs3Crm+XgjcyDnl+hSCB8qNglvJI03e5aMstYapvDG bnP0C+UgOXJQrLW0oFwQwdm96G1O6R6iwrX2TnRlqj79jHH/UnCNbvNfvocOtOTFNcpLhMHOuyG szrieaXK8YUX1nVnB3hmzHyvz3/2ay5n8eBGt1oPurCJfd3Uo X-Gm-Gg: ASbGnct8AR3MiL+Er9Vc4FZs3ZlHzfRLNgpN7bnFWdsaN6J6Q/agPvCM9QQy6/CNYe8 /1oZQpgi/nwnzbHEaoEcfbULUwvTPx0oyDBtHDHZWsj5a87Z7ncaUXad93aaUWTiy2LeC2RXBNk bYIxGVWWqQHqLwaEN5LDjdwiC95v8gakU4ZAC66LJgx9S5eHCBPxI8bzYgyYUySHEgJIR4ORIeR XB/DISjKsajJzunoLs/MYjYjJvWV3U/A3hDbFN4h5QmvEP0K2EtHiEHeBvcOS9QSZhyTCDp3C1q 1u13N8uwpwKwEUirk01Bb4p7CDqo8iLIdjw= X-Received: by 2002:a05:6512:3f1f:b0:53d:eefc:2b48 with SMTP id 2adb3069b0e04-53e12a01888mr1168012e87.33.1733219255509; Tue, 03 Dec 2024 01:47:35 -0800 (PST) X-Google-Smtp-Source: AGHT+IG7ix1vCCH64WEfdTl8JuJR8R5JVe6DQ6ETyTqieE4HgQ8WDhb2jympdCPhJGy/Jq9uyRGFBg== X-Received: by 2002:a05:6512:3f1f:b0:53d:eefc:2b48 with SMTP id 2adb3069b0e04-53e12a01888mr1168001e87.33.1733219255133; Tue, 03 Dec 2024 01:47:35 -0800 (PST) Received: from localhost (p200300cbc7461b00fd9ec26cc5521de7.dip0.t-ipconnect.de. [2003:cb:c746:1b00:fd9e:c26c:c552:1de7]) by smtp.gmail.com with UTF8SMTPSA id 5b1f17b1804b1-434b0f7dccasm182037325e9.43.2024.12.03.01.47.33 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 03 Dec 2024 01:47:34 -0800 (PST) From: David Hildenbrand To: linux-kernel@vger.kernel.org Cc: linux-mm@kvack.org, linuxppc-dev@lists.ozlabs.org, David Hildenbrand , Andrew Morton , Oscar Salvador , Zi Yan , Michael Ellerman , Nicholas Piggin , Christophe Leroy , Naveen N Rao , Madhavan Srinivasan Subject: [PATCH RESEND v2 0/6] mm/page_alloc: gfp flags cleanups for alloc_contig_*() Date: Tue, 3 Dec 2024 10:47:26 +0100 Message-ID: <20241203094732.200195-1-david@redhat.com> X-Mailer: git-send-email 2.47.1 MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: whOSmAxZ0PrMaYQSTO179eouybGBL5lulQgRK-Q1tvE_1733219256 X-Mimecast-Originator: redhat.com content-type: text/plain; charset="US-ASCII"; x-default=true X-Rspamd-Queue-Id: B7D7440019 X-Rspam-User: X-Rspamd-Server: rspam07 X-Stat-Signature: nrncoypujdtxtz9ckxtym3sz3mt7z45c X-HE-Tag: 1733219242-422757 X-HE-Meta: U2FsdGVkX1++CJ4d2ZJaWKeFOfsmdHFdBek6cZjsqTMzXAbNw9+HbnZWhiDa8qqwEGBA8U9L8ZvBiVMM54q4BFMp8/iQz2xHpY3FyGIl64L79UZJI0DDhW5pPbXScbCoIXRAG0A0CZWa7v64fk0y64E05+P9q+dDGs56Z/GzvwtN6IyfcHDnqTRuKPjtiLECVvkCS4qPxxd6Ac9xrBndZbrzqF2UUkC3ohOgDeuvFtZEU0tFD8l0KHhjQ2LCPu2cC+KC6C+byVCdC2iiw1nBUGJwH6AlWjzUQsryCmYVPOVV/Q9abFTuY4JVFP+kW4UJUCjipXQcnjLGOFm+sHkcSQPM6g73nBd5x+CiMHveJy3tj+H1RTT0SXDMsPpy43kef1gOrmaWyRmdArRMATKebtS9DwcZkuH9SahLcYAB+AfEJLNJs2C8rI0bqYVvIgPamWLRGxn701SQLEGhoaVLuQfnSLMFblQuDJonIFTIX0N5DqGzv4gTOF+lTe+pCAbyDyPJpthe2amaXBrT9KoKop+UXb64B2fGE1Vm0onI0FhqKSbTEYY01Xs65nUcL6s21IwGQfp0bawHuyaf88OoEYFj4EbYnwZTNaLZDkMxPAGSRePBpicuwgG7o0wNXn68dqWpZae+v7GkpQLKbdHZBVSAQvrbncyNYGxMOzbHEfHgPRiob9k8yp514Of7+nNq994dHY+S9Vr58k+aStnwctfR/Yg/OAVDNf0NYfhDhxUArV+ESmGZ0QgWClQuNUhKdkAZQSiIRGV+lmKMtmYH5bIkV8RB8YYJah1S752967sYOgIruoZDbTQp10eq/Xvu+n5OcRNRP0T6Zn9/J7C6KCZodgWgKGH9VakSKNc4DyMkbxkkaBJrP39HfrxtgvLVpjlcN9Uemz6pxgAqI4YIrVnF6Vg/16CIZyikx5P1rRNnQqkzdY/wtJ+Hk754SXlOe2qBxp1lbHGd38yYuwk y2osFkca 4PNnCihCJiUsmSfMeD1gi0RwwSu6n28H0w+htetMEvF+BdmVD0i7kVnr8aMjwSyFkVTPi8r8WPq0u2oevF+tfnGGAok6D8jH3FAOWH4nTdMQaFX5p3tzm5HilJ1g2uF/CqWayPnrPoe4wkjwJ6ln3CLT28mFmi93dXlEtdC/pWF8rd8vr6dpw6MiEvn1D5aq4/fTzCQDmxucws57RATj1ofa1EOwvpPUv0I8AEulA1JDJC8FR7YB8AOinPM1jNkAucQ4uuKsJ7PBIhvUf/10wS5kbeaSF8n71RVu23+EWUDoQaQ2KTWcU24pObpJXxVg1cjjcycE5v+YzkUX5ZUeh1faYH3bcICznKTdMFqkqPcXXW2TaQ+GFZAD/rpbkt3buSzQCmb28qyH3D6uD+hMcZuNQPfvJNTvkMFTcVu5fdRSyv5fo0v5kt5nqwJz1wFp2DmRLTv07ulB+LQhElM1gPgu+Azs2tUo1ljFYN4BawjDEoJz30j3Y6U08ksq26YNhhZvkYKkq4PZDfuBxRbQlrb0++3z0kB6tD8bsgHubSvdaJ0FMdxNUjsnSy35q7qRfRY56flMBclfXHmhByzg2yv6FXDDWgu+lQvfeKQMK20YkLfK2WkW8GvjOARcyIbjwwtvbZCTXD7mX690zVr6exzZLuojifSCk7oHT 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: For some reason v1 didn't make it to linux-mm; same with v2. Let's try a different SMTP server (gmail), maybe there are some issues with the RH one ... Let's clean up the gfp flags handling, and support __GFP_ZERO, such that we can finally remove the TODO in memtrace code. I did some alloc_contig_*() testing with virtio-mem and hugetlb; I did not test powernv/memtrace -- I cross-compiled it, though. v1 -> v2: * "mm/page_alloc: forward the gfp flags from alloc_contig_range() to post_alloc_hook()" -> Fixup patch description Cc: Andrew Morton Cc: Oscar Salvador Cc: Zi Yan Cc: Michael Ellerman Cc: Nicholas Piggin Cc: Christophe Leroy Cc: Naveen N Rao Cc: Madhavan Srinivasan David Hildenbrand (6): mm/page_isolation: don't pass gfp flags to isolate_single_pageblock() mm/page_isolation: don't pass gfp flags to start_isolate_page_range() mm/page_alloc: make __alloc_contig_migrate_range() static mm/page_alloc: sort out the alloc_contig_range() gfp flags mess mm/page_alloc: forward the gfp flags from alloc_contig_range() to post_alloc_hook() powernv/memtrace: use __GFP_ZERO with alloc_contig_pages() arch/powerpc/platforms/powernv/memtrace.c | 31 +++--------- include/linux/page-isolation.h | 2 +- mm/internal.h | 4 -- mm/memory_hotplug.c | 3 +- mm/page_alloc.c | 62 +++++++++++++++++++---- mm/page_isolation.c | 12 ++--- 6 files changed, 63 insertions(+), 51 deletions(-) base-commit: 679694cdccaf75df589c2737f233954669a5f601