Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp4492954ybp; Mon, 7 Oct 2019 09:14:20 -0700 (PDT) X-Google-Smtp-Source: APXvYqz6LhlnChnePpjPCWaAVwhq3+bW1LHeVwAUJfdef4w3P1pN0wEZR1hTjIkaPPSlUNUXi9MQ X-Received: by 2002:a17:906:4d58:: with SMTP id b24mr24967802ejv.263.1570464860659; Mon, 07 Oct 2019 09:14:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570464860; cv=none; d=google.com; s=arc-20160816; b=fQ1uio3pHE3IMYdheEmK39EyJ3z6KKfCxYUhngWYEEJFLYbYHkM7VK/ncroXtm1SMu G2INWv+Js32f0gMGnoQ7pjLOlAyHfu4zcBUQytxjYe5QBkV4iGf/L28DbMwHmtPuDVgJ 0z0KRNub1AB2n5NFFybJsGBuF3Odin4wD0pUvOy/hJ6MPXgFP8hhJXEKo3bUkMktZPtw zKD8LZHo0SmyZnbAkwlMTOpP2v//ybkHSwD8QkQCCKwGWex8XKWVFLTnee5+QPDft0ol CjdK6/lDZE8jtiTPUyrWbusWrDT/KkX92OOxWvW1cVURe0LoH65Oivoa4ARyHbboYt0I 8LRA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=ukciw0hdK3K4XMNiPAWm/fQxAF5nCtm7qVJXBq6lLa8=; b=ut4P1beYKc4mXwsi+IKtTFhAyo/DnzJZK+7V8TYuYYMt8MzSy4aPnF7SQjTEN8qvy0 KKzHSmRrm/WPiAXj7RcS5JZS90hdU5T+IYhWfBXsg5UJrKUjD8m2rTTLcerjp3bRH9Kp Sn8nmInXtpISpSiR1qhO+rQ1h68dzH/eLNAf6ThxHdAV9nYAXU+4c1M+1jgEtAa2NBkY gckA49fD/DTiOY/kQUuUr4l4TBW7rovBocuizCKG/r4r1oNDr5ujf6L0hXhnZm4Mc/aP M8iOMQWAf2KVU6qREiailSRGBrywfZa1QwxtvGRCSg6Ae1xykGkmZZJh0EnmOcSIgkeq 4gYQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ziepe.ca header.s=google header.b=MXPbONKY; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j6si8113266ejj.37.2019.10.07.09.13.56; Mon, 07 Oct 2019 09:14:20 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@ziepe.ca header.s=google header.b=MXPbONKY; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728865AbfJGQKx (ORCPT + 99 others); Mon, 7 Oct 2019 12:10:53 -0400 Received: from mail-qt1-f194.google.com ([209.85.160.194]:37122 "EHLO mail-qt1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727801AbfJGQKx (ORCPT ); Mon, 7 Oct 2019 12:10:53 -0400 Received: by mail-qt1-f194.google.com with SMTP id e15so5090870qtr.4 for ; Mon, 07 Oct 2019 09:10:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ziepe.ca; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=ukciw0hdK3K4XMNiPAWm/fQxAF5nCtm7qVJXBq6lLa8=; b=MXPbONKY6jnTaS7ac+01oeoHwclD3WoKLLJfhGNS6cGNYTaYU6LYmJ59DCtAuHDQlB 3P3pe07vx6M4s8kx3bzHBZcX7CpbtOBrElbQtbxicb36GXu2HWWz4VDxhQEQ9nfQN2oP ZVxeXRcnwBYg1dpZTyqsp938PupqYsEwW9WProq8d+ciajqd+hVLMRdi5Q1s+X5/ETmA mhKxJOvdeXUkWjxVyaaACq7j+ye99Z2qPGXeJA1TJT1Sj0yFVKncVDLj6ywNLlvlkU5/ OtflbGX+4jDi8efoXKszldER9N+ZRLoLD7//ooFC+fJ6C4zbbuWX50M2nvkCeBtufULl OyZA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=ukciw0hdK3K4XMNiPAWm/fQxAF5nCtm7qVJXBq6lLa8=; b=FJPOJjqV2Dfx9QAzk9i4Otq8ncyQbbm0O02jwO8ofg+g0yB78UX5y/p9bd7fuGT1cR t2bC4lNfiMJAFUk3SV0i+j+7TzDUmiZsJdextVwB27s6gG+EwEx1Fqf9eqR/OEPrn+8v 8Z9aY8KhwtlTOG40fe8Z/WufZGMVn0yWzJN5m1Tl0sPwo7xlYnoaiunYHKduk09iu44U NrZ+tDxYlmkDlc/QWAqbR00NkyFmQLQRzRkBeYvm2G9l/OUqi3GcCzNjKfg/l+9n5I9E hO2vxSRvASIowSBod+OgBGzkfrWZ593aVehKwy1CHZqDOwXkQSL3Qam6tzsJ+Gev5GZI YNaQ== X-Gm-Message-State: APjAAAWzxNQPVhkU1N+kxRZC+5+dPcTo0IKao37hrqUe3eeWCPrCwBsh OsOdRxLCBT3NFZJi23Civ+oMmw== X-Received: by 2002:ac8:1302:: with SMTP id e2mr30156919qtj.326.1570464650651; Mon, 07 Oct 2019 09:10:50 -0700 (PDT) Received: from ziepe.ca (hlfxns017vw-142-162-113-180.dhcp-dynamic.fibreop.ns.bellaliant.net. [142.162.113.180]) by smtp.gmail.com with ESMTPSA id q5sm10273119qte.38.2019.10.07.09.10.49 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 07 Oct 2019 09:10:49 -0700 (PDT) Received: from jgg by mlx.ziepe.ca with local (Exim 4.90_1) (envelope-from ) id 1iHVaz-0006jz-5t; Mon, 07 Oct 2019 13:10:49 -0300 Date: Mon, 7 Oct 2019 13:10:49 -0300 From: Jason Gunthorpe To: Steven Price Cc: linux-mm@kvack.org, Andy Lutomirski , Ard Biesheuvel , Arnd Bergmann , Borislav Petkov , Catalin Marinas , Dave Hansen , Ingo Molnar , James Morse , =?utf-8?B?SsOpcsO0bWU=?= Glisse , Peter Zijlstra , Thomas Gleixner , Will Deacon , x86@kernel.org, "H. Peter Anvin" , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Mark Rutland , "Liang, Kan" , Andrew Morton Subject: Re: [PATCH v11 14/22] mm: pagewalk: Add 'depth' parameter to pte_hole Message-ID: <20191007161049.GA13229@ziepe.ca> References: <20191007153822.16518-1-steven.price@arm.com> <20191007153822.16518-15-steven.price@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191007153822.16518-15-steven.price@arm.com> User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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