From patchwork Tue Feb 11 03:43:48 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Baoquan He X-Patchwork-Id: 13968935 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 BD30DC0219E for ; Tue, 11 Feb 2025 03:44:13 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 263F06B0092; Mon, 10 Feb 2025 22:44:13 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 217ED6B0093; Mon, 10 Feb 2025 22:44:13 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 08D5E280003; Mon, 10 Feb 2025 22:44:13 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id DCA9C6B0092 for ; Mon, 10 Feb 2025 22:44:12 -0500 (EST) Received: from smtpin02.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay04.hostedemail.com (Postfix) with ESMTP id 6D7221A0CF7 for ; Tue, 11 Feb 2025 03:44:12 +0000 (UTC) X-FDA: 83106270744.02.1A412DD Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by imf04.hostedemail.com (Postfix) with ESMTP id A734D40002 for ; Tue, 11 Feb 2025 03:44:10 +0000 (UTC) Authentication-Results: imf04.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=B9JjVTix; spf=pass (imf04.hostedemail.com: domain of bhe@redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=bhe@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=1739245450; 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=3dROWS8oMuYebpedhLskdRuoXq/gW78fzCHLa8+au7g=; b=SMbivn0CUUFdTvjABHrwmQ8FXgyJEYrQfoA826TEXEwUSX4Y4HivmE9hMg9NKiCkSkJVKA GZ94eIiQY685AvVvTCFrdqAnv4UD57KYFXLuJEDOZgjkiOpVeRVlJIcjEUTHqqxVnYDHu3 BZ8oSzE4sxfAysERNVOCWO7eSoOx+fs= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1739245450; a=rsa-sha256; cv=none; b=BEIisGJPTLnYBj9kkss3EhaqBirxMwxC5B0BR1l2xaGPm4eM2a23S3v5QnQ1kZP+bGINI4 JRgnwTXS/CIf78rstGsu2XyRpRzyo1mYFV6o1mkrETqQ1ufTUIhhGSDOdvz/6UAFdmhyE6 8lrIgT8MZI/8hxdzu0iJJD2HEFc8m1g= ARC-Authentication-Results: i=1; imf04.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=B9JjVTix; spf=pass (imf04.hostedemail.com: domain of bhe@redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=bhe@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=1739245450; 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=3dROWS8oMuYebpedhLskdRuoXq/gW78fzCHLa8+au7g=; b=B9JjVTixAemHBe+dssfvmsqfVsi9N32Ms0lC9viUX+KHQJO7zQpzxxKkKYYnxi9nsJjjEj iO69cVYE1WYlPa6SH6dpjJI7YY7CNl3oit6STqmYN0yu+77qNWE9LZKLGlsLCWdqIjRqjF +GuaGlr0cVoX1SfECA9u7qxyGtQd250= Received: from mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-594-sjevhOMUPX-3PnPoAKHS6Q-1; Mon, 10 Feb 2025 22:44:07 -0500 X-MC-Unique: sjevhOMUPX-3PnPoAKHS6Q-1 X-Mimecast-MFC-AGG-ID: sjevhOMUPX-3PnPoAKHS6Q Received: from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 82B4B1956095; Tue, 11 Feb 2025 03:44:05 +0000 (UTC) Received: from MiWiFi-R3L-srv.redhat.com (unknown [10.72.112.8]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 46435195608D; Tue, 11 Feb 2025 03:43:58 +0000 (UTC) From: Baoquan He To: linux-mm@kvack.org Cc: akpm@linux-foundation.org, will@kernel.org, aneesh.kumar@kernel.org, npiggin@gmail.com, peterz@infradead.org, linux-kernel@vger.kernel.org, Baoquan He Subject: [PATCH 2/2] mm/mmu_gather: clean up the stale code comment Date: Tue, 11 Feb 2025 11:43:48 +0800 Message-ID: <20250211034348.39531-2-bhe@redhat.com> In-Reply-To: <20250211034348.39531-1-bhe@redhat.com> References: <20250211034348.39531-1-bhe@redhat.com> MIME-Version: 1.0 Content-type: text/plain X-Scanned-By: MIMEDefang 3.0 on 10.30.177.17 X-Rspam-User: X-Rspamd-Queue-Id: A734D40002 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O0Qs7KjhuCl/n0aOsApo0rMcVcgXtHdv5vrN4f6vqGHlBUbAHhkuE+TMdJGdF+Bw6gDVPev88UerP7Te5oYlKuiafq8tMm1hU7EMgWn9B7A5/sSO8mnfxHoAiqh2oHJPQul7+qLjt9wjFhMFTqzWZbpIuPiamqKD3LI3gbfkZES41ZxmWRFAqvw+c4jsVewWJjZwTupZWa9fVqW57yeujkx6OF9Mn1zwfcqCuopK+sd+Vgs80j5OCqKtuOGwJufVUL/Rt47DbtixmTymPqkLFBPalC6F1ku7+oWPDsQgtiOLGtan7P4Lie96/JQm7/UAnCGSN4j3MMhZ9/cq83cJXMjoig35fpqPF6BiO4HBPS+T0FOGfVnfiyaTz2A== 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: In commit d7f861b9c43a ("mm/mmu_gather: add __tlb_remove_folio_pages()"), helper function __tlb_remove_folio_pages_size() was added. And based on the helper, wrapper functions __tlb_remove_folio_pages() and __tlb_remove_page_size() are created and used by upper level functions. So let's update the code comment to reflect the current code about tlb_remove_page()/tlb_remove_page_size(), etc. Signed-off-by: Baoquan He Reviewed-by: Qi Zheng --- include/asm-generic/tlb.h | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/include/asm-generic/tlb.h b/include/asm-generic/tlb.h index 9ae4ca02f29f..5f99b3cf73fc 100644 --- a/include/asm-generic/tlb.h +++ b/include/asm-generic/tlb.h @@ -67,22 +67,21 @@ * * See also MMU_GATHER_TABLE_FREE and MMU_GATHER_RCU_TABLE_FREE. * - * - tlb_remove_page() / __tlb_remove_page() - * - tlb_remove_page_size() / __tlb_remove_page_size() - * - __tlb_remove_folio_pages() + * - tlb_remove_page() / tlb_remove_page_size() + * - __tlb_remove_folio_pages() / __tlb_remove_page_size() + * - __tlb_remove_folio_pages_size() * - * __tlb_remove_page_size() is the basic primitive that queues a page for - * freeing. __tlb_remove_page() assumes PAGE_SIZE. Both will return a - * boolean indicating if the queue is (now) full and a call to - * tlb_flush_mmu() is required. + * __tlb_remove_folio_pages_size() is the basic primitive that queues pages + * for freeing. It will return a boolean indicating if the queue is (now) + * full and a call to tlb_flush_mmu() is required. * * tlb_remove_page() and tlb_remove_page_size() imply the call to * tlb_flush_mmu() when required and has no return value. * - * __tlb_remove_folio_pages() is similar to __tlb_remove_page(), however, - * instead of removing a single page, remove the given number of consecutive - * pages that are all part of the same (large) folio: just like calling - * __tlb_remove_page() on each page individually. + * __tlb_remove_folio_pages() is similar to __tlb_remove_page_size(), + * however, instead of removing a single page, assume PAGE_SIZE and remove + * the given number of consecutive pages that are all part of the + * same (large) folio. * * - tlb_change_page_size() *