Re: [PATCH] block: switch to atomic_t for request references

From: Linus Torvalds
Date: Mon Dec 06 2021 - 12:35:26 EST


On Mon, Dec 6, 2021 at 12:31 AM Peter Zijlstra <peterz@xxxxxxxxxxxxx> wrote:
>
> Quite; and for something that pretends to be about performance, it also
> lacks any actual numbers to back that claim.
>
> The proposed implementation also doesn't do nearly as much as the
> refcount_t one does.

Stop pretending refcoutn_t is that great.

It's horrid. The code it generators is disgusting. It should never
have been inlines in the first place, and the design decsisions were
questionable to begin with.

There's a reason core stuff (like the page counters) DO NOT USE REFCOUNT_T.

I seriously believe that refcount_t should be used for things like
device reference counting or similar issues, and not for _any_ truly
core code.

Linus