linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Matthew Wilcox <willy@infradead.org>
To: Cheng Li <lic121@chinatelecom.cn>
Cc: mike.kravetz@oracle.com, akpm@linux-foundation.org,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mm: use mem_map_offset instead of mem_map_next
Date: Sun, 4 Sep 2022 22:15:18 +0100	[thread overview]
Message-ID: <YxUVZpsmukNW5NyK@casper.infradead.org> (raw)
In-Reply-To: <1662300161-22049-1-git-send-email-lic121@chinatelecom.cn>

On Sun, Sep 04, 2022 at 02:02:41PM +0000, Cheng Li wrote:
> To handle discontiguity case, mem_map_next() has a parameter named
> `offset`. As a function caller, one would be confused why "get
> next entry" needs a parameter named "offset". The other drawback of
> mem_map_next() is that the callers must take care of the map between
> parameter "iter" and "offset", otherwise we may get an hole or
> duplication during iteration. So we use mem_map_offset instead of
> mem_map_next.

I think we should go further and get rid of mem_map_offset().
nth_page() is now more efficient than mem_map_offset().


  parent reply	other threads:[~2022-09-04 21:15 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-04 14:02 Cheng Li
2022-09-04 16:38 ` kernel test robot
2022-09-04 17:00 ` kernel test robot
2022-09-04 21:15 ` Matthew Wilcox [this message]
2022-09-06 17:04   ` Mike Kravetz

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=YxUVZpsmukNW5NyK@casper.infradead.org \
    --to=willy@infradead.org \
    --cc=akpm@linux-foundation.org \
    --cc=lic121@chinatelecom.cn \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mike.kravetz@oracle.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