Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp4164922rwd; Tue, 30 May 2023 01:11:09 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4W+dUM2n93rCM6P78CdobDGw+ZXPUn4GmFwjR4GONNBnYxq4x/R8WrSY4nSdK4nsLnF0N/ X-Received: by 2002:a05:6a20:7489:b0:10e:d4fb:b03a with SMTP id p9-20020a056a20748900b0010ed4fbb03amr1766364pzd.43.1685434269726; Tue, 30 May 2023 01:11:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685434269; cv=none; d=google.com; s=arc-20160816; b=DIc07qfGYcyOPk+UuaxdfJNJcHyrtV7tg6ZX+BY9jyaCn74CYUIMyL917Lsr8acPmB lz9xYJL6JBuv4KDhkNkH/ntjJrGqSlHrGRM9zeOaSiRRkn5SPod9DOQRw87MWMu4ciFy QDFTEZnFdqVGZxHfHU/gaZEofKO/JxW5YWd8HxtJFR4rLrKJp0SlE4uF8yX0QRxctw5J m3Sbp3VuQUbrhwWfLtNLqHqhC+b3H6i3bSqVhj+6pEo3h2C/s9kMEehLGXHDtPRlueQ1 2piJmFmJzhdvvHPdQbfOD6hNt0WJyl6B+dphZ37+1UOfBnSxFVHdOXVVWN4R7qxDxGE2 zqjA== 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:dkim-signature; bh=q6VebGNq9fBEVEMTYbPRvVVvLno1+y5mzAIXpsnKHaM=; b=aaHdxipwBQRJJgJRn1PjBcuO83lDHwPl5kmlVeWRwIIFGzIWmPjx6RhFk6SbT0blKG lEOHIujdAByDlTlbPIt2aiZ/EafvoJ5x/RpbzQXeHc6WeMg3gAn4dBAFDVFTCubT3ZFP JChUxkB/mt8dyKqviRiHIoPlbOwXwaAtQJqfn9Q8vm5035NyuEoAd8jDN/pHQETHLN0q ham0Dw+tXVVrCOgPCAQ8+siIf5i1DCbrG+4xJ7w1Jfi2sVaUlotu02MGkzHdiGUvnx3O gwU3vN0qkok9ld5SMNfOV0oLX+iBSxmFdPm+hmAx2fTSa1YTta9O1WjT9KDFcxBU5R/W dVNw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=iZ0aa6qW; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l66-20020a633e45000000b005348954e07asi5913799pga.1.2023.05.30.01.10.57; Tue, 30 May 2023 01:11:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=iZ0aa6qW; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229806AbjE3H7k (ORCPT + 99 others); Tue, 30 May 2023 03:59:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52062 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229815AbjE3H7j (ORCPT ); Tue, 30 May 2023 03:59:39 -0400 Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 03D0AEC; Tue, 30 May 2023 00:59:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1685433572; x=1716969572; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=k2wQjHFnZKBKTamAwk9amhA1vwnpcm0OjoXqFO3kzPY=; b=iZ0aa6qWMtTYjazlpSn1Qo7FUuS8MosEW71J6Ms/6X52rLwXUAzqCRj8 fzwNPfvQAqv+kML+kr01Xpurea4ylNcsDBLA9pYjajkSMKolrO71GeQu7 wi2/O6lSLDwB/bSZj6uKlEmXwV+wKbwnZI3kp+ibUTeP6bwG4XCf9950Y nUQARTLZOyrH65i4PW7axEKUIApyOhYmjDCJAf2MXBpkxTbz7wGiFc5cq +Hmzzv6e1X3O3FtTBRFsMNMMg2W2Kf4kx8cYddXiT2itng0SJtcabAdYX cueOHDT2+ztnRlRfDomFTtxknCIiSTG60t0+sD9YhOuVUPEm3xr40mRvY w==; X-IronPort-AV: E=McAfee;i="6600,9927,10725"; a="441203217" X-IronPort-AV: E=Sophos;i="6.00,203,1681196400"; d="scan'208";a="441203217" Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 May 2023 00:59:32 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10725"; a="776207742" X-IronPort-AV: E=Sophos;i="6.00,203,1681196400"; d="scan'208";a="776207742" Received: from tassilo.jf.intel.com (HELO tassilo) ([10.54.38.190]) by fmsmga004-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 May 2023 00:59:31 -0700 Date: Tue, 30 May 2023 00:59:30 -0700 From: Andi Kleen To: Ian Rogers Cc: Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Adrian Hunter , "Masami Hiramatsu (Google)" , "Steven Rostedt (Google)" , Ross Zwisler , Leo Yan , Tiezhu Yang , Yang Jihong , Kan Liang , Ravi Bangoria , Sean Christopherson , K Prateek Nayak , Paolo Bonzini , linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org Subject: Re: [PATCH v2 00/16] Address some perf memory/data size issues Message-ID: References: <20230526183401.2326121-1-irogers@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-4.5 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_NONE,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > BSS won't count toward file size, which the patches were primarily > going after - but checking the size numbers I have miscalculated from > reading size's output that I'm not familiar with. The numbers are > still improved, but I just see a 37kb saving, with 5kb more in > .rodata. Something but not much. .data.rel.ro is larger, which imo is > good, but those pages will still be dirtied so a mute point wrt file > size and memory overhead. The way perf is written (lots of separate code depending on a single high level switch) most pages probably won't be dirtied. > > For huge pages I thought it was correct that things are aligned by max > page size which I thought on x86-64 was 2MB, so I tried: > EXTRA_LDFLAGS="-z max-page-size=4096" > but it made no difference to anything, and with: > EXTRA_CFLAGS="-Wl,-z,max-page-size=4096" > EXTRA_CXXFLAGS="-Wl,-z,max-page-size=4096" > file size just got worse. The default alignment to 2MB was dropped in the GNU toolchain in 2018 or so. -Andi