Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp33439pxa; Mon, 3 Aug 2020 21:49:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzW3XyXwYw0aTXxXBI1lOCCDWy/OoMZxjvSrYeSM4eECmjEXpydjs9ATVQ+k68E1hCN8l2Q X-Received: by 2002:aa7:d7d7:: with SMTP id e23mr18101496eds.347.1596516557897; Mon, 03 Aug 2020 21:49:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596516557; cv=none; d=google.com; s=arc-20160816; b=lqauN7xyPGvSK5pu5XO2FOrI+DlQSRuN2yh2YfmnXphB/rFMCQ85krPuBJ8cGDRlQ/ E2pNs+jGVdIGYxZgohuSDtqXa/+Kjbhp2DiyNDp22cnWEawMULLbyVtn5bdmXbSiLHb+ Fscl7N1eCaNEsgwxEDxPrmrk1cHsaLQh0+3RJfCyh4WR7REX0gu7p+5g/y6xh4wbLS9m sh4l7komENN9Oa8cZ0mvy5+AQyA5YhDgMRBWar2TKTC6VaMsRwcphZU9ynLMQiEjafqk elnxfhCDSbS6cEregWCXMEgFeyfBrMK2uhvIeCcRk3SjKfwnr0A+loQuWL9LcO2487gx e7YA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :ironport-sdr:ironport-sdr; bh=bictgAayJ4KJnsQEfYGzt7CUJMXtlsoFmHplsOJcG58=; b=D/Mr2502bEVh/4F7IVFhKabIYJwZD4GNo8jlMBlv1LJ7azRof6TSzh5OtIRoM2N2P6 +q6W+qwG8HFXDn/UMhCn2W1knFxWtErquPe6+zJlzuaFVi98mGUgGCSyZG6cuWkPLAwk TjWz/7LK2rCVzVYeWkHR87VdezZ8zRns6pDHfX48B2uEtmIz1j4D8Voo9dq+6STky7NO 9d5tzQCf09H8W3viD8avyeoCOuNellN371K55NbMkyJDRvxx1ZHvhJU6Tz2B26ey5fZC teciFit72z+budpGZML38gwsBg2KK+JBHI89qps7yU/etUWdSTUhrYq1Hr9amkMOC2M8 UeOQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id jx1si11611238ejb.520.2020.08.03.21.48.50; Mon, 03 Aug 2020 21:49:17 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729753AbgHDEpe (ORCPT + 99 others); Tue, 4 Aug 2020 00:45:34 -0400 Received: from mga14.intel.com ([192.55.52.115]:39845 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726000AbgHDEpd (ORCPT ); Tue, 4 Aug 2020 00:45:33 -0400 IronPort-SDR: kfL1hhR3qfjjTNV8hfCpcsrQLwfs0AIYwjw1nvIbAcvD/VvqQ936dkHnrblIdVV/CwIN+AP2fc ooqeyh1UxnVw== X-IronPort-AV: E=McAfee;i="6000,8403,9702"; a="151475754" X-IronPort-AV: E=Sophos;i="5.75,432,1589266800"; d="scan'208";a="151475754" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Aug 2020 21:45:32 -0700 IronPort-SDR: yT+NnfDzkBBqZocXS5Cm5LSqUA6iXDA0PdiYx2LJzMwyVMnoKnfAmSFyjlrUPndNHDPKGRzR/+ LEl1MtaDPn8Q== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.75,432,1589266800"; d="scan'208";a="292419767" Received: from tassilo.jf.intel.com (HELO tassilo.localdomain) ([10.7.201.21]) by orsmga006.jf.intel.com with ESMTP; 03 Aug 2020 21:45:32 -0700 Received: by tassilo.localdomain (Postfix, from userid 1000) id 40984301C06; Mon, 3 Aug 2020 21:45:32 -0700 (PDT) Date: Mon, 3 Aug 2020 21:45:32 -0700 From: Andi Kleen To: Arvind Sankar Cc: Kees Cook , Thomas Gleixner , Will Deacon , Nick Desaulniers , Jian Cai , =?utf-8?B?RsSBbmctcnXDrCBTw7JuZw==?= , Luis Lozano , Manoj Gupta , stable@vger.kernel.org, Catalin Marinas , Mark Rutland , Ard Biesheuvel , Peter Collingbourne , James Morse , Borislav Petkov , Ingo Molnar , Russell King , Masahiro Yamada , Nathan Chancellor , Arnd Bergmann , x86@kernel.org, clang-built-linux@googlegroups.com, linux-arch@vger.kernel.org, linux-efi@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Michal Marek Subject: Re: [PATCH v5 13/36] vmlinux.lds.h: add PGO and AutoFDO input sections Message-ID: <20200804044532.GC1321588@tassilo.jf.intel.com> References: <20200731230820.1742553-1-keescook@chromium.org> <20200731230820.1742553-14-keescook@chromium.org> <20200801035128.GB2800311@rani.riverdale.lan> <20200803190506.GE1299820@tassilo.jf.intel.com> <20200803201525.GA1351390@rani.riverdale.lan> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200803201525.GA1351390@rani.riverdale.lan> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > Why is that? Both .text and .text.hot have alignment of 2^4 (default > function alignment on x86) by default, so it doesn't seem like it should > matter for packing density. Avoiding interspersing cold text among You may lose part of a cache line on each unit boundary. Linux has a lot of units, some of them small. All these bytes add up. It's bad for TLB locality too. Sadly with all the fine grained protection changes the 2MB coverage is eroding anyways, but this makes it even worse. > regular/hot text seems like it should be a net win. > > That old commit doesn't reference efficiency -- it says there was some > problem with matching when they were separated out, but there were no > wildcard section names back then. It was about efficiency. -Andi