Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp1103432imw; Tue, 5 Jul 2022 03:57:45 -0700 (PDT) X-Google-Smtp-Source: AGRyM1v5t7m4Uq2mfOPoWlNy6MaC/ufVI5CY+fnJQIgDZltfpnzxCtEe2fpEkCgVQjxNG/dHADrg X-Received: by 2002:a17:902:a515:b0:16a:3a9f:5d93 with SMTP id s21-20020a170902a51500b0016a3a9f5d93mr43282335plq.139.1657018665372; Tue, 05 Jul 2022 03:57:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657018665; cv=none; d=google.com; s=arc-20160816; b=mXYNdtKqFECzWK2wBkMPfb6EoGPfgH5thZDOJBAAK/sfhvCVPccls5ZsF3MWkTj7po CdKyqERcF2LIDUv6kiayNIFhh1ywqO9Znd+BB5Exza6cW0V+lrYC+37AwusikyXml83Y ci63y9Gm86lUFEwf16ZZXQvX87a18y6doe0laG3fg7ENQjDNc2W920veNKUrUhgGwRXL BStZ7a0UNxw0+WM79I6F4iAGoZBZ0BILYxv7eegXtTTnkmjc8mFzLoS1HvuHpBdHIWnt MwR6aqA/V1/ErlyvElaAPiWktajnVwXuA3GU4IPH+0xdk4S5fiQEharNfRTzTV5qF7qb UYUA== 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=6ZrVWfoteR5GrzCoHkSriCPMIPEv5ipRG8Y7JTRl1kw=; b=gk+/xjR9ep2UXtYO3SkQSxwDT9dhvER4f4GbqHYKUMXwk/szrxg4aMuSeNzdFvb7eE 0ZuCK5W/aaC05nnoNVYFTosAguIZelk4WSOKgI38dV2p2wTm/pJmPITfhwNSnAcgN4Ll 19vr42lHmHiDAyv+YqpHr9uHeGGcc0s6EhW6OyxztfkogBPB7VK3jj1znKMSN0fHA59v S3/SltZ+6blTC//YW4MW19r4MBVO2Coy5b0iweAHfgX/EUTyBucG4NAam1Mz7yU/Fukw UEO6SFpJeziLLK4ol4LVZ+p7et3OjUDG26ChgsQyEPkxn5FdeVM0RLQEu2Tv8kNZDZ1U PKNQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=Uyp+2Dku; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d24-20020a17090ad3d800b001ef9a4bbf5csi2087821pjw.173.2022.07.05.03.57.33; Tue, 05 Jul 2022 03:57:45 -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=@gmail.com header.s=20210112 header.b=Uyp+2Dku; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231437AbiGEKtd (ORCPT + 99 others); Tue, 5 Jul 2022 06:49:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41346 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231165AbiGEKt1 (ORCPT ); Tue, 5 Jul 2022 06:49:27 -0400 Received: from mail-lf1-x12a.google.com (mail-lf1-x12a.google.com [IPv6:2a00:1450:4864:20::12a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D45F3BC26; Tue, 5 Jul 2022 03:49:25 -0700 (PDT) Received: by mail-lf1-x12a.google.com with SMTP id bu42so15310lfb.0; Tue, 05 Jul 2022 03:49:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=6ZrVWfoteR5GrzCoHkSriCPMIPEv5ipRG8Y7JTRl1kw=; b=Uyp+2DkuYMDKuMOS0vYpIDMbWkzCj7YOT7vGJ8J7ZBJ6xPONJaHE60xQlzZWpd2THc 2i77jcDW+7EvQOIPfIQ3LJ8Lo5CW75e4wPfrSarkRgLvblivvSmnINSgNUSPKLEGH5Xv 0xEzoCRin08WOvm6kmRt0LF4zy7+Y2HVD4jHRw3wwEvBLgtdy874Q9Mkg+bBUSM95NSl QoV+36qe3uBrZ2+fSsH2RxpHjQ1n5JpfmL2FwAWslwP/UNYunOL4rK3tDF0MqPAKCbum +nXvfCIMHOy7k+4s+ugENntMUbQ+3dmO9m5voxelAmsq5scDbga8fIZlFdtTDOdjVjjW xf+g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=6ZrVWfoteR5GrzCoHkSriCPMIPEv5ipRG8Y7JTRl1kw=; b=fjw2jD8ZN/GJtdUEiMLYp4uKkO1vrBi6QrcMm311iZQQ0MBd8rPYRZpvLhMS4mKwDG iifdDh2L4IsnIRtY/xpigOXGY9mF2yu2FoiuIvXCbhsCnDVQ3SO497NVSPws8yiZZQe2 /GDSdz3cIOzP52t9+x+t5DFQw2Ox9cyQ28Gz2V/WWasqkNIWSwV8fpdF/etpHEK4Mtz9 G4ue8nws6V1pS2hsxbZ7FzQzxaWxyT09wMyG+vHGaooIn1uiJWpARaYeGOVSO8/deWax vqPOWFVDmHfEEpdHj/n5rz0UN3vo+ge66dbq0IAlm+2Jlcjle81R8ei9F5zCwHaVzChZ j7jw== X-Gm-Message-State: AJIora8j8sU0cTfgzRsnYxdkiOs3IlgLLzGv8BiBfyTUaBhzjMEbhFvf +Vgt5Buh0qPj/Ak2z2JZHvJ00+lYSyn3QGut2fo= X-Received: by 2002:ac2:59cb:0:b0:483:45c3:8cfc with SMTP id x11-20020ac259cb000000b0048345c38cfcmr2425134lfn.274.1657018164101; Tue, 05 Jul 2022 03:49:24 -0700 (PDT) MIME-Version: 1.0 References: <20220704112526.2492342-1-chenhuacai@loongson.cn> <20220704112526.2492342-5-chenhuacai@loongson.cn> In-Reply-To: From: Feiyang Chen Date: Tue, 5 Jul 2022 18:49:11 +0800 Message-ID: Subject: Re: [PATCH V4 4/4] LoongArch: Enable ARCH_WANT_HUGETLB_PAGE_OPTIMIZE_VMEMMAP To: Arnd Bergmann Cc: Muchun Song , Huacai Chen , 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 Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,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 On Tue, 5 Jul 2022 at 16:45, Arnd Bergmann wrote: > > On Tue, Jul 5, 2022 at 10:38 AM Muchun Song wrote: > > On Tue, Jul 5, 2022 at 4:06 PM Arnd Bergmann wrote: > > > On Tue, Jul 5, 2022 at 9:51 AM Muchun Song wrote: > > > > How about including the static key header in the scope of > > CONFIG_HUGETLB_PAGE_OPTIMIZE_VMEMMAP? > > That helps a little, but it means we still pay for it on x86 and > arm64, which are the > most common architectures. > Hi, Arnd, It seems that arm64 and x86 include static_key.h or jump_label.h in some more basic header files, otherwise they would not compile successfully when they including page-flags.h. In file included from ./arch/arm64/include/asm/lse.h:13, from ./arch/arm64/include/asm/cmpxchg.h:14, from ./arch/arm64/include/asm/atomic.h:16, from ./include/linux/atomic.h:7, from ./include/asm-generic/bitops/atomic.h:5, from ./arch/arm64/include/asm/bitops.h:25, from ./include/linux/bitops.h:33, from ./include/linux/log2.h:12, from kernel/bounds.c:13: ./include/linux/jump_label.h:5:2: error: #error "Hi" 5 | #error "Hi" In file included from ./arch/x86/include/asm/nospec-branch.h:6, from ./arch/x86/include/asm/paravirt_types.h:40, from ./arch/x86/include/asm/ptrace.h:97, from ./arch/x86/include/asm/math_emu.h:5, from ./arch/x86/include/asm/processor.h:13, from ./arch/x86/include/asm/cpufeature.h:5, from ./arch/x86/include/asm/thread_info.h:53, from ./include/linux/thread_info.h:60, from ./arch/x86/include/asm/preempt.h:7, from ./include/linux/preempt.h:78, from ./include/linux/spinlock.h:55, from ./include/linux/mmzone.h:8, from ./include/linux/gfp.h:6, from ./include/linux/slab.h:15, from ./include/linux/crypto.h:20, from arch/x86/kernel/asm-offsets.c:9: ./include/linux/static_key.h:3:2: error: #error "Hi" #error "Hi" ^~~~~ In file included from ./include/linux/tracepoint-defs.h:12, from ./arch/x86/include/asm/msr.h:58, from ./arch/x86/include/asm/processor.h:22, from ./arch/x86/include/asm/cpufeature.h:5, from ./arch/x86/include/asm/thread_info.h:53, from ./include/linux/thread_info.h:60, from ./arch/x86/include/asm/preempt.h:7, from ./include/linux/preempt.h:78, from ./include/linux/spinlock.h:55, from ./include/linux/mmzone.h:8, from ./include/linux/gfp.h:6, from ./include/linux/slab.h:15, from ./include/linux/crypto.h:20, from arch/x86/kernel/asm-offsets.c:9: ./include/linux/static_key.h:3:2: error: #error "Hi" #error "Hi" ^~~~~ In file included from ./include/linux/kasan-enabled.h:5, from ./include/linux/kasan.h:6, from ./include/linux/slab.h:140, from ./include/linux/crypto.h:20, from arch/x86/kernel/asm-offsets.c:9: ./include/linux/static_key.h:3:2: error: #error "Hi" #error "Hi" ^~~~~ In file included from ./include/linux/kasan.h:8, from ./include/linux/slab.h:140, from ./include/linux/crypto.h:20, from arch/x86/kernel/asm-offsets.c:9: ./include/linux/static_key.h:3:2: error: #error "Hi" #error "Hi" ^~~~~ In file included from ./include/linux/context_tracking_state.h:6, from ./include/linux/hardirq.h:5, from arch/x86/kernel/asm-offsets.c:12: ./include/linux/static_key.h:3:2: error: #error "Hi" #error "Hi" ^~~~~ In file included from ./include/linux/vmstat.h:10, from ./include/linux/mm.h:1771, from ./include/linux/memcontrol.h:20, from ./include/linux/swap.h:9, from ./include/linux/suspend.h:5, from arch/x86/kernel/asm-offsets.c:13: ./include/linux/static_key.h:3:2: error: #error "Hi" #error "Hi" Thanks, Feiyang > Arnd >