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 E50CBC48BC4 for ; Sun, 18 Feb 2024 02:35:54 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 6610C8D0001; Sat, 17 Feb 2024 21:35:54 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 611E06B008A; Sat, 17 Feb 2024 21:35:54 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 4B1CA8D0001; Sat, 17 Feb 2024 21:35:54 -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 34B736B0089 for ; Sat, 17 Feb 2024 21:35:54 -0500 (EST) Received: from smtpin07.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id CF7641C02BC for ; Sun, 18 Feb 2024 02:35:53 +0000 (UTC) X-FDA: 81803359386.07.50039D1 Received: from dggsgout11.his.huawei.com (unknown [45.249.212.51]) by imf13.hostedemail.com (Postfix) with ESMTP id 531942000C for ; Sun, 18 Feb 2024 02:35:49 +0000 (UTC) Authentication-Results: imf13.hostedemail.com; dkim=none; spf=pass (imf13.hostedemail.com: domain of shikemeng@huaweicloud.com designates 45.249.212.51 as permitted sender) smtp.mailfrom=shikemeng@huaweicloud.com; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1708223752; 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=JNlec+ktJgqGPB6mISRl2gqIj5fWVdf7YiFdoEpP80g=; b=ilusD9WN6Dno4+RoXzd+RCWgllsXxS+qnz6d1kySORqf/Bl8Qt1NqkjBeDRe/eIgUoh6Yx jZnWkYXpCSp5nd3Zjnroa6CaZq8WmWy6upzbF/OGqXDT5XP1X4vOVvpE3xreqOUqAoUU3h F0SQyWMHn8nxalWkQDj3A5N5cgsx+jI= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1708223752; a=rsa-sha256; cv=none; b=q47S2CvYS0ZL41SPLtjOpPE6EBm93s32b9m3VDNASIwEwDHdzQ5BsRS9ODwW3+3f1HkGIh aZQL523fNWm84//GAx4R/4ONdFGyAQ1n5tTZ9BQpkf9+lO5yRrnel5PF3d1fAO6s9BCI+k WGbJV4RZ+Q/dqQlsCMvORvOJcb2pvNc= ARC-Authentication-Results: i=1; imf13.hostedemail.com; dkim=none; spf=pass (imf13.hostedemail.com: domain of shikemeng@huaweicloud.com designates 45.249.212.51 as permitted sender) smtp.mailfrom=shikemeng@huaweicloud.com; dmarc=none Received: from mail.maildlp.com (unknown [172.19.163.216]) by dggsgout11.his.huawei.com (SkyGuard) with ESMTP id 4TcqXR6dBQz4f3lV7 for ; Sun, 18 Feb 2024 10:35:35 +0800 (CST) Received: from mail02.huawei.com (unknown [10.116.40.75]) by mail.maildlp.com (Postfix) with ESMTP id EC0661A04C0 for ; Sun, 18 Feb 2024 10:35:42 +0800 (CST) Received: from [10.174.178.129] (unknown [10.174.178.129]) by APP2 (Coremail) with SMTP id Syh0CgC32Qz9bNFlLhW5EQ--.38137S2; Sun, 18 Feb 2024 10:35:42 +0800 (CST) Subject: Re: [PATCH 2/5] mm: correct calculation of cgroup wb's bg_thresh in wb_over_bg_thresh To: Tejun Heo Cc: willy@infradead.org, akpm@linux-foundation.org, hcochran@kernelspring.com, mszeredi@redhat.com, axboe@kernel.dk, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org References: <20240123183332.876854-1-shikemeng@huaweicloud.com> <20240123183332.876854-3-shikemeng@huaweicloud.com> From: Kemeng Shi Message-ID: <6505a0c5-5e22-3b25-65f5-2b44e885785d@huaweicloud.com> Date: Sun, 18 Feb 2024 10:35:41 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.5.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=gbk Content-Transfer-Encoding: 7bit X-CM-TRANSID:Syh0CgC32Qz9bNFlLhW5EQ--.38137S2 X-Coremail-Antispam: 1UD129KBjvJXoW7AF17Zryftr1kJFW5ZFWDArb_yoW8XF43pF sxJwsxJrWkAF1jyw17Zwnavryavwn5X343J348K39rAw4DGF97tryfW3yY93W7XrZ3CFWj qr4DZFWkCF4UZa7anT9S1TB71UUUUUUqnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDU0xBIdaVrnRJUUUk0b4IE77IF4wAFF20E14v26r4j6ryUM7CY07I20VC2zVCF04k2 6cxKx2IYs7xG6rWj6s0DM7CIcVAFz4kK6r1j6r18M28lY4IEw2IIxxk0rwA2F7IY1VAKz4 vEj48ve4kI8wA2z4x0Y4vE2Ix0cI8IcVAFwI0_Ar0_tr1l84ACjcxK6xIIjxv20xvEc7Cj xVAFwI0_Gr1j6F4UJwA2z4x0Y4vEx4A2jsIE14v26rxl6s0DM28EF7xvwVC2z280aVCY1x 0267AKxVW0oVCq3wAS0I0E0xvYzxvE52x082IY62kv0487Mc02F40EFcxC0VAKzVAqx4xG 6I80ewAv7VC0I7IYx2IY67AKxVWUJVWUGwAv7VC2z280aVAFwI0_Jr0_Gr1lOx8S6xCaFV Cjc4AY6r1j6r4UM4x0Y48IcVAKI48JMxk0xIA0c2IEe2xFo4CEbIxvr21l42xK82IYc2Ij 64vIr41l4I8I3I0E4IkC6x0Yz7v_Jr0_Gr1lx2IqxVAqx4xG67AKxVWUJVWUGwC20s026x 8GjcxK67AKxVWUGVWUWw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CjJH2XGief2t59ERfeO+y7J5802mY8fMgP/H43fD9g/lzY6TyJoAtTVRxRL/gLfgQ1YsN4n4kaaDqZxmxpc7pf+1S56Yk1Pdws8LFQ8+AX76TvJvNbHf2nQ6sysypK2Vnbv59kYeDzaQADLL5iFeGFkY5UVsf+3ZFiIW+npNe0tV/ZpLzLPtxIA3AYcOAR8Olls3BEKgng35E0y/OO/SjQVx9elVeDypPd3rfslfRwISTUMucQuC5oCz6Kq7m+K0S9ACEllrIFvo7efUy7Li8oPd/ldpfPtJKLXORV5bs7an6YpOa5i4YipqIYMrQVeH5 uftEK3N+ aH89+VtKW8Km1UrFEgYdloP9TpvTFJRFfaEpR584DyEn76P0vPhqeJukv7k98gRsqtKoZSAxbHraL4m9TZpbQLt1331L84uS1UwGAkrAIiA+/tEExvhv5MzBHQPSBF8ZnlCytQzcZ2N8Rsz/1JjVlCE9TPGmXgOvmMvL5qi9+6XCHrNtLW1NaLhgSCSQpCtr+HA6/ZKXEA8JT0ltDFJq3FzLfKg== 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 2/9/2024 3:32 AM, Tejun Heo wrote: > Hello, Kemeng. > > On Thu, Feb 08, 2024 at 05:26:10PM +0800, Kemeng Shi wrote: >> Hi Tejun, sorry for the delay as I found there is a issue that keep triggering >> writeback even the dirty page is under dirty background threshold. The issue >> make it difficult to observe the expected improvment from this patch. I try to >> fix it in [1] and test this patch based on the fix patches. >> Run test as following: > > Ah, that looks promising and thanks a lot for looking into this. It's great > to have someone actually poring over the code and behavior. Understanding > the wb and cgroup wb behaviors have always been challenging because the only > thing we have is the tracepoints and it's really tedious and difficult to > build an overall understanding from the trace outputs. Can I persuade you > into writing a drgn monitoring script similar to e.g. > tools/workqueues/wq_monitor.py? I think there's a pretty good chance the > visibility can be improved substantially. Hi Tejun, sorry for the late reply as I was on vacation these days. I agree that visibility is poor so I have to add some printks to debug. Actually, I have added per wb stats to improve the visibility as we only have per bdi stats (/sys/kernel/debug/bdi/xxx:x/stats) now. And I plan to submit it in a new series. I'd like to add a script to improve visibility more but I can't ensure the time to do it. I would submit the monitoring script with the per wb stats if the time problem does not bother you. Thanks. > > Thanks. >