[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Ya3KZiLg5lYjsGcQ@hirez.programming.kicks-ass.net>
Date: Mon, 6 Dec 2021 09:31:34 +0100
From: Peter Zijlstra <peterz@...radead.org>
To: Christoph Hellwig <hch@...radead.org>
Cc: Jens Axboe <axboe@...nel.dk>,
"linux-block@...r.kernel.org" <linux-block@...r.kernel.org>,
keescook@...omium.org,
Linus Torvalds <torvalds@...ux-foundation.org>,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] block: switch to atomic_t for request references
On Sun, Dec 05, 2021 at 10:53:49PM -0800, Christoph Hellwig wrote:
> On Fri, Dec 03, 2021 at 08:35:40AM -0700, Jens Axboe wrote:
> > refcount_t is not as expensive as it used to be, but it's still more
> > expensive than the io_uring method of using atomic_t and just checking
> > for potential over/underflow.
> >
> > This borrows that same implementation, which in turn is based on the
> > mm implementation from Linus.
>
> If refcount_t isn't good enough for a normal kernel fast path we have
> a problem. Can we discuss that with the maintainers instead of coming
> up with our home grown schemes again?
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.
Anyway refcount_t is just a single "lock xadd" and a few branches, where
does it go wrong? Do you have perf output to compare between them?
Powered by blists - more mailing lists