All of lore.kernel.org
 help / color / mirror / Atom feed
From: SeongJae Park <sj@kernel.org>
To: Gutierrez Asier <gutierrez.asier@huawei-partners.com>
Cc: SeongJae Park <sj@kernel.org>,
	sashiko-reviews@lists.linux.dev, damon@lists.linux.dev
Subject: Re: [RFC PATCH v3 1/4] mm/damon: Introduce DAMOS_QUOTA_HUGEPAGE auto tuning
Date: Tue,  9 Jun 2026 07:52:39 -0700	[thread overview]
Message-ID: <20260609145240.69552-1-sj@kernel.org> (raw)
In-Reply-To: <a834e981-c292-43c1-8f02-d581a0d0b4bc@huawei-partners.com>

On Tue, 9 Jun 2026 14:01:07 +0300 Gutierrez Asier <gutierrez.asier@huawei-partners.com> wrote:

> 
> 
> On 6/6/2026 3:12 AM, SeongJae Park wrote:
> > On Fri, 5 Jun 2026 13:57:47 +0300 Gutierrez Asier <gutierrez.asier@huawei-partners.com> wrote:
> > 
> >>
> >>
> >> On 6/4/2026 6:19 PM, sashiko-bot@kernel.org wrote:
[...]
> >>> [Severity: Medium]
> >>> Is there a risk of a 32-bit overflow in this calculation?
> >>>
> >>> On 32-bit architectures, mult_frac() preserves types, and computing
> >>> thp * 10000 could exceed the maximum unsigned long value if there are
> >>> more than ~1.7 GB of THPs, producing an arbitrarily small quota target.
> >>>
> >> Good catch! I will cast 10000 to unsigned long to preserve the types.
> > 
> > But still it is 'unsigned long' that has only 32 bits on 32-bit architectures?
> > So it shouldn't make any change here.  Or, am I missing something?
> How about just a warning? Something like
> 
> WARN_ONCE(!IS_ENABLED(CONFIG_64BIT),
> 	"In 32bit systems DAMOS_QUOTA_HUGEPAGE_MEM_BP may not be accurate!\n");

I'm not sure if this is a real problem for our real users.  I'd suggest to
ignore Sashiko's concern for now and revisit if real users find and report this
as a problem.


Thanks,
SJ

[...]

  reply	other threads:[~2026-06-09 14:52 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-04 15:03 [RFC PATCH v3 0/4] mm/damon: Introduce a huge page collapsing mechanism using auto tuning gutierrez.asier
2026-06-04 15:03 ` [RFC PATCH v3 1/4] mm/damon: Introduce DAMOS_QUOTA_HUGEPAGE " gutierrez.asier
2026-06-04 15:19   ` sashiko-bot
2026-06-05 10:57     ` Gutierrez Asier
2026-06-06  0:12       ` SeongJae Park
2026-06-09 11:01         ` Gutierrez Asier
2026-06-09 14:52           ` SeongJae Park [this message]
2026-06-05  0:44   ` SeongJae Park
2026-06-05 11:00     ` Gutierrez Asier
2026-06-06  0:14       ` SeongJae Park
2026-06-04 15:03 ` [RFC PATCH v3 2/4] mm/damon: Generalize ctx_target creation for damon_ops_id and add vaddr support gutierrez.asier
2026-06-05  0:50   ` SeongJae Park
2026-06-05 11:13     ` Gutierrez Asier
2026-06-06  0:15       ` SeongJae Park
2026-06-04 15:03 ` [RFC PATCH v3 3/4] mm/damon: introduce DAMON_HUGEPAGE for hot region hugepage collapsing gutierrez.asier
2026-06-04 15:41   ` sashiko-bot
2026-06-05 14:16     ` Gutierrez Asier
2026-06-05  1:06   ` SeongJae Park
2026-06-05 13:47     ` Gutierrez Asier
2026-06-04 15:03 ` [RFC PATCH v3 4/4] Documentation/admin-guide/mm/damon: add DAMON-based Hugepage Management gutierrez.asier
2026-06-04 15:48   ` sashiko-bot
2026-06-05  1:09   ` SeongJae Park
2026-06-05 10:28     ` Gutierrez Asier
2026-06-05  1:34 ` [RFC PATCH v3 0/4] mm/damon: Introduce a huge page collapsing mechanism using auto tuning SeongJae Park
2026-06-05 10:25   ` Gutierrez Asier
2026-06-06  0:24     ` SeongJae Park

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=20260609145240.69552-1-sj@kernel.org \
    --to=sj@kernel.org \
    --cc=damon@lists.linux.dev \
    --cc=gutierrez.asier@huawei-partners.com \
    --cc=sashiko-reviews@lists.linux.dev \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.