linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Matthew Wilcox <willy@infradead.org>
To: Gao Xiang <hsiangkao@aol.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org,
	Fengguang Wu <fengguang.wu@intel.com>
Subject: Re: [PATCH] mm: simplify get_next_ra_size
Date: Sun, 28 Oct 2018 03:23:46 -0700	[thread overview]
Message-ID: <20181028102346.GC25444@bombadil.infradead.org> (raw)
In-Reply-To: <1540707206-19649-1-git-send-email-hsiangkao@aol.com>

On Sun, Oct 28, 2018 at 02:13:26PM +0800, Gao Xiang wrote:
> It's a trivial simplification for get_next_ra_size and
> clear enough for humans to understand.
> 
> It also fixes potential overflow if ra->size(< ra_pages) is too large.
> 
> Cc: Fengguang Wu <fengguang.wu@intel.com>
> Signed-off-by: Gao Xiang <hsiangkao@aol.com>

Reviewed-by: Matthew Wilcox <willy@infradead.org>

I also considered what would happen with underflow (passing a 'max'
less than 16, or less than 2) and it would seem to do the right thing
in that case.

  parent reply	other threads:[~2018-10-28 10:23 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-28  6:13 Gao Xiang
2018-10-28  6:27 ` Fengguang Wu
2018-10-28  7:05   ` Gao Xiang
2018-10-28 10:23 ` Matthew Wilcox [this message]
2018-10-28 11:05   ` Gao Xiang
2020-11-02 19:01 The Dellia’s
2020-11-02 21:00 ` The Dellia’s

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=20181028102346.GC25444@bombadil.infradead.org \
    --to=willy@infradead.org \
    --cc=akpm@linux-foundation.org \
    --cc=fengguang.wu@intel.com \
    --cc=hsiangkao@aol.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    /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