[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20191007161049.GA13229@ziepe.ca>
Date: Mon, 7 Oct 2019 13:10:49 -0300
From: Jason Gunthorpe <jgg@...pe.ca>
To: Steven Price <steven.price@....com>
Cc: linux-mm@...ck.org, Andy Lutomirski <luto@...nel.org>,
Ard Biesheuvel <ard.biesheuvel@...aro.org>,
Arnd Bergmann <arnd@...db.de>, Borislav Petkov <bp@...en8.de>,
Catalin Marinas <catalin.marinas@....com>,
Dave Hansen <dave.hansen@...ux.intel.com>,
Ingo Molnar <mingo@...hat.com>,
James Morse <james.morse@....com>,
Jérôme Glisse <jglisse@...hat.com>,
Peter Zijlstra <peterz@...radead.org>,
Thomas Gleixner <tglx@...utronix.de>,
Will Deacon <will@...nel.org>, x86@...nel.org,
"H. Peter Anvin" <hpa@...or.com>,
linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
Mark Rutland <Mark.Rutland@....com>,
"Liang, Kan" <kan.liang@...ux.intel.com>,
Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: [PATCH v11 14/22] mm: pagewalk: Add 'depth' parameter to pte_hole
On Mon, Oct 07, 2019 at 04:38:14PM +0100, Steven Price wrote:
> diff --git a/mm/hmm.c b/mm/hmm.c
> index 902f5fa6bf93..34fe904dd417 100644
> +++ b/mm/hmm.c
> @@ -376,7 +376,7 @@ static void hmm_range_need_fault(const struct hmm_vma_walk *hmm_vma_walk,
> }
>
> static int hmm_vma_walk_hole(unsigned long addr, unsigned long end,
> - struct mm_walk *walk)
> + __always_unused int depth, struct mm_walk *walk)
It this __always_unused on function arguments something we are doing
now?
Can we have negative depth? Should it be unsigned?
> {
> struct hmm_vma_walk *hmm_vma_walk = walk->private;
> struct hmm_range *range = hmm_vma_walk->range;
> @@ -564,7 +564,7 @@ static int hmm_vma_walk_pmd(pmd_t *pmdp,
> again:
> pmd = READ_ONCE(*pmdp);
> if (pmd_none(pmd))
> - return hmm_vma_walk_hole(start, end, walk);
> + return hmm_vma_walk_hole(start, end, 0, walk);
>
> if (thp_migration_supported() && is_pmd_migration_entry(pmd)) {
> bool fault, write_fault;
> @@ -666,7 +666,7 @@ static int hmm_vma_walk_pud(pud_t *pudp, unsigned long start, unsigned long end,
> again:
> pud = READ_ONCE(*pudp);
> if (pud_none(pud))
> - return hmm_vma_walk_hole(start, end, walk);
> + return hmm_vma_walk_hole(start, end, 0, walk);
>
> if (pud_huge(pud) && pud_devmap(pud)) {
> unsigned long i, npages, pfn;
> @@ -674,7 +674,7 @@ static int hmm_vma_walk_pud(pud_t *pudp, unsigned long start, unsigned long end,
> bool fault, write_fault;
>
> if (!pud_present(pud))
> - return hmm_vma_walk_hole(start, end, walk);
> + return hmm_vma_walk_hole(start, end, 0, walk);
>
> i = (addr - range->start) >> PAGE_SHIFT;
> npages = (end - addr) >> PAGE_SHIFT;
Otherwise this mechanical change to hmm.c looks OK to me
Jason
Powered by blists - more mailing lists