Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp1142579rdg; Wed, 11 Oct 2023 16:16:10 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHHLdakeUkF77qAkpOp29XaRtiyHmH6t0IJTN1SdUwB7hcaAA8oh1hfh1ukkW+2aXnP2AzD X-Received: by 2002:a17:90b:1643:b0:268:10a3:cea8 with SMTP id il3-20020a17090b164300b0026810a3cea8mr19709201pjb.9.1697066170296; Wed, 11 Oct 2023 16:16:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697066170; cv=none; d=google.com; s=arc-20160816; b=nG7aNQn46TeoPXyR3rEzLeMq4TXNCtk7ZWsxBbtFEqDe+4wzLRuOdp036ncybm0u/b krujqiCkhguabvTUsktoivqE2CGObQmowxq/xW16gUbSLt3cOz/NsF6mrnCKMb59wPSQ UsIFBc91mppcse47xgB1ZAuRzMhK66ftZFOSQp8dP9dlm1Y4rlCfmbRu6YJUlyyhM8Zk WnY8FYxK+ZMfQKUWCuLC0RxQb+RLRs1Yug9Ng/MJdlVBwqhmrH6nfL/DJWtOgFKiju1H dtyLy3dgNTGmAPRU4iOTGaucMgBrJnj39n8q1FlqT1lKgtejVMkOyjllZBlVNFD4B+gg POxQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature:dkim-filter; bh=A0jQQXBOckvWMvwyYSs8xAHjvJIHmdT/ZUvtoLWPlIw=; fh=/rvYl9BTCfx5ovD1bOmL36eH3oqt1IP9Uih194dZGno=; b=CiEJF5E14QbemHUwkUl4qzdMeoda5sP6F0CR2hAN8QmJC/Jf49p8n9UC37sj/3ex0s XtfA9MkjUCTe+K0KfaKpZamRV6UcEQHd5/11RcIrVF0UauBd7lp+yIkWXWqjVMlS6uGo 5QU7ym9es5w2rWZLgzE+pg3ClqixqyGRok39HTVeV5GMorsZaVqfw6LAo5a44grVT7Qm Ueoh2suK4IaGNtyBWrLSMcLfokGnv51PS/nJf9joR+F7qtIjJuoNZ6sxGEQCnajE12hM eSib+hujsnW7ur5f9nEdA+CcyFSe3wMIlD7ZLyIwog0QBiU6bsulG6VP7WoNwfoWWSHy xitg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@zytor.com header.s=2023091101 header.b=HQelFdNG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=zytor.com Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id b4-20020a17090ae38400b0026b51ae4574si852247pjz.36.2023.10.11.16.16.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Oct 2023 16:16:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) client-ip=23.128.96.33; Authentication-Results: mx.google.com; dkim=pass header.i=@zytor.com header.s=2023091101 header.b=HQelFdNG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=zytor.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id A575380330F7; Wed, 11 Oct 2023 16:16:04 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235202AbjJKXPz (ORCPT + 99 others); Wed, 11 Oct 2023 19:15:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53438 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233835AbjJKXPx (ORCPT ); Wed, 11 Oct 2023 19:15:53 -0400 Received: from mail.zytor.com (unknown [IPv6:2607:7c80:54:3::138]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 964CEA9 for ; Wed, 11 Oct 2023 16:15:52 -0700 (PDT) Received: from [IPV6:2601:646:9a00:1821:7c45:267e:5aad:82e7] ([IPv6:2601:646:9a00:1821:7c45:267e:5aad:82e7]) (authenticated bits=0) by mail.zytor.com (8.17.1/8.17.1) with ESMTPSA id 39BNFKAT1460737 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NO); Wed, 11 Oct 2023 16:15:20 -0700 DKIM-Filter: OpenDKIM Filter v2.11.0 mail.zytor.com 39BNFKAT1460737 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=zytor.com; s=2023091101; t=1697066121; bh=A0jQQXBOckvWMvwyYSs8xAHjvJIHmdT/ZUvtoLWPlIw=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=HQelFdNGOmQvUkC7FqkZg4tibROwOGCiEcbxjkVmNZ0UoybOfmMDeq30cB4KUnygu 9CzoNDBAANZ3ZZHMSRQ2Cx0CjPwcVkbiE8j6CdJZeVPxBkTB0eaz9SDpZoz8ik/VnJ BozxHWzadRqgtYKdUJklR0yN6s5LvQwZx3Po0Fxy5lH9FCw0LFcIhQAlrCWq0Cpovw 4zPAm8dBOq1zJwzI7Q3HGOZkEINFgkKZRtKktJWv64Po0ZVP/iUtw5sXxjS9fltrHA GF0Hp1oaAGqg6xqx4n6fWveXTddci6Un0W/tCBI7m1pyT3q5iOCY0UvsfZ3KgQBn91 SlIU50HHoJCrg== Message-ID: <9b71932a-d410-4b92-b605-d6acc5d35069@zytor.com> Date: Wed, 11 Oct 2023 16:15:15 -0700 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2 -tip] x86/percpu: Use C for arch_raw_cpu_ptr() Content-Language: en-US To: Ingo Molnar , Linus Torvalds Cc: Uros Bizjak , x86@kernel.org, linux-kernel@vger.kernel.org, Nadav Amit , Andy Lutomirski , Brian Gerst , Denys Vlasenko , Peter Zijlstra , Thomas Gleixner , Josh Poimboeuf References: <20231010164234.140750-1-ubizjak@gmail.com> From: "H. Peter Anvin" In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=2.7 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, RCVD_IN_SBL_CSS,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Wed, 11 Oct 2023 16:16:04 -0700 (PDT) X-Spam-Level: ** On 10/11/23 15:37, Ingo Molnar wrote: > > * Linus Torvalds wrote: > >>> The only drawback is a larger binary size: >>> >>> text data bss dec hex filename >>> 25546594 4387686 808452 30742732 1d518cc vmlinux-new.o >>> 25515256 4387814 808452 30711522 1d49ee2 vmlinux-old.o >>> >>> that increases by 31k (0.123%), probably due to 1578 rdgsbase alternatives. >> >> I'm actually surprised that it increases the text size. The 'rdgsbase' >> instruction should be smaller than a 'mov %gs', so I would have >> expected the *data* size to increase due to the alternatives tables, >> but not the text size. >> >> [ Looks around ] >> >> Oh. It's because we put the altinstructions into the text section. >> That's kind of silly, but whatever. > > Yeah, we should probably move .altinstructions from init-text to .init.data > or so? Contains a bunch of other sections too that don't get executed > directly ... and in fact has some non-code data structures too, such as ... > ".apicdrivers". :-/ > > I suspect people put all that into .text because it was the easiest place > to modify in the x86 linker script, and linker scripts are arguably scary. > Well, it's more than that; "size" considers all non-writable sections to be "text". -hpa