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.6 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS 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 28282C433E5 for ; Fri, 21 Aug 2020 10:39:48 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id E2A0E20738 for ; Fri, 21 Aug 2020 10:39:47 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="ZfZ2d783" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E2A0E20738 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 921AB8D003B; Fri, 21 Aug 2020 06:39:47 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 8D62E8D0008; Fri, 21 Aug 2020 06:39:47 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 7BFDF8D003B; Fri, 21 Aug 2020 06:39:47 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0076.hostedemail.com [216.40.44.76]) by kanga.kvack.org (Postfix) with ESMTP id 6171D8D0008 for ; Fri, 21 Aug 2020 06:39:47 -0400 (EDT) Received: from smtpin07.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 2F32D8245571 for ; Fri, 21 Aug 2020 10:39:47 +0000 (UTC) X-FDA: 77174230014.07.unit58_121606e27038 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin07.hostedemail.com (Postfix) with ESMTP id EAACD1803F9AC for ; Fri, 21 Aug 2020 10:39:46 +0000 (UTC) X-HE-Tag: unit58_121606e27038 X-Filterd-Recvd-Size: 4304 Received: from mail-pj1-f68.google.com (mail-pj1-f68.google.com [209.85.216.68]) by imf46.hostedemail.com (Postfix) with ESMTP for ; Fri, 21 Aug 2020 10:39:46 +0000 (UTC) Received: by mail-pj1-f68.google.com with SMTP id j13so645016pjd.4 for ; Fri, 21 Aug 2020 03:39:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:subject:to:cc:references:in-reply-to:mime-version :message-id:content-transfer-encoding; bh=Skacs7EXPHqa2+iszJrJANOJ0qE5l/8OmxgUeJzvuFY=; b=ZfZ2d783cAo/vy9wrAfQVsV1+q70NFpvLIJ3BoYZINr9O786s+tQmwNqHeMpm5O7zn OeHng3P+2eSSdKHvQGdxM7DrC0azCxER5jh3PrvGpqN7Y23q1rOPKa4kl+cS+exGEQ+Z rneOhz224LM3Js++bPwmJxjiWKyl/+mUR0QxcWkYT53uwjOJQPi76kdkmmmfql4q2yMY 5YUESktvVqAOCKRFnyPxqZGjYlLBfiOpHGto3CNlAoCjHAG/xfT8PjUzoNr4Ksmu9UB0 xGlraVIm+bqntt9AYH09O9yJ7x/D67O5a06kMj6rouCJlv6ZT6YIlINaq/EDTR8J0FN5 /kLA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:subject:to:cc:references:in-reply-to :mime-version:message-id:content-transfer-encoding; bh=Skacs7EXPHqa2+iszJrJANOJ0qE5l/8OmxgUeJzvuFY=; b=khYZNF7aPpki3Kh5bAwz0CxflNsqqMzWydWvl++MvjSdoWouij8BEHCeyVIplCOZlT 4/waGWLMMe+sla5NBTrTyvwxHdjNYc79U2QaZGIxjDcwnZh14FzNAWdmXz5lET2XVNth LpVi8RX+zjdTtJzDNBv4ZS3npNSp4FZoyxJH1PCO6E2Q2X2qSwnRsnPcM0pwRZOiyCrW XK3B0PCe0y+zbgtOEarLKsQrwSh+N4+Ulp+L8OW80ROjy/JHDyVbXmOrhGi+7xKaiX2L QvNqhz224Yn3NOkukuRQG7E8zM+xMZhpPfqFaL1owYB9OuWr59BA2IJ2SuQBA8Scug5p Wpow== X-Gm-Message-State: AOAM530o4B1HGGuQGdeaf6bL2+JYmREobrLbYJw5e+SFcMvmoPMi+Zij AubfBMD5UGD7EhJQ78lOmFM= X-Google-Smtp-Source: ABdhPJzIJef66nd1vfnY7XWT91zvftzIW9FTEQh30rfVNzjQ0tbfwAFB3N+KRw14E+4Hqn6/KGT2Yw== X-Received: by 2002:a17:90a:fa92:: with SMTP id cu18mr1837292pjb.215.1598006385206; Fri, 21 Aug 2020 03:39:45 -0700 (PDT) Received: from localhost (61-68-212-105.tpgi.com.au. [61.68.212.105]) by smtp.gmail.com with ESMTPSA id 193sm2120352pfu.169.2020.08.21.03.39.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 21 Aug 2020 03:39:44 -0700 (PDT) Date: Fri, 21 Aug 2020 20:39:39 +1000 From: Nicholas Piggin Subject: Re: [PATCH v5 5/8] mm: HUGE_VMAP arch support cleanup To: Andrew Morton , Christophe Leroy , linux-mm@kvack.org Cc: Jonathan Cameron , linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, Zefan Li References: <20200821044427.736424-1-npiggin@gmail.com> <20200821044427.736424-6-npiggin@gmail.com> <9b67b892-9482-15dc-0c1e-c5d5a93a3c91@csgroup.eu> In-Reply-To: <9b67b892-9482-15dc-0c1e-c5d5a93a3c91@csgroup.eu> MIME-Version: 1.0 Message-Id: <1598006254.vcbwyiiw9l.astroid@bobo.none> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Rspamd-Queue-Id: EAACD1803F9AC X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam05 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: Excerpts from Christophe Leroy's message of August 21, 2020 3:40 pm: >=20 >=20 > Le 21/08/2020 =C3=A0 06:44, Nicholas Piggin a =C3=A9crit=C2=A0: >> This changes the awkward approach where architectures provide init >> functions to determine which levels they can provide large mappings for, >> to one where the arch is queried for each call. >>=20 >> This removes code and indirection, and allows constant-folding of dead >> code for unsupported levels. >=20 > I think that in order to allow constant-folding of dead code for=20 > unsupported levels, you must define arch_vmap_xxx_supported() as static=20 > inline in a .h >=20 > If you have them in .c files, you'll get calls to tiny functions that=20 > will always return false, but will still be called and dead code won't=20 > be eliminated. And performance wise, that's probably not optimal either. Yeah that's true actually, I think I didn't find a good place to add the prototypes in the arch code but I'll have another look and either rewrite the changelog or remove it. Although this does get a step closer at least. Thanks, Nick