public inbox for linux-mm@kvack.org
 help / color / mirror / Atom feed
From: Matthew Wilcox <willy@infradead.org>
To: Ira Weiny <ira.weiny@intel.com>
Cc: "Fabio M. De Francesco"
	<fabio.maria.de.francesco@linux.intel.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mm/memory: Replace kmap() with kmap_local_page()
Date: Wed, 20 Dec 2023 19:59:13 +0000	[thread overview]
Message-ID: <ZYNHkQZhwvM81TZP@casper.infradead.org> (raw)
In-Reply-To: <6583463e8de5c_30a94294fb@iweiny-mobl.notmuch>

On Wed, Dec 20, 2023 at 11:53:34AM -0800, Ira Weiny wrote:
> > My understanding of the current implementation is that unmap_and_put_page() 
> > calls folio_release_kmap(), taking as arguments the folio which the page 
> > belongs to and the kernel virtual address returned by kmap_local_page().
> > 
> > folio_release_kmap() calls kunmap_local() and then folio_put(). The last is 
> > called on the folio obtained by the unmap_and_put_page() wrapper and, if I'm 
> > not wrong, it releases refcounts on folios like put_page() does on pages.
> 
> This is where my consternation came from.  I saw the folio_put() and did
> not realize that get_page() now calls folio_get().

That's not new.  See 86d234cb0499 which changed get_page() to call
folio_get(), but notice that it's doing the _exact same thing_ that
get_page() used to do.  And it's behaved this way since ddc58f27f9ee
in 2016.


  reply	other threads:[~2023-12-20 19:59 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-15  8:43 [PATCH] mm/memory: Replace kmap() with kmap_local_page() Fabio M. De Francesco
2023-12-18  3:34 ` Ira Weiny
2023-12-18  7:43   ` Fabio M. De Francesco
2023-12-20 19:53     ` Ira Weiny
2023-12-20 19:59       ` Matthew Wilcox [this message]
  -- strict thread matches above, loose matches on Subject: below --
2023-12-14  8:10 Fabio M. De Francesco
2023-12-14 19:47 ` Andrew Morton
2023-12-15  8:40   ` Fabio M. De Francesco
2023-12-15 16:17     ` Fabio M. De Francesco

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=ZYNHkQZhwvM81TZP@casper.infradead.org \
    --to=willy@infradead.org \
    --cc=akpm@linux-foundation.org \
    --cc=fabio.maria.de.francesco@linux.intel.com \
    --cc=ira.weiny@intel.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