From: "Michal Koutný" <mkoutny@suse.com>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org,
Masami Hiramatsu <mhiramat@kernel.org>,
Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
Christian Brauner <brauner@kernel.org>,
Oleg Nesterov <oleg@redhat.com>,
Kent Overstreet <kent.overstreet@linux.dev>,
Kees Cook <keescook@chromium.org>,
Andrew Morton <akpm@linux-foundation.org>,
Tycho Andersen <tandersen@netflix.com>,
Jens Axboe <axboe@kernel.dk>, Aleksa Sarai <cyphar@cyphar.com>
Subject: Re: [PATCH 1/3] tracing: Remove dependency of saved_cmdlines_buffer on PID_MAX_DEFAULT
Date: Mon, 13 May 2024 19:30:49 +0200 [thread overview]
Message-ID: <eteswsookugqwr5pju5fuzc6m2wly4pxrbp3y2umke6ojvwo3x@pwjqsu77yh6s> (raw)
In-Reply-To: <20240409110126.651e94cb@gandalf.local.home>
[-- Attachment #1: Type: text/plain, Size: 499 bytes --]
On Tue, Apr 09, 2024 at 11:01:26AM GMT, Steven Rostedt <rostedt@goodmis.org> wrote:
> > - tpid = pid & (PID_MAX_DEFAULT - 1);
> > + tpid = pid % PID_MAP_SIZE;
>
> Does that compile to the same? This is a fast path.
I didn't check.
If fast is the intetion, I would change it to something
like BUILD_BUG_ON(!(PID_MAP_SIZE % 2)) and keep the bit operation
without reliance on compiler optimizations.
Thanks for the response (I may not follow up on this single commit
though).
Michal
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
next prev parent reply other threads:[~2024-05-13 17:30 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-08 14:58 [PATCH 0/3] kernel/pid: Remove default pid_max value Michal Koutný
2024-04-08 14:58 ` [PATCH 1/3] tracing: Remove dependency of saved_cmdlines_buffer on PID_MAX_DEFAULT Michal Koutný
2024-04-09 15:01 ` Steven Rostedt
2024-05-13 17:30 ` Michal Koutný [this message]
2024-04-08 14:58 ` [PATCH 2/3] kernel/pid: Remove default pid_max value Michal Koutný
2024-04-08 20:29 ` Andrew Morton
2024-04-11 15:40 ` Michal Koutný
2024-04-11 22:03 ` Andrew Morton
2024-04-12 14:32 ` Michal Koutný
2024-04-09 0:45 ` kernel test robot
2024-04-09 1:38 ` kernel test robot
2024-05-13 17:26 ` Michal Koutný
2024-04-08 14:58 ` [PATCH 3/3] tracing: Compare pid_max against pid_list capacity Michal Koutný
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=eteswsookugqwr5pju5fuzc6m2wly4pxrbp3y2umke6ojvwo3x@pwjqsu77yh6s \
--to=mkoutny@suse.com \
--cc=akpm@linux-foundation.org \
--cc=axboe@kernel.dk \
--cc=brauner@kernel.org \
--cc=cyphar@cyphar.com \
--cc=keescook@chromium.org \
--cc=kent.overstreet@linux.dev \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-trace-kernel@vger.kernel.org \
--cc=mathieu.desnoyers@efficios.com \
--cc=mhiramat@kernel.org \
--cc=oleg@redhat.com \
--cc=rostedt@goodmis.org \
--cc=tandersen@netflix.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).