Linux-mm Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Kiryl Shutsemau <kas@kernel.org>
To: Sarthak Sharma <sarthak.sharma@arm.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	 David Hildenbrand <david@kernel.org>,
	Jason Gunthorpe <jgg@ziepe.ca>,
	 John Hubbard <jhubbard@nvidia.com>, Peter Xu <peterx@redhat.com>,
	linux-mm@kvack.org,  linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3 1/2] mm/gup_test: prevent overflow in GUP batch calculation
Date: Tue, 1 Sep 2026 14:25:23 +0100	[thread overview]
Message-ID: <apbSKcI2DQt86ncE@thinkstation> (raw)
In-Reply-To: <f2fb4b62-f96a-4df4-915e-eb7130671515@arm.com>

On Tue, Sep 01, 2026 at 04:52:11PM +0530, Sarthak Sharma wrote:
> Hi Kiryl!
> 
> On 9/1/26 4:05 PM, Kiryl Shutsemau wrote:
> > On Tue, Sep 01, 2026 at 02:04:51PM +0530, Sarthak Sharma wrote:
> > What about this:
> > 
> >               nr = min(nr, (end - addr) / PAGE_SIZE);
> >               next = addr + nr * PAGE_SIZE;
> > 
> > Seems to be easier to follow, no?
> 
> Yup, this would be cleaner. Do you want me to respin with this changed?

Let's wait a bit for more feedback.

-- 
  Kiryl Shutsemau / Kirill A. Shutemov


  reply	other threads:[~2026-09-01 13:26 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-01  8:34 [PATCH v3 0/2] mm/gup_test: prevent overflow and report actual pinned bytes Sarthak Sharma
2026-09-01  8:34 ` [PATCH v3 1/2] mm/gup_test: prevent overflow in GUP batch calculation Sarthak Sharma
2026-09-01 10:35   ` Kiryl Shutsemau
2026-09-01 11:22     ` Sarthak Sharma
2026-09-01 13:25       ` Kiryl Shutsemau [this message]
2026-09-01  8:34 ` [PATCH v3 2/2] mm/gup_test: report actual pinned bytes Sarthak Sharma
2026-09-19 20:15   ` David Hildenbrand

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=apbSKcI2DQt86ncE@thinkstation \
    --to=kas@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=david@kernel.org \
    --cc=jgg@ziepe.ca \
    --cc=jhubbard@nvidia.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=peterx@redhat.com \
    --cc=sarthak.sharma@arm.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