Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp1125038rdg; Wed, 11 Oct 2023 15:38:01 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHlxhL3v9XXKjfTKsVtLR1fdxj4S5k5qLZpudGtflZPp3KxMxE+A9/n3cZtFnDXaAQoYixh X-Received: by 2002:a05:6a21:8cc5:b0:154:6480:8588 with SMTP id ta5-20020a056a218cc500b0015464808588mr22618283pzb.0.1697063881495; Wed, 11 Oct 2023 15:38:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697063881; cv=none; d=google.com; s=arc-20160816; b=IZKgeyyxQv+BpFIMc7PbFxg8FxrNE8FHb6vN6TDULXNHX9WoTHla5D6wBlXkTAaN+g fmHlc+sXOjaBBWTn1VxYPm7WRGxGVJgh9tzDoGJ4pw97pq+wZesf4o/4JxjVUEzkLqk0 WQety13eECI/kObgf+gGQE3AmOKro4YmayKUdb4KmUc2cEy4X4g6CwU2MfGwQyW59tKk ijl5f5kofF49VmduWRoCHMGmibqGjwNbrZtZ1nWPPQ5M1vGjNUQzOXY3WRy6+ONlvUJy dNCMJO6ArcqhWf33gA58Z9IJkcQHT5pKFZ+hdLJqn0aaZxZErP0/4p+l5iC2YQ9Wwfq7 cG6Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:sender:dkim-signature; bh=HLpT5o7Cvx9fo5trMXpfCzqTo5OLTt4P6i5IBd2WXFo=; fh=FvEMH8c0YCvZXIn42ckudqlFpijGF7ftLOAQysQqmcQ=; b=j4STrHEcVuvT5mXW4nlX2ugo2ryxKerB9ihJVNRY3Jw/NKCp2iLjVkzyhVYzJfN4Nk wVrLeNhbGx0P+dWRw5iN2MWnVVXHuL3n88WvRYi0JGR58vaH8JMlMgIxBKdEsFb0X3+b neF87ETAkty+bq9Pj+sDOHc+Vef5gCYlDsfLusigwo4rHwijt+fIQWuR8WCZ4x5h3ls4 7TPiHi1y5bozBp48MFRN/s53YlVBgf23FkWj8uVIMV4BlFLFWVu9BwDEYh9ozzGbFoLo 7Urt573iz1HXXXWVyhV94IWVtHG/lwmoE+QRrfbLthccisVWkyWXCfMPKhNrkNgNokMr FEUA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b="RlPw/dlr"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 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 lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id p9-20020a63fe09000000b00565eedb1cf8si738465pgh.825.2023.10.11.15.38.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Oct 2023 15:38:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b="RlPw/dlr"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 25D21810EC14; Wed, 11 Oct 2023 15:37:59 -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 S1347034AbjJKWhg (ORCPT + 99 others); Wed, 11 Oct 2023 18:37:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60520 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235205AbjJKWhc (ORCPT ); Wed, 11 Oct 2023 18:37:32 -0400 Received: from mail-ej1-x62d.google.com (mail-ej1-x62d.google.com [IPv6:2a00:1450:4864:20::62d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 38B55CA for ; Wed, 11 Oct 2023 15:37:31 -0700 (PDT) Received: by mail-ej1-x62d.google.com with SMTP id a640c23a62f3a-9ae2cc4d17eso51594666b.1 for ; Wed, 11 Oct 2023 15:37:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1697063849; x=1697668649; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:sender:from:to:cc:subject:date:message-id :reply-to; bh=HLpT5o7Cvx9fo5trMXpfCzqTo5OLTt4P6i5IBd2WXFo=; b=RlPw/dlrBBS3Fhviaa4MmaT4hF9dWdeKdpXoZ2lpJEXNt7z1bmfUgRo7F6sL9U6aGG AFBZbr6bIomV6hSOZI2MI5bgscC5+HDRIcZGBVyHexMoLgx/2GT4olX9O4c6D3t0IxHQ gzg0yTn7/k4ApkvuAk8XvyBWniO4uktxRTD+74MIz4gJ+6r5mPMhRFLUEfvL/qmQj7gm ECSzAL4EvyZ94ZxC1s5dZFI4RdtL1kNsKa7Jz8/Y8++bUBjpKPHw9mJJTpd9Zm2ZX2zW LSmi0yMRs0EJ0DSfc+8HZxXEGFj7ebEbJOw936VCTKxtTLPCHLf9LITXBECl8r0W2dJw yTRA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697063849; x=1697668649; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:sender:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=HLpT5o7Cvx9fo5trMXpfCzqTo5OLTt4P6i5IBd2WXFo=; b=Ia2N9tqzJKHmKGvRsOhhp4bIzZK4cnXK1Qc4RhW3ZRoAKFfSP3cuggNs2fNFsiwwNQ NL0gKUTEXQXoUqplBn0Ogr8Aw8b1576PlNUNU34is1/pYj1mXMkY1LX6pMnS0X6LNHvz RESTaHsjHzrVS5/OcS/e6l58KycN8B4g0v9KwMOkhKnmvDakiIMXc22kySHW+Q2C+rFM 9B0wU6wTUhM9SwmL1tDD6ySBrWPUmxVmVpnOrhMfGcUDFH0ZXcQmnzutP6LXGXzl8Blm WM1su8eR/Je91SxZurz0FdZU98IOl9yhX7fR/9oGpv60soSkf5xCUHii8IArjrejthf5 gZnQ== X-Gm-Message-State: AOJu0Yz4dcGfFOeTqS6Ncr15ZN+/j3hNdGPBxEqC7sLdJwRKPQBqtTmU BcrPFlsaS7+0gkpOgYvgfvs= X-Received: by 2002:a17:906:221c:b0:9a5:b876:b1e3 with SMTP id s28-20020a170906221c00b009a5b876b1e3mr18483488ejs.20.1697063849591; Wed, 11 Oct 2023 15:37:29 -0700 (PDT) Received: from gmail.com (1F2EF405.nat.pool.telekom.hu. [31.46.244.5]) by smtp.gmail.com with ESMTPSA id j24-20020a170906051800b00993470682e5sm10250709eja.32.2023.10.11.15.37.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Oct 2023 15:37:28 -0700 (PDT) Sender: Ingo Molnar Date: Thu, 12 Oct 2023 00:37:26 +0200 From: Ingo Molnar To: Linus Torvalds Cc: Uros Bizjak , x86@kernel.org, linux-kernel@vger.kernel.org, Nadav Amit , Andy Lutomirski , Brian Gerst , Denys Vlasenko , "H . Peter Anvin" , Peter Zijlstra , Thomas Gleixner , Josh Poimboeuf Subject: Re: [PATCH v2 -tip] x86/percpu: Use C for arch_raw_cpu_ptr() Message-ID: References: <20231010164234.140750-1-ubizjak@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=2.6 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, 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 15:37:59 -0700 (PDT) X-Spam-Level: ** * 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. Will check all this. Thanks, Ingo