Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp902921imw; Mon, 4 Jul 2022 23:38:05 -0700 (PDT) X-Google-Smtp-Source: AGRyM1uAdIgCawv8aItGjF0HQUePUbIVouLxx28IoOntrpxrxL437jAb2bj9F0RBxfv7Jo0dC4Qt X-Received: by 2002:a17:902:c401:b0:16a:1873:5ca3 with SMTP id k1-20020a170902c40100b0016a18735ca3mr40114257plk.157.1657003084809; Mon, 04 Jul 2022 23:38:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657003084; cv=none; d=google.com; s=arc-20160816; b=AUU14gJ5jvkNWvd119FPLj0crg/su5TbMl9RE2v2Y6xIBPQioqL6vyXJb8MLRMBRNx vhTaB5bJGEt9AsznWC3sRU3ZU+0RECXylZv9J5dvKSYAcj1cEqnwdp/qoPmwZc7n6udn 7UE8THrsqmGAVT3vAc0IDzcXmOR5kcY5ulfE5AKGv5Xi+fh1RewwDihlhN650Bx7MPib p6Ln91yhIBO6m0ZW3r6EYt0h8oqZf1ygDaIvZ6uCU+95xJ7mL3dqbObN/OtAeUkliQbA S/YyhOnqoaVkYpLMBOyNnLzUMQD9ER3n2TafsGHcPTEpV+KU5XUlCRTmUX+5PMYxWFtO cIsw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=EDd3dIuYAm+vcpzVuGRdwgeslL7GcNgNx9C3IVFW1g8=; b=WP1Rs5Gq1yQh46WFjcPaI7g9gqSlKLgtKrxWCHBW6KZmzDQOoEjScnW7fGcT9WQuzH 6KkvI5QrjWXDXQg7PJx5vBo2rllojQAmlTu4ai6xndfhgzuV/kp7Ek3eUlaGTk2XM2nu mYZ2GVetM89aCG3pGDmh2wYeQyw+pi26O0ReOecfsROxK0zVtl048YRB7vMVExH9/SoQ JvZj+Abi3af+bxyJuhML9p6UlXCCr4JjaWehoj4HecyzcfRLORSOKK4jKbHAEYHWOSx4 U8ysS7Xt8ioU2ca0juQyW7KX90Mvkzn2IAYkKwH9Kv7pviZ3juEsdIwLPJomGmpQmYKB 6zZw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=a6923plI; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 82-20020a630055000000b003f74cb24826si17544606pga.11.2022.07.04.23.37.50; Mon, 04 Jul 2022 23:38:04 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=a6923plI; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229615AbiGEGWL (ORCPT + 99 others); Tue, 5 Jul 2022 02:22:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40582 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229448AbiGEGWJ (ORCPT ); Tue, 5 Jul 2022 02:22:09 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0EB52BCA5; Mon, 4 Jul 2022 23:22:09 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 9FAAD61426; Tue, 5 Jul 2022 06:22:08 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0E04EC341D7; Tue, 5 Jul 2022 06:22:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1657002128; bh=Zaf7DjhcD3ZxfJHUz1tOGgDGa4JYJfrWSDwsbtdTNwI=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=a6923plIqslsbqyEgJGkAr8COlwhQHlzqDOMUImf0zNEq9HfBY7kyJ31P00pKVrG7 y7sOCX7KFkZaKbXr1TBsB4bdPWDPbdUss/s+YWLl5peIIfTQnNr2M9MJNM8bwnRZW4 pBP1mWfqbYSTfbLQr0IfiTFeIF0vLC+jWt2IFvckuj94X5lLXreY0OPKMdqj4JP0Ql smnsWL54j9bAu/0Q6bfOaMqEB5kKVAhMB4U0bMIbAk2LT3svlb0Axbi55/JXgywmOj gLpT9G8YpXf0KUjDyEO/m/I2r9HiqXWMGXjvdGjetJDbeHeFEekkqecyZHbQLOGFi+ XCBAa5kvP21lg== Received: by mail-vs1-f54.google.com with SMTP id h184so8559vsc.3; Mon, 04 Jul 2022 23:22:08 -0700 (PDT) X-Gm-Message-State: AJIora8X3yQoioVtRiEwhFu6BMNxFuI66FFq4PuuPsdJy+YonYSJ3S7w 3MJnwATXj1IvnxZrPwXOwTEwgenwzm+1qlsaZjM= X-Received: by 2002:a67:6fc3:0:b0:356:18:32ba with SMTP id k186-20020a676fc3000000b00356001832bamr18421067vsc.43.1657002126922; Mon, 04 Jul 2022 23:22:06 -0700 (PDT) MIME-Version: 1.0 References: <20220704112526.2492342-1-chenhuacai@loongson.cn> <20220704112526.2492342-5-chenhuacai@loongson.cn> In-Reply-To: From: Huacai Chen Date: Tue, 5 Jul 2022 14:21:56 +0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH V4 4/4] LoongArch: Enable ARCH_WANT_HUGETLB_PAGE_OPTIMIZE_VMEMMAP To: Arnd Bergmann Cc: Huacai Chen , Thomas Bogendoerfer , Dave Hansen , Andy Lutomirski , Peter Zijlstra , Catalin Marinas , Will Deacon , loongarch@lists.linux.dev, linux-arch , Xuefeng Li , Guo Ren , Xuerui Wang , Jiaxun Yang , Andrew Morton , Linux-MM , "open list:BROADCOM NVRAM DRIVER" , Linux Kernel Mailing List , Linux ARM , Feiyang Chen , Muchun Song Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-7.8 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, Arnd, On Mon, Jul 4, 2022 at 8:18 PM Arnd Bergmann wrote: > > On Mon, Jul 4, 2022 at 1:25 PM Huacai Chen wrote: > > To avoid the following build error on LoongArch we should include linux/ > > static_key.h in page-flags.h. > > > > In file included from ./include/linux/mmzone.h:22, > > from ./include/linux/gfp.h:6, > > from ./include/linux/mm.h:7, > > from arch/loongarch/kernel/asm-offsets.c:9: > > ./include/linux/page-flags.h:208:1: warning: data definition has no > > type or storage class > > 208 | DECLARE_STATIC_KEY_MAYBE(CONFIG_HUGETLB_PAGE_OPTIMIZE_VMEMMAP_DEFAULT_ON, > > | ^~~~~~~~~~~~~~~~~~~~~~~~ > > ./include/linux/page-flags.h:208:1: error: type defaults to 'int' in > > declaration of 'DECLARE_STATIC_KEY_MAYBE' [-Werror=implicit-int] > > ./include/linux/page-flags.h:209:26: warning: parameter names (without > > types) in function declaration > > I wonder if page_fixed_fake_head() should be moved out of line to avoid > this, it's already nontrivial here, and that would avoid the static key > in a central header. I have some consideration here. I think both inline function and static key are instruments to make things faster, in other words, page_fixed_fake_head() is a performance critical function. If so, it is not suitable to move it out of line. Huacai > > Arnd >