Thread (13 messages) 13 messages, 4 authors, 2024-05-13

Re: [PATCH 1/3] tracing: Remove dependency of saved_cmdlines_buffer on PID_MAX_DEFAULT

From: Michal Koutný <mkoutny@suse.com>
Date: 2024-05-13 17:30:52
Also in: lkml

On Tue, Apr 09, 2024 at 11:01:26AM GMT, Steven Rostedt [off-list ref] wrote:
quoted
-	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

Attachments

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help