Re: [PATCH 2/2] mm/damon/lru_sort: error out for >10000 active_mem_bp
From: SJ Park
Date: Mon Aug 03 2026 - 20:16:23 EST
On Mon, 3 Aug 2026 15:57:15 +0100 David Laight <david.laight.linux@xxxxxxxxx> wrote:
> On Mon, 3 Aug 2026 06:40:33 -0700
> SJ Park <sj@xxxxxxxxxx> wrote:
[...]
> > --- a/mm/damon/lru_sort.c
> > +++ b/mm/damon/lru_sort.c
> > @@ -233,6 +233,8 @@ static int damon_lru_sort_add_quota_goals(struct damos *hot_scheme,
> >
> > if (!active_mem_bp)
> > return 0;
> > + if (10000 < active_mem_bp)
>
> That is backwards...
I tend to prefer using only '<' or '<=' because it makes smaller thing comes
left. But maybe I was overusing that here. I think 'active_mem_bp > 10000'
should also reads well. I will think more carefully for this, from the next
time. Andrew already picked this up and he should be busy for next
merge window preparation. Hence I'll not revision this for the minor change,
if you don't mind.
Thanks,
SJ
[...]