[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAM9Jb+g2B+uXH+Vj_FSMAh18j3DAKn4zKyAZNB_t8hSQ90a=mg@mail.gmail.com>
Date: Thu, 10 Dec 2020 07:36:56 +0100
From: Pankaj Gupta <pankaj.gupta.linux@...il.com>
To: Pavel Tatashin <pasha.tatashin@...een.com>
Cc: LKML <linux-kernel@...r.kernel.org>, Linux MM <linux-mm@...ck.org>,
Andrew Morton <akpm@...ux-foundation.org>,
Vlastimil Babka <vbabka@...e.cz>,
Michal Hocko <mhocko@...e.com>,
David Hildenbrand <david@...hat.com>,
Oscar Salvador <osalvador@...e.de>,
Dan Williams <dan.j.williams@...el.com>, sashal@...nel.org,
tyhicks@...ux.microsoft.com, Joonsoo Kim <iamjoonsoo.kim@....com>,
mike.kravetz@...cle.com, rostedt@...dmis.org,
Ingo Molnar <mingo@...hat.com>,
"Dave Jiang <dave.jiang@...el.com>, Jason Gunthorpe <jgg@...pe.ca>,
Aneesh Kumar K.V <aneesh.kumar@...ux.ibm.com>, Johannes Thumshirn
<jthumshirn@...e.de>, Logan Gunthorpe" <jgg@...pe.ca>,
Peter Zijlstra <peterz@...radead.org>,
Mel Gorman <mgorman@...e.de>,
Matthew Wilcox <willy@...radead.org>,
David Rientjes <rientjes@...gle.com>,
John Hubbard <jhubbard@...dia.com>, linux-doc@...r.kernel.org
Subject: Re: [PATCH v2 1/8] mm/gup: perform check_dax_vmas only when FS_DAX is enabled
> There is no need to check_dax_vmas() and run through the npage loop of
> pinned pages if FS_DAX is not enabled.
>
> Add a stub check_dax_vmas() function for no-FS_DAX case.
>
> Signed-off-by: Pavel Tatashin <pasha.tatashin@...een.com>
> Reviewed-by: John Hubbard <jhubbard@...dia.com>
> ---
> mm/gup.c | 7 +++++++
> 1 file changed, 7 insertions(+)
>
> diff --git a/mm/gup.c b/mm/gup.c
> index 98eb8e6d2609..cdb8b9eeb016 100644
> --- a/mm/gup.c
> +++ b/mm/gup.c
> @@ -1568,6 +1568,7 @@ struct page *get_dump_page(unsigned long addr)
> #endif /* CONFIG_ELF_CORE */
>
> #if defined(CONFIG_FS_DAX) || defined (CONFIG_CMA)
> +#ifdef CONFIG_FS_DAX
> static bool check_dax_vmas(struct vm_area_struct **vmas, long nr_pages)
> {
> long i;
> @@ -1586,6 +1587,12 @@ static bool check_dax_vmas(struct vm_area_struct **vmas, long nr_pages)
> }
> return false;
> }
> +#else
> +static bool check_dax_vmas(struct vm_area_struct **vmas, long nr_pages)
> +{
> + return false;
> +}
> +#endif
>
> #ifdef CONFIG_CMA
> static long check_and_migrate_cma_pages(struct mm_struct *mm,
Reviewed-by: Pankaj Gupta <pankaj.gupta@...ud.ionos.com>
Powered by blists - more mailing lists