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 EE79FE7717F for ; Tue, 10 Dec 2024 06:42:16 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 7608D6B0122; Tue, 10 Dec 2024 01:42:16 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 7110A6B0123; Tue, 10 Dec 2024 01:42:16 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 5FF4B6B0126; Tue, 10 Dec 2024 01:42:16 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id 40E3F6B0122 for ; Tue, 10 Dec 2024 01:42:16 -0500 (EST) Received: from smtpin10.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id CAA8C1C6DD1 for ; Tue, 10 Dec 2024 06:42:15 +0000 (UTC) X-FDA: 82878104358.10.FAF8A58 Received: from szxga08-in.huawei.com (szxga08-in.huawei.com [45.249.212.255]) by imf20.hostedemail.com (Postfix) with ESMTP id 9C9261C0003 for ; Tue, 10 Dec 2024 06:41:50 +0000 (UTC) Authentication-Results: imf20.hostedemail.com; dkim=none; dmarc=pass (policy=quarantine) header.from=huawei.com; spf=pass (imf20.hostedemail.com: domain of chenridong@huawei.com designates 45.249.212.255 as permitted sender) smtp.mailfrom=chenridong@huawei.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1733812923; a=rsa-sha256; cv=none; b=Dsw0r7J+5rE+cEqzRg7AkNEvnmz9LnkaKpdXxq2SmqBXJnDUZQl/2OAnu6DZx9CIgcy06t qVgLXMluxucLvKjXQMvCP118adf7SWnEYkV3T8OqSuyNDMl4u2DNU8CNlujolCN7W/QfU3 CKkgNTGH5uaY7+0tmMoAdb+cHK1CRDQ= ARC-Authentication-Results: i=1; imf20.hostedemail.com; dkim=none; dmarc=pass (policy=quarantine) header.from=huawei.com; spf=pass (imf20.hostedemail.com: domain of chenridong@huawei.com designates 45.249.212.255 as permitted sender) smtp.mailfrom=chenridong@huawei.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1733812923; 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; bh=ozOdkRbRTqOc8jG11i4vVzVbZE27juN/aSmxycvbURk=; b=yE1h06IeKajYfFPk54qHSQTqUJNg0+uAg0nSEEfbYu3qAFigWXNuGsAkk4z1s6L2da0dd4 Lcxnc0m5CtCrppoK6fbhQLplyziE2bHk4+48Qb3cuUQKsJpEZZzVekP60dWPoxJWPBy5ve tzw4yP89Ddoh60+CQl7ch/JYGvY9dVY= Received: from mail.maildlp.com (unknown [172.19.162.254]) by szxga08-in.huawei.com (SkyGuard) with ESMTP id 4Y6pwn1tNlz1V627; Tue, 10 Dec 2024 14:39:05 +0800 (CST) Received: from kwepemd100013.china.huawei.com (unknown [7.221.188.163]) by mail.maildlp.com (Postfix) with ESMTPS id 582421800FE; Tue, 10 Dec 2024 14:42:09 +0800 (CST) Received: from [10.67.109.79] (10.67.109.79) by kwepemd100013.china.huawei.com (7.221.188.163) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1258.34; Tue, 10 Dec 2024 14:42:08 +0800 Message-ID: Date: Tue, 10 Dec 2024 14:42:07 +0800 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v4 0/1] mm: vmascan: retry folios written back while isolated for traditional LRU To: Andrew Morton , Chen Ridong CC: , , , , , , , , <21cnbao@gmail.com>, , , , , References: <20241209083618.2889145-1-chenridong@huaweicloud.com> <20241209181341.fb579d7c0f9d76ae7854c4fa@linux-foundation.org> Content-Language: en-US From: chenridong In-Reply-To: <20241209181341.fb579d7c0f9d76ae7854c4fa@linux-foundation.org> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.67.109.79] X-ClientProxiedBy: dggems706-chm.china.huawei.com (10.3.19.183) To kwepemd100013.china.huawei.com (7.221.188.163) X-Rspam-User: X-Rspamd-Server: rspam03 X-Rspamd-Queue-Id: 9C9261C0003 X-Stat-Signature: gui1qi6kaant7sedg5rg8zmesxydowdg X-HE-Tag: 1733812910-946888 X-HE-Meta: U2FsdGVkX18tvWVg1fplOQY+EiMRHh96qDfUG7a8XWxh02BQhrXKIoWRdMQlh7VSx9ftVslVIETitUByC1MJvosWR/R6c/nYOHJpXGpwWx3NKa+GdG6KUBC9exkI5Mr85CKCtOpNvzSmWAOQaK5ZrBjtleR81jHz7SKVR8X13/RKKLxMdwXuqOwMhzbLbDxvsNEIiaozlACp5v5OFWSffTfT0oQ6zABZLqQvjNIQHf/dBWKC6DHjRFbQZeLgNJSwmb8YkwnGqVSsoCQp0/q1QSJh76qU6SmCbSq0OjN+NLCFiuVp8P2y1kOtOBoLdqVD9aWdohifuwrWG7h7mSOT3HWlviwDLTAr7Jgl5M2/NAxicoTBF/ilZqIHnppLvzPESK1AVVTs8oYSGerZBpUCGFEq8KbhvNoxsK2HlU+obOaLrjHHn9kdb/aVkm9cQtvg/emQ8EYdC/+PzOGxYAy+cFgcNiA6aYRVQaGkyvQeteoiYicBt+WkfdXc/qbtkNZZEQc9MNbeoANAEUHs7YI1qBulYFqLI9V7hZa1qiBGF6ELlmoUSN7wXryXeVwEhEVNlp5tdjLoVfnJKygfZOzFkTC7ulsCa7yQMn/OpQSwk42g2y7Cn8BSaJyLsM6KLjyQEN6sRhL0YjUtE+7gGegEFhLMC8B3CaDLPZAhG6Og0WJ4OHwH3VYbQyY7MBbJRa3XS284g+LZSpCpJM180t8MeruLMb5AWMA4JC11RI0+3UTtpHFSUgRVO3DwN9OMHdm7Cz3xOHFB7SOQKooVKZSkRb6Lfnr4mZP3u6Bc4Z0h/jyKzunY9Z01qSOAAJOOI5WytuAdSJIv8H/6lXE52ZLpvEQUxPq70HRitgp0xoufRRTrio6LXxlNOM9wjc26DCL2SIYVmWuKg6Do6q/qjEhOOehZT8R/ZnDsfk3/VmV+TpU3R//aqzv5D4ohoJgmsWVIcGZd+6GxxTU0NiuhdLm 9J2L2lTX 3TBX9Rvz91xAyqKAYoJe/Yq7eTiEgU4u6jUiCb7UQ4Y2G7ykQE/wlb1nU9dNi8CiwfqnLZGzcVDyAo5p4+Ald5LzpLSCcL8i+Eo7UZtp3amAKksa7HTs7Iqhj0DGGr8igGeDvtc2UnZhJ5P6mgsTGdn3CwnfSo/AX9vycW/ipdeZyg2Ch1uMrleU/41l3ADQ/HRt/EQG4P0TA+Pzuu/ZS9AhA+A== 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: On 2024/12/10 10:13, Andrew Morton wrote: > On Mon, 9 Dec 2024 08:36:17 +0000 Chen Ridong wrote: > >> The commit 359a5e1416ca ("mm: multi-gen LRU: retry folios written back >> while isolated") only fixed the issue for mglru. However, this issue >> also exists in the traditional active/inactive LRU. Fix this issue >> in the same way for active/inactive lru. >> >> What is fixed: >> The page reclaim isolates a batch of folios from the tail of one of the >> LRU lists and works on those folios one by one. For a suitable >> swap-backed folio, if the swap device is async, it queues that folio for >> writeback. After the page reclaim finishes an entire batch, it puts back >> the folios it queued for writeback to the head of the original LRU list. >> >> In the meantime, the page writeback flushes the queued folios also by >> batches. Its batching logic is independent from that of the page reclaim. >> For each of the folios it writes back, the page writeback calls >> folio_rotate_reclaimable() which tries to rotate a folio to the tail. >> >> folio_rotate_reclaimable() only works for a folio after the page reclaim >> has put it back. If an async swap device is fast enough, the page >> writeback can finish with that folio while the page reclaim is still >> working on the rest of the batch containing it. In this case, that folio >> will remain at the head and the page reclaim will not retry it before >> reaching there. > > For a single patch series I think it's best to just make it a single > patch! No need for a [0/n]: just put all the info into the patch's > changelog. > > The patch doesn't apply to current development kernels. Please check > the mm-unstable branch of > https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git/, or > linux-next. > > Please replace vmascan with vmscan in the title. Thanks, Will update. Best regards, Ridong