[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZjJ7z0j8T2rTicLD@slm.duckdns.org>
Date: Wed, 1 May 2024 07:28:47 -1000
From: Tejun Heo <tj@...nel.org>
To: Kemeng Shi <shikemeng@...weicloud.com>
Cc: willy@...radead.org, akpm@...ux-foundation.org, jack@...e.cz,
linux-fsdevel@...r.kernel.org, linux-mm@...ck.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 09/10] writeback: factor out wb_dirty_exceeded to remove
repeated code
On Mon, Apr 29, 2024 at 11:47:37AM +0800, Kemeng Shi wrote:
> Factor out wb_dirty_exceeded to remove repeated code
>
> Signed-off-by: Kemeng Shi <shikemeng@...weicloud.com>
> ---
> mm/page-writeback.c | 21 +++++++++++----------
> 1 file changed, 11 insertions(+), 10 deletions(-)
>
> diff --git a/mm/page-writeback.c b/mm/page-writeback.c
> index 68ae4c90ce8b..26b638cc58c5 100644
> --- a/mm/page-writeback.c
> +++ b/mm/page-writeback.c
> @@ -140,6 +140,7 @@ struct dirty_throttle_control {
>
> unsigned long pos_ratio;
> bool freerun;
> + bool dirty_exceeded;
Can you try making the function return bool? That or collect dtc setup into
a single function which takes flags to initialize different parts? It can
become pretty error-prone to keep partially storing results in the struct.
Thanks.
--
tejun
Powered by blists - more mailing lists