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 887E5C43334 for ; Tue, 5 Jul 2022 07:51:46 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id C7B216B0073; Tue, 5 Jul 2022 03:51:45 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id C2A4C6B0074; Tue, 5 Jul 2022 03:51:45 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id B18E76B0075; Tue, 5 Jul 2022 03:51:45 -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 A3CC56B0073 for ; Tue, 5 Jul 2022 03:51:45 -0400 (EDT) Received: from smtpin30.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id 70A2D2128E for ; Tue, 5 Jul 2022 07:51:45 +0000 (UTC) X-FDA: 79652276970.30.7FEA303 Received: from mail-yb1-f176.google.com (mail-yb1-f176.google.com [209.85.219.176]) by imf04.hostedemail.com (Postfix) with ESMTP id 1B35740005 for ; Tue, 5 Jul 2022 07:51:43 +0000 (UTC) Received: by mail-yb1-f176.google.com with SMTP id 76so4825528ybd.0 for ; Tue, 05 Jul 2022 00:51:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bytedance-com.20210112.gappssmtp.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=k8cdnnptoSm5AJC45vIjlcJ8J1DipiYnWtE0ruW2rxs=; b=hrW9cMR7Z3PxWD/FtQwAajFkdScrx1WIecOy3tNPSPFj7ZpT3MS6GjAIcWTagfEmKJ gkd2p1YtA2R+Hh+5XgkXthXfwg2R5jG2gKm0g6phV8Lrz5F4whqrhU83Dj4tyPwZFMtM uh781jvQ7OZBXq+KPR5Hc8P02RQW8jmkhPaUJ/ZwYrOawwLL/FrmV28X7ASFhZjVAiDC 4PMU4qslIoAXQOx4rSi7700OVzBPHPOTQk+OIii9voMpdvQNDRlo5aNm95xeq1Ki2eBG hdoFAWundROhfmqT1kj2LM1sDGiWNawV/jwFpZ3ps+48699ORO58C04c2n4NkdSQvBX9 lJrQ== 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=k8cdnnptoSm5AJC45vIjlcJ8J1DipiYnWtE0ruW2rxs=; b=ZmhItn4Ncrx7i8izXhfr7Ni2w2MMri8o8kVftEqgYhtZnIFV2Yp9X2gyalosjsVbyQ 3ZLlAl0mqR7fnSXAx4LuaJsC8OLt84hYCpKvsMPNBilffOyvrlTGDMgHJN8gx4MRyGWd 7Rz1+FUTYlwToZPkYKY0sTEIb3t4Oa3Yd4Eb2IhfBCMVPAWNHX9ErGCfAvbFqIKsmNbq P07oc3wwbHrk1hSwPp2IW+ElCQ9HqGNXdH5kF/5EoSJfSa6R+VGJHpyNZbVdM39Pt/2Q nfmkOaCy/5pKOac8XxNyE9Ynp+zwd8Dy90m8mp9rEG6V4YFAeSq1a9U27xCcQKqPKVmv IkSw== X-Gm-Message-State: AJIora+jqO9GVKoYn//hA0CQuiK1AbcOXixlEPu5KraOcZ63x8cqwkB1 bka6IPwefsGl6Ouns1P3XIbPEGsqaKbMhBh45kmMTg== X-Google-Smtp-Source: AGRyM1tcec4ZVozLeG3AHgF0JBmdcEQv61u7/2ayYABYM50nQefJuIIBRyMGNOqvt0ngm0odO3V8Tx51FRXcuMYED+M= X-Received: by 2002:a25:4290:0:b0:66e:53b2:56ed with SMTP id p138-20020a254290000000b0066e53b256edmr7670009yba.254.1657007503251; Tue, 05 Jul 2022 00:51:43 -0700 (PDT) MIME-Version: 1.0 References: <20220704112526.2492342-1-chenhuacai@loongson.cn> <20220704112526.2492342-5-chenhuacai@loongson.cn> In-Reply-To: From: Muchun Song Date: Tue, 5 Jul 2022 15:51:06 +0800 Message-ID: Subject: Re: [PATCH V4 4/4] LoongArch: Enable ARCH_WANT_HUGETLB_PAGE_OPTIMIZE_VMEMMAP To: Huacai Chen Cc: Arnd Bergmann , 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-Authentication-Results: i=1; imf04.hostedemail.com; dkim=pass header.d=bytedance-com.20210112.gappssmtp.com header.s=20210112 header.b=hrW9cMR7; dmarc=pass (policy=none) header.from=bytedance.com; spf=pass (imf04.hostedemail.com: domain of songmuchun@bytedance.com designates 209.85.219.176 as permitted sender) smtp.mailfrom=songmuchun@bytedance.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1657007505; 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=k8cdnnptoSm5AJC45vIjlcJ8J1DipiYnWtE0ruW2rxs=; b=PlkHorHcuqTxX3RZa3l+sxELQPXQp6i+XgMlVlWwkC7TCRqpSVmx2Feq0UupZfw96a4d4E bKTAAo6qu4xXsM2jgIp8lKXZGpFvWIdvTsCoo3RtOTEhCkGqy1J478t0rxh5e5TxM5kdbK PUMAYABMrUoXmb4IXOSPkOxPNDjYdT0= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1657007505; a=rsa-sha256; cv=none; b=f4xSPl/tEIpOUhtEXRW6UMdiaH5Facbs6Ohyh6LbQwUNGlBTISPpbJmImYXBJNlxbThwA9 a0Rp95BUFRge0DxpN2BFJPgPmSFdIknjXSRMF+zqKInN6aKJyWZlBgHGhBF/cDs3NuqcYK TF3zVuqeQmORqYp3DoOzusxEbBlFWdo= X-Stat-Signature: pc3em9gmog5n5mgqgxap5cqzqd7jca4q X-Rspamd-Queue-Id: 1B35740005 Authentication-Results: imf04.hostedemail.com; dkim=pass header.d=bytedance-com.20210112.gappssmtp.com header.s=20210112 header.b=hrW9cMR7; dmarc=pass (policy=none) header.from=bytedance.com; spf=pass (imf04.hostedemail.com: domain of songmuchun@bytedance.com designates 209.85.219.176 as permitted sender) smtp.mailfrom=songmuchun@bytedance.com X-Rspamd-Server: rspam03 X-Rspam-User: X-HE-Tag: 1657007503-402300 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, Jul 5, 2022 at 2:22 PM Huacai Chen wrote: > > 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. +1 The static key is an optimization when HVO is disabled. Thanks. > > Huacai > > > > Arnd > >