[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20121129215751.GA4102@jl-vm1.vm.bytemark.co.uk>
Date: Thu, 29 Nov 2012 21:57:52 +0000
From: Jamie Lokier <jamie@...reable.org>
To: Kent Overstreet <koverstreet@...gle.com>
Cc: Andi Kleen <andi@...stfloor.org>,
Benjamin LaHaise <bcrl@...ck.org>,
linux-kernel@...r.kernel.org, linux-aio@...ck.org,
linux-fsdevel@...r.kernel.org, zab@...hat.com, jmoyer@...hat.com,
axboe@...nel.dk, viro@...iv.linux.org.uk
Subject: Re: [PATCH 22/25] Generic dynamic per cpu refcounting
Kent Overstreet wrote:
> On Thu, Nov 29, 2012 at 09:54:47PM +0100, Andi Kleen wrote:
> > > > The regular atomic_t is limited in ways that you are not.
> > > > See my original mail.
> > >
> > > I don't follow, can you explain?
> >
> > For most cases the reference count is tied to some object, which are
> > naturally limited by memory size or other physical resources.
> >
> > But in the assymetric CPU case with your ref count no such limiter
> > exists.
>
> It's got exactly the same limit as the old code which used the atomic_t
> - we're limited by the number of threads that can be issuing aio
> syscalls at a time.
>
> The assymetry you're talking about _doesn't matter_, individual cpu
> counters wrapping does not affect what the counters all sum to when we
> go to tear down.
>
> A coworker at lunch actually pointed out to me that the reason this is
> true is just that modular arithmatic is still associative with addition
> and subtraction.
It's just like jiffies. Everyone understands jiffies arithmetic I hope.
-- Jamie
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists