From: Mark Brown <broonie@kernel.org>
To: Kees Cook <keescook@chromium.org>
Cc: kernel test robot <oliver.sang@intel.com>,
Andy Lutomirski <luto@amacapital.net>,
Will Drewry <wad@chromium.org>, Shuah Khan <shuah@kernel.org>,
linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org,
linux-hardening@vger.kernel.org
Subject: Re: [PATCH] selftests/seccomp: Pin benchmark to single CPU
Date: Tue, 6 Feb 2024 11:10:46 +0000 [thread overview]
Message-ID: <ZcITtknvEVm0QPMo@finisterre.sirena.org.uk> (raw)
In-Reply-To: <202402060302.C9BD99F@keescook>
[-- Attachment #1: Type: text/plain, Size: 922 bytes --]
On Tue, Feb 06, 2024 at 03:04:32AM -0800, Kees Cook wrote:
> On Tue, Feb 06, 2024 at 10:16:19AM +0000, Mark Brown wrote:
> > On Tue, Feb 06, 2024 at 01:56:47AM -0800, Kees Cook wrote:
> > > + /* Set from highest CPU down. */
> > > + for (cpu = ncores - 1; cpu >= 0; cpu--) {
> > > + CPU_ZERO_S(setsz, setp);
> > > + CPU_SET_S(cpu, setsz, setp);
> > Is there some particular reason to go from the highest CPU number down?
> > Not that it super matters but the default would be to iterate from 0 and
> > there's a comment but it just says the what not the why.
> I was arbitrarily picking a direction and all the examples I could find
> started at 0, so this would be more (?) out of the way. :P
> Without a cpu cgroup, I can't _exclude_ the pinned CPU from other
> processes, so I was pretending the last CPU will be less likely to be
> used.
That feels like it should go in a comment so it's a bit less mysterious.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
prev parent reply other threads:[~2024-02-06 11:11 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-06 9:56 Kees Cook
2024-02-06 10:16 ` Mark Brown
2024-02-06 11:04 ` Kees Cook
2024-02-06 11:10 ` Mark Brown [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=ZcITtknvEVm0QPMo@finisterre.sirena.org.uk \
--to=broonie@kernel.org \
--cc=keescook@chromium.org \
--cc=linux-hardening@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=luto@amacapital.net \
--cc=oliver.sang@intel.com \
--cc=shuah@kernel.org \
--cc=wad@chromium.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®