mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: SeongJae Park <sj@kernel.org>
To: Karthikeyan KS <karthiproffesional@gmail.com>
Cc: SeongJae Park <sj@kernel.org>,
	Sang-Heon Jeon <ekffu200098@gmail.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	damon@lists.linux.dev, linux-mm@kvack.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mm/damon: reject zero sampling interval
Date: Thu, 17 Sep 2026 19:38:58 -0700	[thread overview]
Message-ID: <20260918023859.13556-1-sj@kernel.org> (raw)
In-Reply-To: <20260917180013.1279018-1-karthiproffesional@gmail.com>

Hi Karthikeyan and Sang-Heon,

On Thu, 17 Sep 2026 18:00:13 +0000 Karthikeyan KS <karthiproffesional@gmail.com> wrote:

> Hi Sang-Heon, Hi SJ,
> 
> > I think SJ already commented on a similar patch. please refer to [1]
> >
> > [1] https://lore.kernel.org/all/20260722094304.3132750-1-dayou5941@163.com/

Thank you for pointing this out, Sang-Heon!

> 
> Thanks, missed that thread. Same objection applies to mine.
> 
> > Can't we keep supporting zero sample interval and fix the warning
> > or the real bug instead?
> 
> I measured a few floors for kdamond_usleep():
> 
>   floor    kdamond CPU (3s)   vs sample_us=5000
>   1us      84%                28x
>   100us    42%                14x
>   1000us   12%                ~3x
>   5000us   ~2%                1x (matches control)
> 
> 5000us is damon_new_ctx()'s own default, and at that floor the spin
> is just gone.
> 
> Would you rather we just document sample_us=0 as accepted/expected
> behavior, or clamp it to that default inside damon_set_attrs()?

I'd prefer adding a comment saying zero sampling interval is accepted.  I think
damon_attr kernel-doc comment is a good place for adding that.


Thanks,
SJ

[...]

  reply	other threads:[~2026-09-18  2:39 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-17 15:06 Karthikeyan KS
2026-09-17 16:09 ` Sang-Heon Jeon
2026-09-17 18:00   ` Karthikeyan KS
2026-09-18  2:38     ` SeongJae Park [this message]
2026-09-18 13:13       ` [PATCH v2] mm/damon: document that a zero sample_interval is accepted Karthikeyan KS
2026-09-18 13:35         ` SJ 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=20260918023859.13556-1-sj@kernel.org \
    --to=sj@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=damon@lists.linux.dev \
    --cc=ekffu200098@gmail.com \
    --cc=karthiproffesional@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    /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

all inboxes | Powered by JetHome®