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 X-Spam-Level: X-Spam-Status: No, score=-4.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E2FE6C433E0 for ; Tue, 4 Aug 2020 05:34:03 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id D35762177B for ; Tue, 4 Aug 2020 05:34:03 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="TmKqchng"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=google.com header.i=@google.com header.b="Ph8ZuBGU" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D35762177B Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Type: Content-Transfer-Encoding:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=oXuTCzPKuUdCgVK2/e7bt7C1+9WladRnTqewThfPZw8=; b=TmKqchngVk6E9U5uB4Tna9AG+ sFErc958lQRpMwnUParbUsbQj6aeoY+aQzRjs7L81QqoflVJ89h8iY4Sbuvl0KJ6u5R57LvAFwSC/ /gLTuabT6TsUYFB64XMccxDg709wFuZW9JvNB5qWLuqKOLgOtNVavd/Zw4mDrfdJAGT/2xfty09BE +Z/XUd8VFQr3+O6BEIJQZahwQ7cyjDpFLZo0T1sdhb3YNun/eNDwoZCvBTTg2TCV0SYJ7Z8K07xc6 elQHR+ZHhS18TGPYsyFvByqeVwCBuewak67xWVim8ezl3YuuRcW9UfVHs+/ApRhgk7PacI0NRanJ5 5xNvborbQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1k2pYy-0004GF-Sp; Tue, 04 Aug 2020 05:32:36 +0000 Received: from mail-pg1-x52f.google.com ([2607:f8b0:4864:20::52f]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1k2pYw-0004Ec-AL for linux-arm-kernel@lists.infradead.org; Tue, 04 Aug 2020 05:32:35 +0000 Received: by mail-pg1-x52f.google.com with SMTP id g33so4062647pgb.4 for ; Mon, 03 Aug 2020 22:32:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=SYIRLxV49LREgpupMxZqNaA5o9fHAoeWk6pTwu6HNpo=; b=Ph8ZuBGUk+/4Umvi3tBIzf/QoNeRTzEty93PfC99H5oKffGm5XPBIYydB/2qEjwx+J SZlumfSOoM+FB4ii86QCn1PTMJ9NjJY1FZUj2o/u1krMTrrJozPlGsMuZcNXIvRjpPcJ +81DI4YxL4IU6lFGb0Pbpc9mW8IlwPMik2dCyLkBcwktamtjKAinHZrEX//ZHUbKngp2 MSXGzP8/tmQLmOFB7W5dB+57aIme9PO1DVII/zySdREQiWkYF7MCpIOIHFgUVx2svIar 11zh2B8Q9ICjj9GH1pCF3bU70VMzSX8LQhVIliff5lguiHIeRZXh+NE4la6L3y3/ChSK Id9Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=SYIRLxV49LREgpupMxZqNaA5o9fHAoeWk6pTwu6HNpo=; b=g0li7IUbWGrXThibnW3F1RFaX73uCuJT7hvsZwtZc53/OTLTx2KrW+b+UWUxMp7vaL Mxu2zm0Cre7/ZwslT5wJcKB/1OCnd9O4Von/RCBq/c8VcjlIvi4eyInX9bXZ6TGAaf1D +OKxo8KI44BpmPQGqwc41ASOnAuleXcqf7hE3higuKkc8QnOy4H8sF/592OocJQSAq1F wyqUKtUD8I9tOJ8XvcKVBHV7Aq1SB0bwIpbQosgXacRCYrv+Qhobmft6Akw5TsXnD4xH fl89qIeWsH+BSVjGvo6hohlrPJpSV+DchBQJilbnPCa3t/aleS3EElkk9a5XDY/zdx4F qw4Q== X-Gm-Message-State: AOAM530f6bkPZIdYGSL1B9whhQxgDz/N9IsjI8bjFiha17hVyD3gB9so hXbH4OrlygeOITeQ9/fM7yOCkg== X-Google-Smtp-Source: ABdhPJxWvObT/t8li1vTJ4ytGrVaTvI1LGmfrOyEDh3/xDuiqI+q1VkKOlVYIQvexku7wtDA6xXYXw== X-Received: by 2002:a63:cf0e:: with SMTP id j14mr10344966pgg.119.1596519151489; Mon, 03 Aug 2020 22:32:31 -0700 (PDT) Received: from google.com ([2620:15c:2ce:0:a6ae:11ff:fe11:4abb]) by smtp.gmail.com with ESMTPSA id go12sm1117217pjb.2.2020.08.03.22.32.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 03 Aug 2020 22:32:30 -0700 (PDT) Date: Mon, 3 Aug 2020 22:32:27 -0700 From: =?utf-8?B?RsSBbmctcnXDrCBTw7JuZw==?= To: Andi Kleen Subject: Re: [PATCH v5 13/36] vmlinux.lds.h: add PGO and AutoFDO input sections Message-ID: <20200804053227.k7zyozzrw5mhv6qi@google.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> <20200804044532.GC1321588@tassilo.jf.intel.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20200804044532.GC1321588@tassilo.jf.intel.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200804_013234_384808_E5C1311D X-CRM114-Status: GOOD ( 21.02 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , linux-efi@vger.kernel.org, Catalin Marinas , Arvind Sankar , Manoj Gupta , Will Deacon , Thomas Gleixner , linux-arch@vger.kernel.org, Masahiro Yamada , x86@kernel.org, Russell King , Ard Biesheuvel , clang-built-linux@googlegroups.com, Ingo Molnar , Luis Lozano , Borislav Petkov , Kees Cook , Arnd Bergmann , Jian Cai , Nathan Chancellor , Peter Collingbourne , linux-arm-kernel@lists.infradead.org, Michal Marek , Nick Desaulniers , linux-kernel@vger.kernel.org, stable@vger.kernel.org, James Morse Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 2020-08-03, Andi Kleen wrote: >> 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. > Gives worse packing for the hot part > if they are not aligned to 64byte boundaries, which they are usually > not. I do not see how the 64-byte argument is related to this patch. If a function requires 64-byte alignment to be efficient, the compiler should communicate this fact by setting the alignment of its containing section to 64 bytes or above. If a text section has a 16-byte alignment, the linker can reorder it to an address which is a multiple of 16 but not a multiple of 64. I agree with your other statement that having a single input section description might be helpful. With more than one input section descrition, the linker has to respect the ordering requirement. With just one input section description, the linker has more freedom ordering sections if profitable. For example, LLD performs two ordering heuristics as my previous reply mentions. It'd be good if someone can measure the benefit. Personally I don't think this kind of ordering has significant benefit. (For arm/aarch64/powerpc there might be some size benefit due to fewer range extension thunks) >> 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 > >-- >You received this message because you are subscribed to the Google Groups "Clang Built Linux" group. >To unsubscribe from this group and stop receiving emails from it, send an email to clang-built-linux+unsubscribe@googlegroups.com. >To view this discussion on the web visit https://groups.google.com/d/msgid/clang-built-linux/20200804044532.GC1321588%40tassilo.jf.intel.com. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel