linux-doc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mm/doc: Replace isolate_lru_page with folio_isolate_lru
@ 2023-01-31  6:28 Kuan-Ying Lee
  2023-02-02 18:02 ` Jonathan Corbet
  0 siblings, 1 reply; 5+ messages in thread
From: Kuan-Ying Lee @ 2023-01-31  6:28 UTC (permalink / raw)
  To: Jonathan Corbet, Matthias Brugger
  Cc: chinwen.chang, andrew.yang, Kuan-Ying Lee, linux-doc,
	linux-kernel, linux-arm-kernel, linux-mediatek

Since we introduce folio, replace isolate_lru_page() with
folio_isolate_lru().

Signed-off-by: Kuan-Ying Lee <Kuan-Ying.Lee@mediatek.com>
---
 Documentation/mm/page_migration.rst | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/Documentation/mm/page_migration.rst b/Documentation/mm/page_migration.rst
index 11493bad7112..1f8cc175d770 100644
--- a/Documentation/mm/page_migration.rst
+++ b/Documentation/mm/page_migration.rst
@@ -69,8 +69,8 @@ In kernel use of migrate_pages()
 
    Lists of pages to be migrated are generated by scanning over
    pages and moving them into lists. This is done by
-   calling isolate_lru_page().
-   Calling isolate_lru_page() increases the references to the page
+   calling folio_isolate_lru().
+   Calling folio_isolate_lru() increases the references to the page
    so that it cannot vanish while the page migration occurs.
    It also prevents the swapper or other scans from encountering
    the page.
@@ -89,7 +89,7 @@ How migrate_pages() works
 
 migrate_pages() does several passes over its list of pages. A page is moved
 if all references to a page are removable at the time. The page has
-already been removed from the LRU via isolate_lru_page() and the refcount
+already been removed from the LRU via folio_isolate_lru() and the refcount
 is increased so that the page cannot be freed while page migration occurs.
 
 Steps:
-- 
2.18.0


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] mm/doc: Replace isolate_lru_page with folio_isolate_lru
  2023-01-31  6:28 [PATCH] mm/doc: Replace isolate_lru_page with folio_isolate_lru Kuan-Ying Lee
@ 2023-02-02 18:02 ` Jonathan Corbet
  2023-02-09 13:10   ` Mike Rapoport
  0 siblings, 1 reply; 5+ messages in thread
From: Jonathan Corbet @ 2023-02-02 18:02 UTC (permalink / raw)
  To: Kuan-Ying Lee, Matthias Brugger
  Cc: chinwen.chang, andrew.yang, Kuan-Ying Lee, linux-doc,
	linux-kernel, linux-arm-kernel, linux-mediatek, linux-mm

Kuan-Ying Lee <Kuan-Ying.Lee@mediatek.com> writes:

> Since we introduce folio, replace isolate_lru_page() with
> folio_isolate_lru().
>
> Signed-off-by: Kuan-Ying Lee <Kuan-Ying.Lee@mediatek.com>
> ---
>  Documentation/mm/page_migration.rst | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)

This seems like a good patch to copy to linux-mm - done now.

The patch perhaps is a closer match to what's in linux-next, but it
seems that, if we're going to update this document, we should reflect
the use folios throughout?

Thanks,

jon

> diff --git a/Documentation/mm/page_migration.rst b/Documentation/mm/page_migration.rst
> index 11493bad7112..1f8cc175d770 100644
> --- a/Documentation/mm/page_migration.rst
> +++ b/Documentation/mm/page_migration.rst
> @@ -69,8 +69,8 @@ In kernel use of migrate_pages()
>  
>     Lists of pages to be migrated are generated by scanning over
>     pages and moving them into lists. This is done by
> -   calling isolate_lru_page().
> -   Calling isolate_lru_page() increases the references to the page
> +   calling folio_isolate_lru().
> +   Calling folio_isolate_lru() increases the references to the page
>     so that it cannot vanish while the page migration occurs.
>     It also prevents the swapper or other scans from encountering
>     the page.
> @@ -89,7 +89,7 @@ How migrate_pages() works
>  
>  migrate_pages() does several passes over its list of pages. A page is moved
>  if all references to a page are removable at the time. The page has
> -already been removed from the LRU via isolate_lru_page() and the refcount
> +already been removed from the LRU via folio_isolate_lru() and the refcount
>  is increased so that the page cannot be freed while page migration occurs.
>  
>  Steps:
> -- 
> 2.18.0

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] mm/doc: Replace isolate_lru_page with folio_isolate_lru
  2023-02-02 18:02 ` Jonathan Corbet
