Re: [PATCH v3 2/2] pid: only take pidmap_lock once on alloc

From: Mateusz Guzik

Date: Sun Dec 07 2025 - 04:21:48 EST


On Sun, Dec 7, 2025 at 8:21 AM Matthew Wilcox <willy@xxxxxxxxxxxxx> wrote:
>
> On Sat, Dec 06, 2025 at 02:19:55PM +0100, Mateusz Guzik wrote:
> > - if (!pid)
> > + if (unlikely(!pid))
>
> Does this change anything? I was under the impression that gcc already
> treats !p as unlikely.

I don't know if gcc is guaranteed to act like that, most of my
experience is with clang which was rather inconsistent about it.