public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Cyrill Gorcunov <gorcunov@gmail.com>
To: Kirill Tkhai <ktkhai@virtuozzo.com>
Cc: avagin@openvz.org, linux-kernel@vger.kernel.org, bcrl@kvack.org,
	viro@zeniv.linux.org.uk, akpm@linux-foundation.org,
	xemul@virtuozzo.com
Subject: Re: [PATCH] aio: Add command to wait completion of all requests
Date: Tue, 13 Jun 2017 13:32:25 +0300	[thread overview]
Message-ID: <20170613103225.GB23987@uranus.lan> (raw)
In-Reply-To: <9d133393-1ea7-c370-24b0-7bb565428b7e@virtuozzo.com>

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.

  reply	other threads:[~2017-06-13 10:32 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-09  9:49 [PATCH] aio: Add command to wait completion of all requests Kirill Tkhai
2017-06-13  8:14 ` Cyrill Gorcunov
2017-06-13  9:45   ` Kirill Tkhai
2017-06-13 10:32     ` Cyrill Gorcunov [this message]
2017-06-13 14:42 ` Benjamin LaHaise
2017-06-13 15:11   ` Kirill Tkhai
2017-06-13 15:26     ` Benjamin LaHaise
2017-06-13 16:17       ` Kirill Tkhai
2017-06-13 23:26         ` Benjamin LaHaise
2017-06-14  9:11           ` Kirill Tkhai
2017-06-14 14:47             ` Benjamin LaHaise

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170613103225.GB23987@uranus.lan \
    --to=gorcunov@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=avagin@openvz.org \
    --cc=bcrl@kvack.org \
    --cc=ktkhai@virtuozzo.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=viro@zeniv.linux.org.uk \
    --cc=xemul@virtuozzo.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox