Re: [REGRESSION] kernfs: empty cgroup rmdir latency after delete-notification changes

From: Chengfeng Lin

Date: Sun Sep 13 2026 - 11:47:15 EST


Hi Tejun,

Thanks. I found this during research into kernel performance regressions,
using a microbenchmark of cgroup creation and removal. This was not
prompted by a production issue.

I reported it to document the added removal cost and ask whether some
of it could be reduced while preserving the fixes. I agree that the
roughly 3 us increase per removal does not, by itself, demonstrate a
significant impact on real workloads.

Thanks,
Chengfeng

Tejun Heo <tj@xxxxxxxxxx> 于2026年9月13日周日 23:03写道:
>
> Hello,
>
> On Sun, Sep 13, 2026 at 10:43:04PM +0800, Chengfeng Lin wrote:
> > I found an increase in empty cgroup removal latency across 507d8ce13f5b
> > ("kernfs: Don't set_nlink for directories being removed") and eea5d2bb34ba
> > ("kernfs: Send IN_DELETE_SELF and IN_IGNORED"). With sched_ext disabled,
> > rmdir() went from about 6.5 us to 9.6 us, an increase of 46-47%.
> > The result held in two independent runs.
>
> I don't want to make cgroup removal unnecessarily expensive but at the same
> time it's not an operation that I consider to be a hot path, so as long as
> the operaiton can finish in a reasonable amount of time and single digit us
> definitely is, performance of rmdir usually isn't something which is high in
> priority. Can you please detail why this matters for you?
>
> Thanks.
>
> --
> tejun