@ 2023-02-09 13:10   ` Mike Rapoport
  2023-02-09 13:58     ` Matthew Wilcox
  0 siblings, 1 reply; 5+ messages in thread
From: Mike Rapoport @ 2023-02-09 13:10 UTC (permalink / raw)
  To: Jonathan Corbet
  Cc: Kuan-Ying Lee, Matthias Brugger, chinwen.chang, andrew.yang,
	linux-doc, linux-kernel, linux-arm-kernel, linux-mediatek,
	linux-mm

On Thu, Feb 02, 2023 at 11:02:11AM -0700, Jonathan Corbet wrote:
> Kuan-Ying Lee <Kuan-Ying.Lee@mediatek.com> writes:
> 
> > Since we introduce folio, replace isolate_lru_page() with
> > folio_isolate_lru().
> >
> > Signed-off-by: Kuan-Ying Lee <Kuan-Ying.Lee@mediatek.com>
> > ---
> >  Documentation/mm/page_migration.rst | 6 +++---
> >  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> This seems like a good patch to copy to linux-mm - done now.
> 
> The patch perhaps is a closer match to what's in linux-next, but it
> seems that, if we're going to update this document, we should reflect
> the use folios throughout?

Most of the current users of migrate_pages() still use isolate_lru_page()
so I think that updating page_migration.rst to folios is premature.
But when we do the update it also should include the translations.
 
> Thanks,
> 
> jon
> 
> > diff --git a/Documentation/mm/page_migration.rst b/Documentation/mm/page_migration.rst
> > index 11493bad7112..1f8cc175d770 100644
> > --- a/Documentation/mm/page_migration.rst
> > +++ b/Documentation/mm/page_migration.rst
> > @@ -69,8 +69,8 @@ In kernel use of migrate_pages()
> >  
> >     Lists of pages to be migrated are generated by scanning over
> >     pages and moving them into lists. This is done by
> > -   calling isolate_lru_page().
> > -   Calling isolate_lru_page() increases the references to the page
> > +   calling folio_isolate_lru().
> > +   Calling folio_isolate_lru() increases the references to the page
> >     so that it cannot vanish while the page migration occurs.
> >     It also prevents the swapper or other scans from encountering
> >     the page.
> > @@ -89,7 +89,7 @@ How migrate_pages() works
> >  
> >  migrate_pages() does several passes over its list of pages. A page is moved
> >  if all references to a page are removable at the time. The page has
> > -already been removed from the LRU via isolate_lru_page() and the refcount
> > +already been removed from the LRU via folio_isolate_lru() and the refcount
> >  is increased so that the page cannot be freed while page migration occurs.
> >  
> >  Steps:
> > -- 
> > 2.18.0
> 

-- 
Sincerely yours,
Mike.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] mm/doc: Replace isolate_lru_page with folio_isolate_lru
  2023-02-09 13:10   ` Mike Rapoport
@ 2023-02-09 13:58     ` Matthew Wilcox
  2023-02-09 14:31       ` Mike Rapoport
  0 siblings, 1 reply; 5+ messages in thread
From: Matthew Wilcox @ 2023-02-09 13:58 UTC (permalink / raw)
  To: Mike Rapoport
  Cc: Jonathan Corbet, Kuan-Ying Lee, Matthias Brugger, chinwen.chang,
	andrew.yang, linux-doc, linux-kernel, linux-arm-kernel,
	linux-mediatek, linux-mm

On Thu, Feb 09, 2023 at 03:10:07PM +0200, Mike Rapoport wrote:
> On Thu, Feb 02, 2023 at 11:02:11AM -0700, Jonathan Corbet wrote:
> > Kuan-Ying Lee <Kuan-Ying.Lee@mediatek.com> writes:
> > 
> > > Since we introduce folio, replace isolate_lru_page() with
> > > folio_isolate_lru().
> > >
> > > Signed-off-by: Kuan-Ying Lee <Kuan-Ying.Lee@mediatek.com>
> > > ---
> > >  Documentation/mm/page_migration.rst | 6 +++---
> > >  1 file changed, 3 insertions(+), 3 deletions(-)
> > 
> > This seems like a good patch to copy to linux-mm - done now.
> > 
> > The patch perhaps is a closer match to what's in linux-next, but it
> > seems that, if we're going to update this document, we should reflect
> > the use folios throughout?
> 
> Most of the current users of migrate_pages() still use isolate_lru_page()
> so I think that updating page_migration.rst to folios is premature.
> But when we do the update it also should include the translations.

It's a slim majority -- 9 of isolate_lru_pages() and 7 of
folio_isolate_lru().  I don't think that changing the documentation is
premature; we should document the functions we want people to use.
I'd be surprised if isolate_lru_pages() still existed in six months.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] mm/doc: Replace isolate_lru_page with folio_isolate_lru
  2023-02-09 13:58     ` Matthew Wilcox
@ 2023-02-09 14:31       ` Mike Rapoport
  0 siblings, 0 replies; 5+ messages in thread
From: Mike Rapoport @ 2023-02-09 14:31 UTC (permalink / raw)
  To: Matthew Wilcox
  Cc: Jonathan Corbet, Kuan-Ying Lee, Matthias Brugger, chinwen.chang,
	andrew.yang, linux-doc, linux-kernel, linux-arm-kernel,
	linux-mediatek, linux-mm

On Thu, Feb 09, 2023 at 01:58:09PM +0000, Matthew Wilcox wrote:
> On Thu, Feb 09, 2023 at 03:10:07PM +0200, Mike Rapoport wrote:
> > On Thu, Feb 02, 2023 at 11:02:11AM -0700, Jonathan Corbet wrote:
> > > Kuan-Ying Lee <Kuan-Ying.Lee@mediatek.com> writes:
> > > 
> > > > Since we introduce folio, replace isolate_lru_page() with
> > > > folio_isolate_lru().
> > > >
> > > > Signed-off-by: Kuan-Ying Lee <Kuan-Ying.Lee@mediatek.com>
> > > > ---
> > > >  Documentation/mm/page_migration.rst | 6 +++---
> > > >  1 file changed, 3 insertions(+), 3 deletions(-)
> > > 
> > > This seems like a good patch to copy to linux-mm - done now.
> > > 
> > > The patch perhaps is a closer match to what's in linux-next, but it
> > > seems that, if we're going to update this document, we should reflect
> > > the use folios throughout?
> > 
> > Most of the current users of migrate_pages() still use isolate_lru_page()
> > so I think that updating page_migration.rst to folios is premature.
> > But when we do the update it also should include the translations.
> 
> It's a slim majority -- 9 of isolate_lru_pages() and 7 of
> folio_isolate_lru().  I don't think that changing the documentation is
> premature; we should document the functions we want people to use.
> I'd be surprised if isolate_lru_pages() still existed in six months.

That's a bit of a problem when documentation describes how things are done
rather than how to do them, but I don't have a strong feeling about
updating the docs while we are still in the transition period or postponing
it until e.g. isolate_lru_page() is gone.

But in any case, this should be much more comprehensive update rather than
replacing two occurrences out of three in a single file.

-- 
Sincerely yours,
Mike.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2023-02-09 14:32 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-31  6:28 [PATCH] mm/doc: Replace isolate_lru_page with folio_isolate_lru Kuan-Ying Lee
2023-02-02 18:02 ` Jonathan Corbet
2023-02-09 13:10   ` Mike Rapoport
2023-02-09 13:58     ` Matthew Wilcox
2023-02-09 14:31       ` Mike Rapoport

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).