From patchwork Tue Dec 10 10:29:53 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Hildenbrand X-Patchwork-Id: 13901214 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 B57BEE7717F for ; Tue, 10 Dec 2024 10:30:06 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 21D3B6B0171; Tue, 10 Dec 2024 05:30:06 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 1A2B96B0173; Tue, 10 Dec 2024 05:30:06 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id F127A6B0171; Tue, 10 Dec 2024 05:30:05 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0015.hostedemail.com [216.40.44.15]) by kanga.kvack.org (Postfix) with ESMTP id D23586B00DB for ; Tue, 10 Dec 2024 05:30:05 -0500 (EST) Received: from smtpin12.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay03.hostedemail.com (Postfix) with ESMTP id 9E872A07B1 for ; Tue, 10 Dec 2024 10:30:05 +0000 (UTC) X-FDA: 82878678540.12.3D2AF89 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by imf03.hostedemail.com (Postfix) with ESMTP id A174220026 for ; Tue, 10 Dec 2024 10:29:52 +0000 (UTC) Authentication-Results: imf03.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=DqxMdsGL; dmarc=pass (policy=none) header.from=redhat.com; spf=pass (imf03.hostedemail.com: domain of dhildenb@redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=dhildenb@redhat.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1733826582; a=rsa-sha256; cv=none; b=qplEoIOIHwh91kBbIrAGaIAoZJgW9N9lQZcThqQF9u9y7h69d9lrCoakNJtxsiKefyOeDB oxcVw7vJ4jack6Cc6IM8lUzFUxZDDrnWCRWFIzA8Ork68sfIA/B2aGpmcLVn7Qe8vqkCdb HGGp7O1VA6heTgEsahwD03vVflxvOAw= ARC-Authentication-Results: i=1; imf03.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=DqxMdsGL; dmarc=pass (policy=none) header.from=redhat.com; spf=pass (imf03.hostedemail.com: domain of dhildenb@redhat.com designates 170.10.129.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=1733826582; 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=FsHcUHs6DeYsnWvoRaSergLRElq6OgEvwA7Y98GHY8g=; b=rP2AnRynIZrGPryyis1easvdx4rL2h7zKGK93wnZoHJwWyWrmrGVvpTYLbzjyEX6x0Yb4d TPQPrXBJBAdy6/iGj4m0i2+Ho//zzTIcYje7qbRHrchVM7nod3WRGZHjtlyVuOJhiaDg5K AFJ25BvLOFT8Ag8qGQ3arqNMj5V+UtM= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1733826601; 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=FsHcUHs6DeYsnWvoRaSergLRElq6OgEvwA7Y98GHY8g=; b=DqxMdsGLgdca134bi5KlD+862lBeh3rKD3KPv+e8Zx64uNyZuCVvtbUh/xGczvxnzTzlWy T25d3X19YnpfKwSVkTDxu4lC3Ege6iJMQS9J8a8dwPtksFW4IGV+sYcuB0MtyjM9O8ah12 2OoPnPHcp/5xNHNV7oGeXut3D41FtDU= Received: from mail-wm1-f72.google.com (mail-wm1-f72.google.com [209.85.128.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-197-YHN1BGfaOTW21eLJhjMHFg-1; Tue, 10 Dec 2024 05:30:00 -0500 X-MC-Unique: YHN1BGfaOTW21eLJhjMHFg-1 X-Mimecast-MFC-AGG-ID: YHN1BGfaOTW21eLJhjMHFg Received: by mail-wm1-f72.google.com with SMTP id 5b1f17b1804b1-434f387f346so17242645e9.1 for ; Tue, 10 Dec 2024 02:30:00 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1733826599; x=1734431399; 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=FsHcUHs6DeYsnWvoRaSergLRElq6OgEvwA7Y98GHY8g=; b=ak9jse9cmaYLlxKBwTjSB2qIMvkjyEnu4zIRISAnT48rfZb9E7Ntq0b095jUvM33nE M9XXMLHmv33z53hEHNbcpo2cs8MsEZS/Fxl+HMqRE/S1A4GNHn8UmzgX6L8WY4HI4Vl1 Y3M62PkYVRiCteC4bSrg7yNVheWfHdEoCE2E8fWXlonc0G5NP5ITmCtob6mPxvJi2Gpn xEsE80oOt+g8y0SeY5obpt9vXja7+/9lkglAaJSD9SUIt9l8gx6r1itYp2hMipUfdG5f XDdyEZbp/1zvCvcpuQNJo2BHJHquVJczr+11E/Go8xokyTViMVSVDYRYVXOJaKkPU7Hd sGLw== X-Gm-Message-State: AOJu0YzTRjwRlI1q9/0UyFq/IRuzvnJabD4j17ifYS6AWRvdf7ZCKbmZ 4wg2pAbnXxStofnffZ5GRu05PQhQtu1YhtRDKJ188ESxAvLyvOd97anZe5/Sq2uhtpyGiG4B82w T+6Mn6nzzmVM0kVSQaiAfi39oMAk+j3TmHcIMS+Z05QmrDe+s X-Gm-Gg: ASbGncsF91JrNCm3ooLNAf/4q80+hMHuNGMW9lVST+5sJjorVtfyIZUEtiGTO9qIk3B de9KcFYQU/6TsBlWz/F91+TEPhkqwFBko22al9jKaT/vcMgKJ4SXC3kYZL7eTuXOVwfxeXOOMPC 6GWE9vQ/aHreOyx+aj+2HIhPSzmTMD1KsydL2lWOQsX7IwQPLM8JNpfyRTgzJIvPHBMS2qpGLv1 5Zbm2To6Jx6ozH1BhWIJ4PGbdSLQTi4jdE33XpJr9mjZfF09zT2k1hTzTBdx8RecysUHDvpFV6H r8UzeUlVDrenfU2Dstb54hAxMzWSSdqLus8hg2Q= X-Received: by 2002:a5d:6484:0:b0:385:fd31:ca34 with SMTP id ffacd0b85a97d-3862b3e3e43mr10724993f8f.54.1733826599211; Tue, 10 Dec 2024 02:29:59 -0800 (PST) X-Google-Smtp-Source: AGHT+IHWTNmulgBHuseiTodhsuNrK6Atvf8UYrxinaniVZlvd9jCVyLu5KM2kLzhq5jpm0t11e/Ovw== X-Received: by 2002:a5d:6484:0:b0:385:fd31:ca34 with SMTP id ffacd0b85a97d-3862b3e3e43mr10724981f8f.54.1733826598916; Tue, 10 Dec 2024 02:29:58 -0800 (PST) Received: from localhost (p200300cbc723b8009a604b4649f987f3.dip0.t-ipconnect.de. [2003:cb:c723:b800:9a60:4b46:49f9:87f3]) by smtp.gmail.com with UTF8SMTPSA id ffacd0b85a97d-386220b071dsm15302098f8f.101.2024.12.10.02.29.58 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 10 Dec 2024 02:29:58 -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 v2 2/2] mm/page_isolation: fixup isolate_single_pageblock() comment regarding splitting free pages Date: Tue, 10 Dec 2024 11:29:53 +0100 Message-ID: <20241210102953.218122-3-david@redhat.com> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20241210102953.218122-1-david@redhat.com> References: <20241210102953.218122-1-david@redhat.com> MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: h9dedKcj4TDXCboDm_TDO2r0d1jxWrAIWuNaW0zsaco_1733826599 X-Mimecast-Originator: redhat.com content-type: text/plain; charset="US-ASCII"; x-default=true X-Rspamd-Server: rspam04 X-Rspamd-Queue-Id: A174220026 X-Stat-Signature: d1e6ueiu31wukt6w5ugxq1ktefrwkgxw X-Rspam-User: X-HE-Tag: 1733826592-59078 X-HE-Meta: U2FsdGVkX18zsi6BqMwc2kiANw11a7IY6xAvnnwv0QujUjD5xiLQF011aNpoQeok2SHF0Q7u1F6BoclJys+RDM6+eUKSgvaDxgb9LFCK9lBp7DsJ5MqKkCCC4c+rnnq5hd76NNCun9ssk5RkiSYfSr1e8k63Vj+p50LQYub+tAcMXbbSMZe7U7aP2xP5OX9HW8ogQi6g0LHguIwiNP0hS20ynJ/gr08dMPxuOm/sWH6DpjYW/1RANqV/jAhM2yAq9v/tpFDUC8CV3rMpaPdurMcySinQ7+19rRTbORER9koZI9ef3JQIilKNNmI5/9uSFRRDUzmDsTW3yW89Qkm/J1Ou/XEf1uok9Iks9J49GmGMOsbExc2KlokmIWTfl3agI/+HtHLJDkLhxVXK4e7imj81aPvhnQmfvhl20IvzdQviPuN/B+TeTMnmFvDy9AJlpV1dTPaPP0IUJGzMVyCONjDll52mo6iqkyYP/YWKkAYqQQ1PHnMkjZv8bRlknAILfZIRRiYPKdu9q1wpXmnUe5oS+Ht276PpNcJFKkIxwO31gT/F6Gnho3Z7DGKnRsMztWUpafA6MhE+DEQ54GWL1uNs8KTbnHHvGrGkrrGUpZoi/oK47RX3ofxNXOrb2FnBfyYMhWw8GKuOfAGG4Fl2XrzbQ17NzKgj94hI5APaW2Adj/qUu6A2xQhu4NzX5LhYo5nmZN2oLw8sMMad+wu3QBGJPvEzvR+nG/+Bukwr4kg9zfYa4QLbsy16l2zEAeeQNGiohz0wqnb6YAPH2uewziEDWk4e2zR8olQLyRltrtPy67/mvrcpDHzL/3H2UENUx1jLl+0acrfLwpfXbz+kQ9M5cpEYmAkDOvxQmljGDewkE3yPoFnxJmotbcu5VIBPSRde6GBmOi78zhuC877VvVB6WGQZe1lHaTYxIpIM2m4tg+J4Crz81HgE/DFqrMaYIn0mz7OHUoZHmfRU7zz BZE3m6HV HCG8n5b1fnhabrmcJ3K4RU/qFh5SUtiJCAP5kNi8h5alV1uwbf39BP7VCAi+ZS3mxvxF+GNz6Mpm1wNO4rNVoDsmeE20+qboKSKvhWWNqBUZhaxLwoZwPM4QL4lEDHSfu05pNj97WaRqzokvjgBOkteurWXpFlLxIFZBxpP+1LhNXEswPxv5MR2kJMC6lsbdQ5MuiA9q0+G2cZBuc1i0stL1DFgKrkdYamURraxVUSb99k+dTz69/U0y8jljCmjQpcMM+FW3lxRVbrKMgWchDguboiKufLcKCGWMGYOo3TOGgcR0fa/EFGl7rSVZJ5Isythbvd71yh2jHwUgGmioJEBe/bVBtSCAzF+1tvvW6+JkjGUiKmzkMhkz/7wDMo1vp3kc6sxSNk5yCHCiSDZQM5Ev2ixQq5AfddXFZcub3xAH7r7wYl+AXcI9BUlYVEogpU5We1QSquyivtZ0gl1DYylsGLWr/c4cxTiU9SpPmMU1+Ap/YeegHXdM5PZQfZG5ZOuxQ X-Bogosity: Ham, tests=bogofilter, spamicity=0.000010, 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. Reviewed-by: Zi Yan Acked-by: Vlastimil Babka Signed-off-by: David Hildenbrand --- 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)