From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8E6C82EC09D for ; Thu, 20 Nov 2025 16:54:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763657675; cv=none; b=KV6N4ZjxgNEkVeSQSG27nggRuWAK6pSYmcaFX4rnz+1pIy5YKyt8r0Yu7Le3x1XGBEXvbFiTb+pk5sTpFfFxDEP2TI3XTvLWGPhVmPWYLcTIc78WNxCciP6/br2YQVQs0JU7arudAtEx8zzSpruXmrkx5FqPLjnuO7TI21f5nzg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763657675; c=relaxed/simple; bh=IjDza0zIclKSv/wsLVfxnGfJv0FSzrq1hMioRga2Iq0=; h=Date:To:From:Subject:Message-Id; b=qH+SJRH65koBNbP5RMmBzKg1VaUc8W+sCfhyI16LVtCNyK8jTJc+A9N7WN8qBmvOJfOvhSpdEc+OF1uxXBjGXYz3Wl/2lgUF23TwW5tZS/mUAqKg62YKHjgl25av50GcvaSqfOKMa9jySrkZAMfSteJCjR7eIApIUF1zAXJRT48= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b=bfRMM+jC; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b="bfRMM+jC" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 19361C4CEF1; Thu, 20 Nov 2025 16:54:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1763657675; bh=IjDza0zIclKSv/wsLVfxnGfJv0FSzrq1hMioRga2Iq0=; h=Date:To:From:Subject:From; b=bfRMM+jCQzpNLZVbDmNIGzoUg9ldSqecriZmmYDUWkPRC9YJLhB02wsosyrqqRMJQ UJF+t1Eij7cPfC4730BqmqVYS8dbm+2DppAnBkePsa/SAr2/NL5QnRZdvvLWGrafOM fsrbjT77na9uynn5j9+U89e0MkfqeH3b5HN78jVs= Date: Thu, 20 Nov 2025 08:54:34 -0800 To: mm-commits@vger.kernel.org,shikemeng@huaweicloud.com,nphamcs@gmail.com,kasong@tencent.com,chrisl@kernel.org,bhe@redhat.com,baohua@kernel.org,youngjun.park@lge.com,akpm@linux-foundation.org From: Andrew Morton Subject: + mm-swap-remove-scan_swap_map_slots-references-from-comments.patch added to mm-new branch Message-Id: <20251120165435.19361C4CEF1@smtp.kernel.org> Precedence: bulk X-Mailing-List: mm-commits@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: The patch titled Subject: mm: swap: remove scan_swap_map_slots() references from comments has been added to the -mm mm-new branch. Its filename is mm-swap-remove-scan_swap_map_slots-references-from-comments.patch This patch will shortly appear at https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/mm-swap-remove-scan_swap_map_slots-references-from-comments.patch This patch will later appear in the mm-new branch at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm Note, mm-new is a provisional staging ground for work-in-progress patches, and acceptance into mm-new is a notification for others take notice and to finish up reviews. Please do not hesitate to respond to review feedback and post updated versions to replace or incrementally fixup patches in mm-new. Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/process/submit-checklist.rst when testing your code *** The -mm tree is included into linux-next via the mm-everything branch at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm and is updated there every 2-3 working days ------------------------------------------------------ From: Youngjun Park Subject: mm: swap: remove scan_swap_map_slots() references from comments Date: Fri, 31 Oct 2025 15:50:11 +0900 The scan_swap_map_slots() helper has been removed, but several comments still referred to it in swap allocation and reclaim paths. This patch cleans up those outdated references and reflows the affected comment blocks to match kernel coding style. Link: https://lkml.kernel.org/r/20251031065011.40863-6-youngjun.park@lge.com Signed-off-by: Youngjun Park Reviewed-by: Baoquan He Acked-by: Chris Li Cc: Barry Song Cc: Kairui Song Cc: Kemeng Shi Cc: Nhat Pham Signed-off-by: Andrew Morton --- mm/swapfile.c | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) --- a/mm/swapfile.c~mm-swap-remove-scan_swap_map_slots-references-from-comments +++ a/mm/swapfile.c @@ -236,11 +236,10 @@ again: ret = -nr_pages; /* - * When this function is called from scan_swap_map_slots() and it's - * called by vmscan.c at reclaiming folios. So we hold a folio lock - * here. We have to use trylock for avoiding deadlock. This is a special - * case and you should use folio_free_swap() with explicit folio_lock() - * in usual operations. + * We hold a folio lock here. We have to use trylock for + * avoiding deadlock. This is a special case and you should + * use folio_free_swap() with explicit folio_lock() in usual + * operations. */ if (!folio_trylock(folio)) goto out; @@ -1365,14 +1364,13 @@ start_over: spin_lock(&swap_avail_lock); /* * if we got here, it's likely that si was almost full before, - * and since scan_swap_map_slots() can drop the si->lock, * multiple callers probably all tried to get a page from the * same si and it filled up before we could get one; or, the si - * filled up between us dropping swap_avail_lock and taking - * si->lock. Since we dropped the swap_avail_lock, the - * swap_avail_head list may have been modified; so if next is - * still in the swap_avail_head list then try it, otherwise - * start over if we have not gotten any slots. + * filled up between us dropping swap_avail_lock. + * Since we dropped the swap_avail_lock, the swap_avail_list + * may have been modified; so if next is still in the + * swap_avail_head list then try it, otherwise start over if we + * have not gotten any slots. */ if (plist_node_empty(&next->avail_list)) goto start_over; _ Patches currently in -mm which might be from youngjun.park@lge.com are mm-swap-remove-duplicate-nr_swap_pages-decrement-in-get_swap_page_of_type.patch mm-swap-fix-wrong-plist-empty-check-in-swap_alloc_slow.patch mm-swap-fix-memory-leak-in-setup_clusters-error-path.patch mm-swap-use-swp_solidstate-to-determine-if-swap-is-rotational.patch mm-swap-remove-redundant-comment-for-read_swap_cache_async.patch mm-swap-change-swap_alloc_slow-to-void.patch mm-swap-remove-scan_swap_map_slots-references-from-comments.patch