From: "Li,Rongqing" <lirongqing@baidu.com>
To: Zhan Xusheng <zhanxusheng1024@gmail.com>
Cc: Peter Zijlstra <peterz@infradead.org>,
Ingo Molnar <mingo@redhat.com>,
Juri Lelli <juri.lelli@redhat.com>,
Vincent Guittot <vincent.guittot@linaro.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: 答复: [外部邮件] Re: [PATCH] sched/debug: reject zero writes to numa_balancing scan_size_mb
Date: Tue, 21 Jul 2026 09:54:41 +0000 [thread overview]
Message-ID: <15737be71f5843cbbbc1d0bf8de9f7fb@baidu.com> (raw)
In-Reply-To: <20260721091821.3613257-1-zhanxusheng@xiaomi.com>
> On Mon, Jul 14, 2026 at 01:30PM +0800, Li RongQing wrote:
> > + debugfs_create_file("scan_size_mb", 0644, numa,
> > + &sysctl_numa_balancing_scan_size, &numa_scan_size_fops);
>
> DEFINE_DEBUGFS_ATTRIBUTE() is meant to be paired with
> debugfs_create_file_unsafe() rather than debugfs_create_file():
> debugfs_attr_read()/write() already take removal protection via
> debugfs_file_get()/put(), so debugfs_create_file() just adds a redundant
> full_proxy layer. The "verbose" knob in this same file uses
> debugfs_create_file_unsafe() for that reason.
>
> > + if (val == 0 || val > UINT_MAX)
> > + return -ERANGE;
>
> The changelog says the value is rejected with -EINVAL, but the code returns
> -ERANGE -- could you make the two consistent? -ERANGE is fine.
>
> The write-time rejection is the right approach; just the two points above.
>
Thanks, I will send v2 with your advice.
[Li,Rongqing]
> Thanks,
> Xusheng
prev parent reply other threads:[~2026-07-21 9:56 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-14 5:30 [PATCH] sched/debug: reject zero writes to numa_balancing scan_size_mb lirongqing
2026-07-21 9:18 ` Zhan Xusheng
2026-07-21 9:54 ` Li,Rongqing [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=15737be71f5843cbbbc1d0bf8de9f7fb@baidu.com \
--to=lirongqing@baidu.com \
--cc=juri.lelli@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=vincent.guittot@linaro.org \
--cc=zhanxusheng1024@gmail.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 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.