From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=90.155.50.34 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796215440; b=t6IFFwnFeZR1Eutgyrd4/6l+iwx9w7AvJRecctF3/LsJm2LTmkSLgzlAor+q7R4rneM/ bcIoXcg51K4OASYGACpWxwLlcP+859J0itqye/vVy7jbR2pvWwu6xpEHmVBWVpgm/GYjZ RnfJAEDLAUu+R7KTlX8fvaOsNwYR4y4nsc4il1E0SYrepDgN4bqnPFsYi+4GKG2Yp3oHe wjOvgGqclZFd5LiQ32TyWb8wd+PnaCWS5EhgNpnXNs8fAuWCN1OVAWg10eKNzJGgIKHJ1 SPILWVS0bVR7wSPHOvjZZuCxDD3RVxlDVBmY4RlS+h+7zA3d3egpRrVsUOjDMrIvcJw== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796215440; h=DMARC-Filter:DKIM-Signature:Received:Received:Date:From:To:Cc: Subject:Message-ID:References:MIME-Version:Content-Type: Content-Disposition:In-Reply-To; bh=PbgD/zN5Eia+EFC+Uw+tRcrNa0qV7IVtmjvjpr7cAjs=; b=uP1G21uzUVH3ywB2ZrNfpgrl6gZ8MZc4c9nq/dzINPKMiX/ozlZBFPNZYiwZCjVOJULc T1th+lNwMt/qYTV3xJaZ2udznlqVI9vH6oiEWQ/fT14N8MUB5DvuDfAg5bKHQslef5QP2 bnkUTmglrqSRq/lD4htgMty9f4yXEV5+Vxng2KZX8dSqN2EYumaN0ys3iQ5ggN5KT9CDz 2XgDO+JutkH7Ln50G4uoqtsjbPYYlHxfiBWRKco+bpPO5bSXVqtoxXCWPrlWxVrugvs3D R0wulA6EBdxhSxisRMLiWepHpqR6VfzzpNjMsPTW18TwGrsh92wgxtNQ4OKcV0/nXbg== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=infradead.org; spf=pass smtp.mailfrom=infradead.org; dkim=pass header.d=infradead.org header.i=@infradead.org header.a=rsa-sha256 header.s=casper.20170209 header.b=ej30GLpS; arc=none smtp.remote-ip=90.155.50.34 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A8339606A31A; Wed, 2 Dec 2026 12:43:59 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org A8339606A31A Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=infradead.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=infradead.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.a=rsa-sha256 header.s=casper.20170209 header.b=ej30GLpS DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=PbgD/zN5Eia+EFC+Uw+tRcrNa0qV7IVtmjvjpr7cAjs=; b=ej30GLpSoUwMoOirS1lLvDzvOP HzLRMVH8LMA9GvBHsKVno1T9Q09IBTsUn8t8LABY2gFT87eEo4WQlquUOQ8zklLbbV8XMBEU0H4mX 68HpmsUBEERjqFpPTSwsXAN1glTfRDNKhrGXopWPLPSsjuScI3nsBXhimyc+iUOb2cAPTCn0tp3tC Bk/JZljeqVNJ8r+df8euN16pNAzGHrPSsRZQwJRftScbO9hFBiAzHLoADo4jQEWSU0ZrPwIQAhdJ5 cewXfnzLLVylMO6h9JH/RnVgiUg1PxwXgx0y+FYHWlEuV11YsCAu771S0rU56Fk+cELzt8b7KaAL6 iY7ugYCw==; Received: from 77-249-17-252.cable.dynamic.v4.ziggo.nl ([77.249.17.252] helo=noisy.programming.kicks-ass.net) by casper.infradead.org with esmtpsa (Exim 4.100.1 #2 (Red Hat Linux)) id 1xYjgU-0000000E8EF-3T9e; Wed, 02 Dec 2026 12:43:42 +0000 Received: by noisy.programming.kicks-ass.net (Postfix, from userid 1000) id 9ADE3300428; Wed, 02 Dec 2026 13:43:41 +0100 (CET) Date: Wed, 2 Dec 2026 13:43:41 +0100 From: Peter Zijlstra To: Ian Rogers Cc: Namhyung Kim , Ingo Molnar , Arnaldo Carvalho de Melo , Mark Rutland , Alexander Shishkin , Jiri Olsa , Adrian Hunter , James Clark , Athira Rajeev , Alexei Starovoitov , Daniel Borkmann , Andrii Nakryiko , Martin KaFai Lau , Eduard Zingerman , Song Liu , Yonghong Song , Ihor Solodrai , Leo Yan , Dmitry Vyukov , "Steinar H . Gunderson" , Stephen Brennan , Thomas Falcon , linux-perf-users@vger.kernel.org, bpf@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v4 03/19] perf/uapi: Add BUILD_ID_OFFSET sample types to UAPI Message-ID: <20261202124341.GA677025@noisy.programming.kicks-ass.net> References: <20261125005108.1020003-1-irogers@google.com> <20261125005108.1020003-4-irogers@google.com> <20261125132512.GB2668804@noisy.programming.kicks-ass.net> <20261130193846.3582553-1-irogers@google.com> <20261201081435.GD2883950@noisy.programming.kicks-ass.net> X-Mailing-List: linux-perf-users@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: On Tue, Dec 01, 2026 at 09:10:49AM -0800, Ian Rogers wrote: > Relying on MMAP2 sideband only gives new mappings; for system-wide > profiling, perf still has to crawl /proc//maps for every existing > task at startup and record every subsequent mmap/fork across the > machine, even for processes that are never sampled. On large > consolidated servers that overhead is substantial: > > - For infrequent system-wide events (e.g. bus lock), synthesizing and > recording all system-wide mmaps dwarfs the cost and size of the > actual samples. Just make them fatal :-) > - Even for high-frequency events like cycles, on a large server with > lots of consolidated work we see over half of perf.data consisting of > mmap events, and that share keeps growing as more work (including > guest VMs / containers) is consolidated onto larger machines. > - On a loaded machine, just allocating the procfs inodes to scan > /proc//maps at perf startup can trigger memory reclaim and > latency spikes -- worst when you are profiling a machine because it > is already under stress. It seems perf doesn't even use procmap_query. But that would also suggest maybe extending procmap_query to query multiple/other pids. This would then immediately avoid having to allocate all those inodes. It also helps with latencies, since procmap_query doesn't lean quite so hard an mmap_lock, instead relying more on vma_lock (iiuc). I'm not sure there's something to be done about the volume of data though. Limiting scope and perhaps a better on-disk format might help -- that is, do a string table for perf.data and have build_id[] and filename[] deduplicated or something. Also, sample_id contains redundant information, that could easily be 'fixed'. I hear this AI thing is good at finding patterns, perhaps you can use it to develop an efficient online compressor for this crud.