[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <ZYNHkQZhwvM81TZP@casper.infradead.org>
Date: Wed, 20 Dec 2023 19:59:13 +0000
From: Matthew Wilcox <willy@...radead.org>
To: Ira Weiny <ira.weiny@...el.com>
Cc: "Fabio M. De Francesco" <fabio.maria.de.francesco@...ux.intel.com>,
Andrew Morton <akpm@...ux-foundation.org>, linux-mm@...ck.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] mm/memory: Replace kmap() with kmap_local_page()
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.
Powered by blists - more mailing lists