Re: [PATCH 2/9] perf/core: Add PERF_SAMPLE_CGROUP feature

From: Namhyung Kim
Date: Wed Oct 02 2019 - 02:32:25 EST


Hi Tejun,

Sorry for the late reply.

On Sat, Sep 21, 2019 at 6:04 AM Tejun Heo <tj@xxxxxxxxxx> wrote:
>
> On Fri, Sep 20, 2019 at 05:47:45PM +0900, Namhyung Kim wrote:
> > Thanks for the sharing information! For 32-bit, while the ino itself is not
> > monotonic, gen << 32 + ino is monotonic right? I think we can use the
>
> It's not. gen gets incremented on every allocation, so it has not
> high but still realistic chance of collisions.

In __kernfs_new_node(), gen gets increased only if idr_alloc_cyclic()
returns lower than the cursor... I'm not sure you talked about it.

Thanks
Namhyung