[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20170613103225.GB23987@uranus.lan>
Date: Tue, 13 Jun 2017 13:32:25 +0300
From: Cyrill Gorcunov <gorcunov@...il.com>
To: Kirill Tkhai <ktkhai@...tuozzo.com>
Cc: avagin@...nvz.org, linux-kernel@...r.kernel.org, bcrl@...ck.org,
viro@...iv.linux.org.uk, akpm@...ux-foundation.org,
xemul@...tuozzo.com
Subject: Re: [PATCH] aio: Add command to wait completion of all requests
On Tue, Jun 13, 2017 at 12:45:39PM +0300, Kirill Tkhai wrote:
> >
> > I'm not that familiar with AIO internals but this snippet worries me:
> > the reqs_available is unsigned int, reqs is unsigned it as well but
> > used as an accumulator over ALL cpus, can't it get overflow and
> > gives modulo result, should not it be unsigned long or something?
>
> All available reqs are initially contain in kioctx::reqs_available,
> which is atomic_t, and then they are distributed over percpu counters.
> So, this is OK.
Thanks for explanation! Looks ok to me. But I'm far from being
aio expert, if someone else won't beat me I'll take a closer
look in [a day|couple of] or so.
Powered by blists - more mailing lists