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=-3.0 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_PASS, URIBL_BLOCKED,USER_AGENT_NEOMUTT autolearn=ham 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 C8BE0C43381 for ; Fri, 1 Mar 2019 12:30:44 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 9610A20850 for ; Fri, 1 Mar 2019 12:30:44 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="tmb5846L"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=shutemov-name.20150623.gappssmtp.com header.i=@shutemov-name.20150623.gappssmtp.com header.b="LZiJgMy4" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9610A20850 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=shutemov.name Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=x2ToFs6IF1AeTM0mCqXplk8y2DzS+pzKK/vmg2+SkdI=; b=tmb5846LgR98Ku R2BGW18ZpRDQJyQ9lpabWplkaUA8eoxVlRENUG8xx3/Pv/e3yvkyWhMYKtyorm0KHxYdcymzFrApQ IRHuPCXbPcGAyYsjdj/xIY69D47Yu+6jzvaSBzMg8o6aBNhqeQSF646z2QBKQMJ/W+UM6o9eqMLE0 97aRdMAydUTdwgqrGL6UATdspyCunaGUN75fv0okreqFNS5ONlWZqFobvJW6mYVNhACO5FTKrDoJK Fhxb/Ka4+dk2Xw9JwXf351FGciUrzw6Mww3AwoaeGk2zIHvlRe7BDAIsnuIpa4DpArNooOAM9Jh3a /lO7hN4yJq1afMUsbp2g==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gzhJH-0002lT-UH; Fri, 01 Mar 2019 12:30:39 +0000 Received: from mail-pl1-x644.google.com ([2607:f8b0:4864:20::644]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gzhJF-0002kS-0b for linux-arm-kernel@lists.infradead.org; Fri, 01 Mar 2019 12:30:38 +0000 Received: by mail-pl1-x644.google.com with SMTP id m10so11424673plt.10 for ; Fri, 01 Mar 2019 04:30:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=shutemov-name.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=GwN29NY+nAlefSDnECPz319uLNHU3cPMNiJ5hS0ECbw=; b=LZiJgMy44t947Rdt3vyKczwDk0n+rpmTMgsgz6v3p24vpWEGB2pZKPqmCOGZSz9Ste TpE/+XRwj+R8GJj9HNsRGh9aCTAlliu4V3Esj8kgs9fSnR7dVExFnKuu2guEQvQMjRRu STq3OlxsJEazLRzI47N8PXPu8aq5IPILTLh7SC326Xzwby8SW4kdAE3qbZ+Un3TDcf7c l05wRG6Nju9RxIzUQK3JQq+eMrYX5ZiH+RY8AR9GG3dJ3zEh4bvYIUSX3Q8hdmur9tKs x9hVnxmZbKOtKIquWxPFS+gx/KAw+R6pfeXqsO/iuImeNSMTl1a+tMOOMzqk2HsCjj3w 0PAA== 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=GwN29NY+nAlefSDnECPz319uLNHU3cPMNiJ5hS0ECbw=; b=PAWHE86FXMNII4493ZrkSa/Miar8LEC3VNrHbfmn6JvghHNOryFBNraQpyJjVlaO4M O6S+HJ4AvxLSH1YyxEyCvc/Um/6nThT9PxbR68JOiwB5GF92MKm8Dn5lSMhfKsE7C1BF oNfe0hvKDp0rEIxfoeDokl33Bo+c3q/JMKnA3sPNoA8UZedIDWR4vxmgN63TtRYxCoUT TAbihnhKzN4AEXaIMAxbIUIQsn7Q2KzPY948xOw391fr/uR1B8iplKkmyl5U6crcZWJ/ Y+jnNoC0VSp+s3LasR3FTkhwJwyGcGVhRlD8V8g5ous2bF8+g0vypLtEYrnbqDav9VJM XjaQ== X-Gm-Message-State: APjAAAWFba+EeQfTce2ejWQRP+CCa0jzrCUWmyScviwfO7eEOz1qYKD0 zkjq0/X8Zf6jitykvEC1uoOI/Q== X-Google-Smtp-Source: APXvYqy6pV25UnwnnU3xX2RrPJ4FcMnfFJ+8Gwik7AdJVp2ntt5m6dL3usGlH10SREOL7aMKG/qKtg== X-Received: by 2002:a17:902:b20c:: with SMTP id t12mr5219887plr.340.1551443436539; Fri, 01 Mar 2019 04:30:36 -0800 (PST) Received: from kshutemo-mobl1.localdomain ([134.134.139.83]) by smtp.gmail.com with ESMTPSA id z189sm9589765pfb.146.2019.03.01.04.30.35 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 01 Mar 2019 04:30:36 -0800 (PST) Received: by kshutemo-mobl1.localdomain (Postfix, from userid 1000) id 3544C3007CA; Fri, 1 Mar 2019 15:30:32 +0300 (+03) Date: Fri, 1 Mar 2019 15:30:32 +0300 From: "Kirill A. Shutemov" To: Mike Rapoport Subject: Re: [PATCH v2 03/13] mm: Add generic p?d_large() macros Message-ID: <20190301123031.rw3dswcoaa2x7haq@kshutemo-mobl1> References: <20190221113502.54153-1-steven.price@arm.com> <20190221113502.54153-4-steven.price@arm.com> <20190221142812.oa53lfnnfmsuh6ys@kshutemo-mobl1> <20190221145706.zqwfdoyiirn3lc7y@kshutemo-mobl1> <20190221210618.voyfs5cnafpvgedh@kshutemo-mobl1> <20190301115300.GE5156@rapoport-lnx> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20190301115300.GE5156@rapoport-lnx> User-Agent: NeoMutt/20180716 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190301_043037_061321_FDE9F344 X-CRM114-Status: GOOD ( 20.21 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , x86@kernel.org, Arnd Bergmann , Ard Biesheuvel , Peter Zijlstra , Catalin Marinas , Dave Hansen , Will Deacon , linux-kernel@vger.kernel.org, Steven Price , linux-mm@kvack.org, =?utf-8?B?SsOpcsO0bWU=?= Glisse , Ingo Molnar , Borislav Petkov , Andy Lutomirski , "H. Peter Anvin" , James Morse , Thomas Gleixner , linux-arm-kernel@lists.infradead.org, "Liang, Kan" Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Fri, Mar 01, 2019 at 01:53:01PM +0200, Mike Rapoport wrote: > Him Kirill, > > On Fri, Feb 22, 2019 at 12:06:18AM +0300, Kirill A. Shutemov wrote: > > On Thu, Feb 21, 2019 at 05:16:46PM +0000, Steven Price wrote: > > > >> Note that in terms of the new page walking code, these new defines are > > > >> only used when walking a page table without a VMA (which isn't currently > > > >> done), so architectures which don't use p?d_large currently will work > > > >> fine with the generic versions. They only need to provide meaningful > > > >> definitions when switching to use the walk-without-a-VMA functionality. > > > > > > > > How other architectures would know that they need to provide the helpers > > > > to get walk-without-a-VMA functionality? This looks very fragile to me. > > > > > > Yes, you've got a good point there. This would apply to the p?d_large > > > macros as well - any arch which (inadvertently) uses the generic version > > > is likely to be fragile/broken. > > > > > > I think probably the best option here is to scrap the generic versions > > > altogether and simply introduce a ARCH_HAS_PXD_LARGE config option which > > > would enable the new functionality to those arches that opt-in. Do you > > > think this would be less fragile? > > > > These helpers are useful beyond pagewalker. > > > > Can we actually do some grinding and make *all* archs to provide correct > > helpers? Yes, it's tedious, but not that bad. > > Many architectures simply cannot support non-leaf entries at the higher > levels. I think letting the use a generic helper actually does make sense. I disagree. It's makes sense if the level doesn't exists on the arch. But if the level exists, it will be less frugile to ask the arch to provide the helper. Even if it is dummy always-false. -- Kirill A. Shutemov _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel