Rafael Aquini 30be7f6a03 mm/damon/core: prevent unnecessary overflow in damos_set_effective_quota()
JIRA: https://redhat.atlassian.net/browse/RHEL-145695

commit 9f68eabab9d9aaa764a8d234c4170119e6518102
Author: Quanmin Yan <yanquanmin1@huawei.com>
Date:   Thu Aug 21 20:55:55 2025 +0800

    mm/damon/core: prevent unnecessary overflow in damos_set_effective_quota()

    On 32-bit systems, the throughput calculation in
    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.

    Link: https://lkml.kernel.org/r/20250821125555.3020951-1-yanquanmin1@huawei.com
    Fixes: 1cd2430300 ("mm/damon/schemes: implement time quota")
    Signed-off-by: Quanmin Yan <yanquanmin1@huawei.com>
    Reported-by: Andrew Paniakin <apanyaki@amazon.com>
    Reviewed-by: SeongJae Park <sj@kernel.org>
    Cc: Kefeng Wang <wangkefeng.wang@huawei.com>
    Cc: ze zuo <zuoze1@huawei.com>
    Cc: <stable@vger.kernel.org>    [5.16+]
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>

Signed-off-by: Rafael Aquini <raquini@redhat.com>
2026-07-31 14:51:02 -04:00
2026-07-31 14:50:55 -04:00
2026-07-01 16:15:37 -04:00
2026-01-19 14:33:01 -05:00
2026-07-01 16:16:28 -04:00

Linux kernel
============

There are several guides for kernel developers and users. These guides can
be rendered in a number of formats, like HTML and PDF. Please read
Documentation/admin-guide/README.rst first.

In order to build the documentation, use ``make htmldocs`` or
``make pdfdocs``.  The formatted documentation can also be read online at:

    https://www.kernel.org/doc/html/latest/

There are various text files in the Documentation/ subdirectory,
several of them using the reStructuredText markup notation.

Please read the Documentation/process/changes.rst file, as it contains the
requirements for building and running the kernel, and information about
the problems which may result by upgrading your kernel.
S
Description
No description provided
Readme
2.8 GiB
Languages
C 97.5%
Assembly 1%
Shell 0.6%
Python 0.3%
Makefile 0.3%