From patchwork Fri Dec 6 09:59:51 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Hildenbrand X-Patchwork-Id: 13896802 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 D214AE77179 for ; Fri, 6 Dec 2024 10:00:07 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 2D3086B0203; Fri, 6 Dec 2024 05:00:07 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 1E8856B0204; Fri, 6 Dec 2024 05:00:07 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id F06776B0205; Fri, 6 Dec 2024 05:00:06 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id C43826B0203 for ; Fri, 6 Dec 2024 05:00:06 -0500 (EST) Received: from smtpin29.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id 6DD84C19AA for ; Fri, 6 Dec 2024 10:00:06 +0000 (UTC) X-FDA: 82864088244.29.E6B55F7 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by imf26.hostedemail.com (Postfix) with ESMTP id 869A6140019 for ; Fri, 6 Dec 2024 09:59:51 +0000 (UTC) Authentication-Results: imf26.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=IUqrpUpR; dmarc=pass (policy=none) header.from=redhat.com; spf=pass (imf26.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=1733479196; 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=IA4ZMoyJsW9kk7MRivWjZHMd3/6CwxZEtrg2OJXZFBo=; b=upW8Ubo+wL/iMINLxUVgo5/FgxrW4SRQlZhwE4vv6KDU/9QIfZ2OGZ5OBmA6OSISSm1wSt iHygdxPOcqHxStVmEwIedK+l6WQYW5JibwkHvTryaXlQBlVzqIjb4H9M/Q+5ICFrFWImeF lPhuw4zEcs2jClQD2MWQnbgP1PXazrY= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1733479196; a=rsa-sha256; cv=none; b=smKIgN0wgt6aMudVe+xvkPrXMCEEM7kC7DSEW8ymYJXR8rED+5iv8naCv4Zm/qsNooYIi0 4ZOTQSWs49r+xSZXxJml5JaGNn54vkkh0g91Xze7oRaxhIXxBvzF9c2o64yZ3vNMWNgLnN phyMvoqbqhAb8NLgQkQovrzclBXZn4M= ARC-Authentication-Results: i=1; imf26.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=IUqrpUpR; dmarc=pass (policy=none) header.from=redhat.com; spf=pass (imf26.hostedemail.com: domain of dhildenb@redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=dhildenb@redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1733479203; 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=IA4ZMoyJsW9kk7MRivWjZHMd3/6CwxZEtrg2OJXZFBo=; b=IUqrpUpRHlk25XpUpCt9vOhTdT3X6PNB0uWg8PwjzTy8O1mXGodW/q4Vhyvj+koBZoO45r K1VSEW8tECZYbFFt0e4tEBEAySUaMQkxVWNvmdkDhy5F0svKneMAvtH8noRqMy0q9LCa15 tTY5xdyhEJ7gbsClTINwYhT81tGlFDU= Received: from mail-wr1-f72.google.com (mail-wr1-f72.google.com [209.85.221.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-240-aComCGu0O3CTx0qvGBNqzQ-1; Fri, 06 Dec 2024 05:00:02 -0500 X-MC-Unique: aComCGu0O3CTx0qvGBNqzQ-1 X-Mimecast-MFC-AGG-ID: aComCGu0O3CTx0qvGBNqzQ Received: by mail-wr1-f72.google.com with SMTP id ffacd0b85a97d-385ded5e92aso751619f8f.3 for ; Fri, 06 Dec 2024 02:00:02 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1733479201; x=1734084001; 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=IA4ZMoyJsW9kk7MRivWjZHMd3/6CwxZEtrg2OJXZFBo=; b=HrN0HEfyod50rtIF+mFkViKL0sIszRiQT6r6XR2pVPWiJamwV2UGJx3IUIbMtvQfEZ IVDfhR8lhlh5tzIio9su20msF3dSIK+cMvQbO+yIjNtjd5ntwjs2iDHi6aDauM1xTzqE fPqNY5CXQYJaKHslRMROJy7A/xrbBMT/4HsvXw64T80euHSPtPsI310CilG84KzOwnKI 9iz+Z0uqfJAPF+hUU4pb4kDpuMURQ1nXYY7XV/M6doC98bBdrWZinW4SyvpTOTPKeysz EyH1ykDSkPFG2W3Z/VFNYRpqyiYjAxyv8gt1s28XbnDYfAxYBVbwv780n+FVbLJJbXux ch6Q== X-Gm-Message-State: AOJu0YyGmigAmuYfUokb3GJ+L4lttYNHBoN9uszmttHDwtXHGK+FTwm9 cb7/KnHkso+UCb91Qfaeo5AFkH52iw4PgTz8Cgivi34EFrjWk4wOaicLRmpIewIOp9Svd4+eGz8 ytiT/tq0KXdtOtVRejsToTWxFQjxpZHBLYouYyqkKUk61Gtp9 X-Gm-Gg: ASbGnctiDhB/H9bRbxLpBZKbPnsXz2M9FLyK04YlkDrranRn3NoL6dNkcg9hY3QEjDG CLbPL5xea9NQIUx1UsTWbsXLv9anEShgHd1APguADvbxmwZgwXDL/R7oPDpYmJMKb7peKAw5rUh xxpSaP9rDlcOLR7zAx2eGDQpatZRBrIMQLs6ZOa5DnVtGkKEKBhoEtInTX4JL6Xr80ol8vaJDJ8 xG/J92SVnHBrVcGmyvy5llmSHSEZX6waQKzAXiPXs/pUXwQMP+V7s/S0zkE0dpZN0YuhEMle7M2 b0GjwML/sqJWhzZVLyNyw/Ji2dDcp/3G+88= X-Received: by 2002:a5d:64ef:0:b0:386:2ebe:7aeb with SMTP id ffacd0b85a97d-3862ebe7e3amr588703f8f.44.1733479201186; Fri, 06 Dec 2024 02:00:01 -0800 (PST) X-Google-Smtp-Source: AGHT+IFS7q3Y3cr64iMaChXRU6kWOrDr/y/KtXu/TH4x76fjE0yJJ3g/J9U0CFiziA1wkJGitb1OUA== X-Received: by 2002:a5d:64ef:0:b0:386:2ebe:7aeb with SMTP id ffacd0b85a97d-3862ebe7e3amr588688f8f.44.1733479200834; Fri, 06 Dec 2024 02:00:00 -0800 (PST) Received: from localhost (p200300cbc71bd0001d1f238eaeafdbf7.dip0.t-ipconnect.de. [2003:cb:c71b:d000:1d1f:238e:aeaf:dbf7]) by smtp.gmail.com with UTF8SMTPSA id ffacd0b85a97d-3862e3fe716sm769370f8f.7.2024.12.06.01.59.58 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 06 Dec 2024 01:59:59 -0800 (PST) From: David Hildenbrand To: linux-kernel@vger.kernel.org Cc: linux-mm@kvack.org, David Hildenbrand , Andrew Morton , Zi Yan , Vlastimil Babka , Yu Zhao Subject: [PATCH v1 2/2] mm/page_isolation: fixup isolate_single_pageblock() comment regarding splitting free pages Date: Fri, 6 Dec 2024 10:59:51 +0100 Message-ID: <20241206095951.98007-3-david@redhat.com> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20241206095951.98007-1-david@redhat.com> References: <20241206095951.98007-1-david@redhat.com> MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: Cq58PvbwQ2c56rTKUG3fcv25GICekV0a1LbyPnB-dSI_1733479201 X-Mimecast-Originator: redhat.com content-type: text/plain; charset="US-ASCII"; x-default=true X-Stat-Signature: a8grpqqw8aoemcoznjyoaa79fdduaetm X-Rspamd-Queue-Id: 869A6140019 X-Rspam-User: X-Rspamd-Server: rspam01 X-HE-Tag: 1733479191-172180 X-HE-Meta: U2FsdGVkX1+uyBl18WbY9zHolBo8f4gCEMjBzVtuM+oyGFE4H0DDhLvWAjkRrBHMNayLD32VNiVwrEDUpZ6Hv3jmAcfwP3qWB0Oi2/tFhEG7y7Wldzw+CeVZejaY0zwbXxBOqx40oDpOQozV2kyUjh7UjVSeXroibuZLyI9KdvwrvEg6X+lA5OXq4gB9lUQ5TWJdPuXxBWiQ7YZkoL1UOQR1nyAPOb6+YSeExdQHuMOmWh2fo/e3oZ60caNC5Fqlc6nSoEkLUagb12Z4TnqhTVgOF3wUVQUM1OhwN6aUYpjNJ7HVNj3wXlXJWBcb7QBmboYTX6VYPHMmJ3zaGDAFfwbTvmReh40nQb0ZXBavTftS33jSzgsD3gFvfKmNyXes2S3lpYxf+dR+LYaeJAxEP/qEWX1Rsb5/YhM/l2Zlh+NtjUm2QV6OpvcR2XWffpy7wn9Ce0NZtaleVmbKO/bye6i1qtIYC2IxBgboZIEggIs2GG7iKmhC9WpjhJ8lkDRp/PC3eg6Wx7PtjmwqNIwHOHfJa1FgsW1SCTA0qr1r3cT1YrCjGXgx9ywBsftY+Y83UNTZcUJ9Hl5XxD79vrLB6wJgPpH4mfb/tDZzbwRYyuZk3DyZHRGxR8QFijhRHzK0PSNj7UsqmnWroZGvlmYC7iy+B/HBOGe0186iriFVfzrLpKhYmcYJGx7NeLqUl0KrcBxnH9rxwRiYuawGXXD1H6bg0NfCQTYxgrfXRKe76bVJYeies9fWHerMaqEU+eM4ZISM3gLCY+AXEjcjnieKYQSWQwVnuP41t0TnRD+sM91mZHy49tH7JVOr0QdhX56vneh+H0RTMPriGYMha6MfgfLbjTAIHHTI6NgxUXMUweJs21kFGfUtlB9N2EMKYBmHCwDYreXtGVd0dRG+QGv1KbhYw4nd1QjOu+psrE1yBH3UzQMKcXpAxg3chvLYH0Yj29STI4pzPQlb0A+hxVQ UhUZQf7A y+yNuZCyMwR8GCHPUH6O+qzXQoGzzFT06gPmhNQQoHDO/dxVePnDKpWE48gxthm9IEcTt+kY4vAIYtW86fgNSOcnE9RMdgU17F7Uq328FVMoqfh2whyKxnonP0WOWXdGNxKdfhIvmE3GoUgDQGHJHV++pcW/5nyRgz+Mj36rwDWfnDVHYfXbAfcKr/KfhzaS0ZB7xiojrhqBA6Q9HgbOXfa9P0cQ7giSID20FUKtShKGJmHNAHcu6CC3Vf14suwr9VGaO2twf+R72gFh0Hq+YLqx/OLYJzoeGTa4+IAoI8CH3to9h2R/QInV40sZG5insILquclMfi7naiRIRRrUXkhs6CrIEXcGBQPE9yrxao2LmVHbHJyKebEmG+UxyElzXXix28d5RdTg7/7XIM1rsdEdgIWqbkThWVQpPc2yXne1s/YZqH9URH6AbYFMMmw4rHAub2lzm8ox6XaEXzTtw72kozOAlml/39b5X 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: Let's fixup the comment, documenting how free_one_page_maybe_split() comes into play. Signed-off-by: David Hildenbrand Acked-by: Vlastimil Babka --- mm/page_isolation.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/mm/page_isolation.c b/mm/page_isolation.c index c608e9d728655..63fddf283e681 100644 --- a/mm/page_isolation.c +++ b/mm/page_isolation.c @@ -298,11 +298,10 @@ __first_valid_page(unsigned long pfn, unsigned long nr_pages) * pagelbocks. * [ MAX_PAGE_ORDER ] * [ pageblock0 | pageblock1 ] - * When either pageblock is isolated, if it is a free page, the page is not - * split into separate migratetype lists, which is supposed to; if it is an - * in-use page and freed later, __free_one_page() does not split the free page - * either. The function handles this by splitting the free page or migrating - * the in-use page then splitting the free page. + * When either pageblock is isolated, if it is an in-use page and freed later, + * __free_one_page_maybe_split() will split the free page if required. If the + * page is already free, this function handles this by splitting the free page + * through move_freepages_block_isolate()->__free_one_page_maybe_split(). */ static int isolate_single_pageblock(unsigned long boundary_pfn, int flags, bool isolate_before, bool skip_isolation, int migratetype)