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 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 63D9DC433EF for ; Tue, 5 Jul 2022 10:49:27 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 82A216B0071; Tue, 5 Jul 2022 06:49:26 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 7D96D6B0073; Tue, 5 Jul 2022 06:49:26 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 67A956B0074; Tue, 5 Jul 2022 06:49:26 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id 53F926B0071 for ; Tue, 5 Jul 2022 06:49:26 -0400 (EDT) Received: from smtpin22.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id 2517720477 for ; Tue, 5 Jul 2022 10:49:26 +0000 (UTC) X-FDA: 79652724732.22.A4BF1BD Received: from mail-lf1-f48.google.com (mail-lf1-f48.google.com [209.85.167.48]) by imf31.hostedemail.com (Postfix) with ESMTP id CC7D720022 for ; Tue, 5 Jul 2022 10:49:25 +0000 (UTC) Received: by mail-lf1-f48.google.com with SMTP id z13so19802474lfj.13 for ; 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=P2+h2EJgGflUprcE4zqEHL1p5DFrEpXjeivBhnZxk0CgtLWPV6osacKikjsYtwwJeX A8nH0Gswx3I9ToWq/GJESKy2RJDwyO7OhppQ9i+nKFS67EC/OtsSmJlt+UFx36LwdrQn 6HY8MlhfUb/XEXfl/tn4KER5art0WuZPFg8ViA8CRAJxdu+8igTaV7fx9B29JxqxvgsU CRwvLnYP61gDAYxfeLvGfbDbJcen2TcNcZIFq/9j0rJYucmxC1/X3k0EXoK1W2QnpMsQ qDvO0HwPKXLQptY2xtTXIWUYtdlfBSCcvQpjmZhPnjWKf1Q9V6GDDZ5urgusay/s5+sP YrJQ== X-Gm-Message-State: AJIora/TlConctcFKw50BlTU8TMtjWVIfkw0nXZHF+3ZflwGSmprRGD5 5khAJIe6Z3hHjptsWfeUatFziTpP7+WW/SWSQdU= X-Google-Smtp-Source: AGRyM1vYTuygFt3JTMn8nW/7T2k8/9hIoI6+Mnjfaa7nq0cDeG+mciiiBVQPotF7kbD4qDeSCrXqjbYsQZ4mZFdz1GE= 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" ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1657018165; a=rsa-sha256; cv=none; b=wsOya/1cKYpEOudkq94KD+w1fpvv1y5YHdzNU/F6t48QTDO0Nl55A/HhC39WCKs3kblMJP vYe+MNUiW1aqvDNWvkmP5PIqQ8z9tziHr/bi0U9zNrXPXTUYdh0MgkB8q7FBwBoWm0sEjL XLuR0SrQmo4iIZt4SkOo0lwBCcgDG2A= ARC-Authentication-Results: i=1; imf31.hostedemail.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=Uyp+2Dku; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (imf31.hostedemail.com: domain of chris.chenfeiyang@gmail.com designates 209.85.167.48 as permitted sender) smtp.mailfrom=chris.chenfeiyang@gmail.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1657018165; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=6ZrVWfoteR5GrzCoHkSriCPMIPEv5ipRG8Y7JTRl1kw=; b=aYkvDQBZZUtxlXaLLp8F/t9XYhQfzEZphfrav6frd+BO94HTbdlBPZpVhBw08yqPQfMq5N AoCbEbAaMnZULjD0J+sYbkSsL/hsJfS4xpk8v+L5MrMgtVIwNG1iRjgeSuGh7HBCmSfugI q0eK/XxHgdZNPM4h6NRtF1SkRct1qQA= X-Rspam-User: X-Rspamd-Server: rspam07 Authentication-Results: imf31.hostedemail.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=Uyp+2Dku; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (imf31.hostedemail.com: domain of chris.chenfeiyang@gmail.com designates 209.85.167.48 as permitted sender) smtp.mailfrom=chris.chenfeiyang@gmail.com X-Stat-Signature: fthihatar85xt9ahih1e9oppxguxp6q4 X-Rspamd-Queue-Id: CC7D720022 X-HE-Tag: 1657018165-670094 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: 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 >