From mboxrd@z Thu Jan 1 00:00:00 1970 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 A25FDC54EE9 for ; Fri, 2 Sep 2022 23:28:27 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 0D00580143; Fri, 2 Sep 2022 19:28:27 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 0807080120; Fri, 2 Sep 2022 19:28:27 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id E894480143; Fri, 2 Sep 2022 19:28:26 -0400 (EDT) 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 D9B2D80120 for ; Fri, 2 Sep 2022 19:28:26 -0400 (EDT) Received: from smtpin04.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id A7843120C4E for ; Fri, 2 Sep 2022 23:28:26 +0000 (UTC) X-FDA: 79868736612.04.322A8F5 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by imf13.hostedemail.com (Postfix) with ESMTP id 3E37D2004F for ; Fri, 2 Sep 2022 23:28:26 +0000 (UTC) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id BDB6DB82E02; Fri, 2 Sep 2022 23:28:24 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 61803C433D7; Fri, 2 Sep 2022 23:28:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1662161303; bh=DnZnYI5LL7MIKwH1ihQBKiznE8Yemli/oj2YXsVRf9g=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=xjGywVZMR43mpaySPvVY3eVQtU1WcCZIi4rDAzrsqIDn07QLYKXaRZcjdjX3nIl4E owj51c4PRnpQYuS2dxzBWUUYyn1U5YJhf9BJ6tGaj0rcPMzuLlaF2DjQM4huI8zRql TTGGrG7WYqor1f7uFjXa1aIuaTDXiUVgyaovi650= Date: Fri, 2 Sep 2022 16:28:22 -0700 From: Andrew Morton To: "Matthew Wilcox (Oracle)" Cc: linux-mm@kvack.org Subject: Re: [PATCH v2 01/57] mm/vmscan: Fix a lot of comments Message-Id: <20220902162822.bb799dc5cede900dc04e5215@linux-foundation.org> In-Reply-To: <20220902194653.1739778-2-willy@infradead.org> References: <20220902194653.1739778-1-willy@infradead.org> <20220902194653.1739778-2-willy@infradead.org> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.33; x86_64-redhat-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1662161306; a=rsa-sha256; cv=none; b=xn+9uo3EsIgyjKq5QGPNb7JI+gSVcec0QBK0IRu2ZFhXqq/qRkNGsgFGepjLZ8VBgndsZn 3+NOtKuJvlKh5NnoTzKsnReF4Jjvbq/zD3efNaStXzJquYK9bSW967b+4lElNa/VktJEd+ vduUDiMKazG1ZPf/MpVkDvbh5lEjMIg= ARC-Authentication-Results: i=1; imf13.hostedemail.com; dkim=pass header.d=linux-foundation.org header.s=korg header.b=xjGywVZM; spf=pass (imf13.hostedemail.com: domain of akpm@linux-foundation.org designates 145.40.68.75 as permitted sender) smtp.mailfrom=akpm@linux-foundation.org; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1662161306; 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=RjUXznSuC2/GzAkXXo3itnffPe3WrYKlzKxKJZvJ+ec=; b=KEuWVXBPq8ax6yFFhAIbaUUu0fK0iQBTkuQFhLSFWVv8jUGh56IQpvMWzHczL8KY7lWCWs WKStrCqXGlfsblwEfXlJWuqck5Xa5kjrQunntSWoo90dVi4yGo30jzMlB4twg+QG1Q8YOQ YyISlyq5KS94D2EChebTFccMtWOecxA= Authentication-Results: imf13.hostedemail.com; dkim=pass header.d=linux-foundation.org header.s=korg header.b=xjGywVZM; spf=pass (imf13.hostedemail.com: domain of akpm@linux-foundation.org designates 145.40.68.75 as permitted sender) smtp.mailfrom=akpm@linux-foundation.org; dmarc=none X-Rspam-User: X-Rspamd-Server: rspam12 X-Stat-Signature: uybhqp9qi9xjpnco5joki41tfdek1z4u X-Rspamd-Queue-Id: 3E37D2004F X-HE-Tag: 1662161306-219615 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: On Fri, 2 Sep 2022 20:45:57 +0100 "Matthew Wilcox (Oracle)" wrote: > A lot of comments mention pages when they should say folios. > Fix them up. I tweaked this for some mglru changes. --- a/mm/vmscan.c~mm-vmscan-fix-a-lot-of-comments-vs-mglru +++ a/mm/vmscan.c @@ -3643,7 +3643,7 @@ static int folio_update_gen(struct folio do { /* lru_gen_del_folio() has isolated this page? */ if (!(old_flags & LRU_GEN_MASK)) { - /* for shrink_page_list() */ + /* for shrink_folio_list() */ new_flags = old_flags | BIT(PG_referenced); continue; } @@ -4571,7 +4571,7 @@ static void lru_gen_age_node(struct pgli } /* - * This function exploits spatial locality when shrink_page_list() walks the + * This function exploits spatial locality when shrink_folio_list() walks the * rmap. It scans the adjacent PTEs of a young PTE and promotes hot pages. If * the scan was done cacheline efficiently, it adds the PMD entry pointing to * the PTE table to the Bloom filter. This forms a feedback loop between the @@ -4790,7 +4790,7 @@ static bool isolate_folio(struct lruvec if (!folio_test_referenced(folio)) set_mask_bits(&folio->flags, LRU_REFS_MASK | LRU_REFS_FLAGS, 0); - /* for shrink_page_list() */ + /* for shrink_folio_list() */ folio_clear_reclaim(folio); folio_clear_referenced(folio); @@ -4993,7 +4993,7 @@ static int evict_folios(struct lruvec *l if (list_empty(&list)) return scanned; - reclaimed = shrink_page_list(&list, pgdat, sc, &stat, false); + reclaimed = shrink_folio_list(&list, pgdat, sc, &stat, false); list_for_each_entry(folio, &list, lru) { /* restore LRU_REFS_FLAGS cleared by isolate_folio() */ @@ -5010,7 +5010,7 @@ static int evict_folios(struct lruvec *l spin_lock_irq(&lruvec->lru_lock); - move_pages_to_lru(lruvec, &list); + move_folios_to_lru(lruvec, &list); walk = current->reclaim_state->mm_walk; if (walk && walk->batched) _