From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.3 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4C448CA9EC5 for ; Wed, 30 Oct 2019 16:48:20 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 239432087E for ; Wed, 30 Oct 2019 16:48:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727208AbfJ3QsT (ORCPT ); Wed, 30 Oct 2019 12:48:19 -0400 Received: from foss.arm.com ([217.140.110.172]:38060 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726626AbfJ3QsS (ORCPT ); Wed, 30 Oct 2019 12:48:18 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 2D50E31F; Wed, 30 Oct 2019 09:48:18 -0700 (PDT) Received: from arrakis.emea.arm.com (arrakis.cambridge.arm.com [10.1.197.42]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id B27D93F6C4; Wed, 30 Oct 2019 09:48:15 -0700 (PDT) Date: Wed, 30 Oct 2019 16:48:13 +0000 From: Catalin Marinas To: Steven Price Cc: linux-mm@kvack.org, Andy Lutomirski , Ard Biesheuvel , Arnd Bergmann , Borislav Petkov , Dave Hansen , Ingo Molnar , James Morse , =?iso-8859-1?B?Suly9G1l?= 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 v14 19/22] mm: Add generic ptdump Message-ID: <20191030164812.GD13309@arrakis.emea.arm.com> References: <20191028135910.33253-1-steven.price@arm.com> <20191028135910.33253-20-steven.price@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191028135910.33253-20-steven.price@arm.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Oct 28, 2019 at 01:59:07PM +0000, Steven Price wrote: > +struct ptdump_state { > + void (*note_page)(struct ptdump_state *st, unsigned long addr, > + int level, unsigned long val); > + const struct ptdump_range *range; > +}; It would be nice to have a comment above note_page about what 'level' actually means... [...] > +static int ptdump_hole(unsigned long addr, unsigned long next, > + int depth, struct mm_walk *walk) > +{ > + struct ptdump_state *st = walk->private; > + > + st->note_page(st, addr, depth + 1, 0); ... as it took me a while to figure out why you 'depth + 1' here. But see my other reply on the arm64 patch. Is it possible to align depth and level here to have the same range? -- Catalin