[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240409110126.651e94cb@gandalf.local.home>
Date: Tue, 9 Apr 2024 11:01:26 -0400
From: Steven Rostedt <rostedt@...dmis.org>
To: Michal Koutný <mkoutny@...e.com>
Cc: linux-kernel@...r.kernel.org, linux-trace-kernel@...r.kernel.org, Masami
Hiramatsu <mhiramat@...nel.org>, Mathieu Desnoyers
<mathieu.desnoyers@...icios.com>, Christian Brauner <brauner@...nel.org>,
Oleg Nesterov <oleg@...hat.com>, Kent Overstreet
<kent.overstreet@...ux.dev>, Kees Cook <keescook@...omium.org>, Andrew
Morton <akpm@...ux-foundation.org>, Tycho Andersen <tandersen@...flix.com>,
Jens Axboe <axboe@...nel.dk>, Aleksa Sarai <cyphar@...har.com>
Subject: Re: [PATCH 1/3] tracing: Remove dependency of saved_cmdlines_buffer
on PID_MAX_DEFAULT
On Mon, 8 Apr 2024 16:58:17 +0200
Michal Koutný <mkoutny@...e.com> wrote:
> @@ -294,7 +295,7 @@ static void __trace_find_cmdline(int pid, char comm[])
> return;
> }
>
> - tpid = pid & (PID_MAX_DEFAULT - 1);
> + tpid = pid % PID_MAP_SIZE;
Does that compile to the same? This is a fast path.
-- Steve
> map = savedcmd->map_pid_to_cmdline[tpid];
> if (map != NO_CMDLINE_MAP) {
> tpid = savedcmd->map_cmdline_to_pid[map];
Powered by blists - more mailing lists