From: SeongJae Park <sj@kernel.org>
To: Quanmin Yan <yanquanmin1@huawei.com>
Cc: SeongJae Park <sj@kernel.org>,
akpm@linux-foundation.org, damon@lists.linux.dev,
linux-kernel@vger.kernel.org, linux-mm@kvack.org,
wangkefeng.wang@huawei.com, zuoze1@huawei.com,
apanyaki@amazon.com
Subject: Re: [PATCH] mm/damon/core: prevent unnecessary overflow in damos_set_effective_quota()
Date: Thu, 21 Aug 2025 09:59:11 -0700 [thread overview]
Message-ID: <20250821165911.79204-1-sj@kernel.org> (raw)
In-Reply-To: <20250821125555.3020951-1-yanquanmin1@huawei.com>
On Thu, 21 Aug 2025 20:55:55 +0800 Quanmin Yan <yanquanmin1@huawei.com> wrote:
> On 32-bit systems, the throughput calculation in function
> damos_set_effective_quota() is prone to unnecessary multiplication
> overflow. Using mult_frac() to fix it.
>
> Andrew Paniakin also recently found and privately reported this
> issue, on 64 bit systems. This can also happen on 64-bit systems,
> once the charged size exceeds ~17 TiB. On systems running for long
> time in production, this issue can actually happen.
>
> More specifically, when a DAMOS scheme having the time quota run
> for longtime, throughput calculation can overflow and set esz too
> small. As a result, speed of the scheme get unexpectedly slow.
>
> Fixes: 1cd243030059 ("mm/damon/schemes: implement time quota")
> Cc: <stable@vger.kernel.org> # 5.16.x
> Signed-off-by: Quanmin Yan <yanquanmin1@huawei.com>
> Reported-by: Andrew Paniakin <apanyaki@amazon.com>
> Closes: N/A # privately reported
Reviewed-by: SeongJae Park <sj@kernel.org>
Thanks,
SJ
[...]
prev parent reply other threads:[~2025-08-21 16:59 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-21 12:55 Quanmin Yan
2025-08-21 16:59 ` SeongJae Park [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250821165911.79204-1-sj@kernel.org \
--to=sj@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=apanyaki@amazon.com \
--cc=damon@lists.linux.dev \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=wangkefeng.wang@huawei.com \
--cc=yanquanmin1@huawei.com \
--cc=zuoze1@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox