Re: [PATCH 1/2] mm: Add pvmw_set_page()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Feb 4, 2022 at 1:19 AM Matthew Wilcox (Oracle)
<willy@xxxxxxxxxxxxx> wrote:
>
> Instead of setting the page directly in struct page_vma_mapped_walk,
> use this helper to allow us to transition to a PFN approach in the
> next patch.
>
> Signed-off-by: Matthew Wilcox (Oracle) <willy@xxxxxxxxxxxxx>
> ---
>  include/linux/rmap.h    |  6 ++++++
>  kernel/events/uprobes.c |  2 +-
>  mm/damon/paddr.c        |  4 ++--
>  mm/ksm.c                |  2 +-
>  mm/migrate.c            |  2 +-
>  mm/page_idle.c          |  2 +-
>  mm/rmap.c               | 12 ++++++------
>  7 files changed, 18 insertions(+), 12 deletions(-)
>
> diff --git a/include/linux/rmap.h b/include/linux/rmap.h
> index e704b1a4c06c..003bb5775bb1 100644
> --- a/include/linux/rmap.h
> +++ b/include/linux/rmap.h
> @@ -213,6 +213,12 @@ struct page_vma_mapped_walk {
>         unsigned int flags;
>  };
>
> +static inline void pvmw_set_page(struct page_vma_mapped_walk *pvmw,
> +               struct page *page)
> +{
> +       pvmw->page = page;
> +}
> +

Hi Matthew,

How about the name pvmw_set_pfn_from_page()?
When I looked at your next patch, I'm feeling this helper
is used to set up the pfn from a page instead of setting up
the page.

Thanks.




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux