From: Al Viro <viro@ZenIV.linux.org.uk>
To: Minfei Huang <mnghuan@gmail.com>
Cc: bcrl@kvack.org, linux-fsdevel@vger.kernel.org,
linux-aio@kvack.org, linux-kernel@vger.kernel.org,
minfei.hmf@alibaba-inc.com
Subject: Re: [PATCH] aio: Cleanup unnecessary test for nr_pages
Date: Mon, 20 Jun 2016 15:17:39 +0100 [thread overview]
Message-ID: <20160620141739.GK14480@ZenIV.linux.org.uk> (raw)
In-Reply-To: <20160620140545.GA87874@MinfeideMacBook-Pro.local>
On Mon, Jun 20, 2016 at 10:05:45PM +0800, Minfei Huang wrote:
> Ping. Any comment is appreciate.
>
> Thanks
> Minfei
>
> On 06/13/16 at 12:33P, Minfei Huang wrote:
> > The variable nr_pages is always more than 1, because the size of
> > structure aio_ring is bigger than 0. So remove unnecessary test for
> > nr_page.
What this test really checks is that the value we'd put into nr_pages
(PFN_UP(size)) is not greater than 2^31. Whether it's redundant or not
is a separate question - it very well might be, due to the code in
ioctx_alloc() that caps nr_events, but that needs a proof. In any case,
the reasons you are offering in commit message are wrong - it's about
size being too _large_, not too small.
next prev parent reply other threads:[~2016-06-20 14:20 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-12 16:33 [PATCH] aio: Cleanup unnecessary test for nr_pages Minfei Huang
2016-06-20 14:05 ` Minfei Huang
2016-06-20 14:17 ` Al Viro [this message]
2016-06-22 6:06 ` Minfei Huang
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=20160620141739.GK14480@ZenIV.linux.org.uk \
--to=viro@zeniv.linux.org.uk \
--cc=bcrl@kvack.org \
--cc=linux-aio@kvack.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=minfei.hmf@alibaba-inc.com \
--cc=mnghuan@gmail.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