Received: by 2002:ab2:6203:0:b0:1f5:f2ab:c469 with SMTP id o3csp2520219lqt; Mon, 22 Apr 2024 13:07:16 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUUuus1cEe4ZCqO2dpTNz7zFtmMEFUUbJYNWYIvt9kMm+dr7n6AsistEH8rpWnvgQMgjQfPcdDLYKsNr50PTsKuRm8I9Sc0WlkJt6wBbQ== X-Google-Smtp-Source: AGHT+IESlJRZj6BU/yIvMLhWXVYv7R8zqR0Skm7r7ANwW4oKF5mvzL0wkadyLHxkmyaMkDFcQZHy X-Received: by 2002:a17:903:22ca:b0:1e4:55d8:e753 with SMTP id y10-20020a17090322ca00b001e455d8e753mr14373767plg.10.1713816435900; Mon, 22 Apr 2024 13:07:15 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713816435; cv=pass; d=google.com; s=arc-20160816; b=iB1ggblvqFnlKIifDtrlhdtwiLkasqoRRWPOqUhCUIHLkYVhTlL/hvR4CpRPHyLeVE m6RzbVigg2LyqKQ3HG8lEUCgt1sD26vz2DlOW86DYQoMPsS+vO+wT5Ho3VuTfsz3l4EU 2GXJLM+GsEC7YZcgloM/5uNMgTJeIK3WL6dK5/Cv8JibDmSPugxox8desTTyjrsSYkqr vQoNQtnvaCeDazCko6JS5pYE8WrekD0DE6sNyh18YENsxY/sCZ/cAwqqsGyPjGfv1unU kpS/iy10xgAL939D5Ig8GffL+NDvpGndjGRSKrw/2+WJ54vBpbSprkVv4CCsRKYA6vnJ e7Og== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence; bh=hJlEQvTvAW0uIRb0nxity/RgFXzSN13AzJrAIZ0mBQY=; fh=mogBZtHOFrn7A7HqKezZesUeKsG2yZXTTXGu7cJaeXQ=; b=TlZ4Lp2xrjaO1UB4mp2gLnsPt2eMZCCIksFe0vr5JIqLOYwrFwpfoeNJhpSSm3IYoZ 54pEpZPces5otHongXtwpPUFxx+pUQ823hOtf1AjzuxkJuwFCe8Ckt0UAmZs+TMLaDTH 0cS0edQYBBWMGryTrD5JtmaunKT6lQ6+VHwNIBKIS8DaKdvtV9YJgtBj3IyahzxqhS05 +uq/avsdUHKtsP7yhxxOJTyR6TBmEzlfLVzsesNRnVADjuKSluj1qFQDGpp+I2eeLWX/ qu3w7/eBSqTBtVo96XHG/lg9pcSTdvMMNwc/pOVwnx4I0+aUhQ1sKUMfljwplvskMEe4 jB5A==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-153980-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-153980-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id d11-20020a170903230b00b001e4945829basi8526689plh.514.2024.04.22.13.07.15 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Apr 2024 13:07:15 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-153980-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-153980-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-153980-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 01E9028118C for ; Mon, 22 Apr 2024 20:07:10 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C0C691553AB; Mon, 22 Apr 2024 20:07:00 +0000 (UTC) Received: from mail-pj1-f45.google.com (mail-pj1-f45.google.com [209.85.216.45]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E6CDA155388; Mon, 22 Apr 2024 20:06:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.216.45 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713816420; cv=none; b=udLl8RoBfSdITNkoiBSCSbhZsrsQ1pYl+F+iGsyGW30sxo25jNUvX0rYx4TMRaSJgrKHtIY4gd1G0X+H1CKCkGr3492WWQMGED5qTfUw33gLsnUvYEVxco+IY0/+ZWNPxeZiOqsV1bgFiWQKu96OedPw2Xw0nk+HK6Pz+ATG+Dw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713816420; c=relaxed/simple; bh=hJlEQvTvAW0uIRb0nxity/RgFXzSN13AzJrAIZ0mBQY=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=g6QDbhOkGzFNCzygm9wdSU0XCrsJThRC9Ia4Amkzu/C/hWLEd9/Aa6CLHEMVq9dNoR+6PErQ6TIiXnFCYjuzK0/+bo8VgQ+UxVjvDK271Zdc7+ZE2cQe5jT3gSEDEDAOI7qVJcpd4pqRNPHEDhsF/f+3TMWG5KfN8EBiKj63UKQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org; spf=pass smtp.mailfrom=gmail.com; arc=none smtp.client-ip=209.85.216.45 Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-pj1-f45.google.com with SMTP id 98e67ed59e1d1-2a484f772e2so3147763a91.3; Mon, 22 Apr 2024 13:06:58 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713816418; x=1714421218; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=hJlEQvTvAW0uIRb0nxity/RgFXzSN13AzJrAIZ0mBQY=; b=jHHZfXxgzB23KzBL3KtygP+cTbFq8QVVKixR7n2eJvP9LreuqRlouCB22HtrDsJS4l WM8k/Mz2aRdz8WkDlSpo00ZtYNClU9c5F9+f0VhzKis590ZIUINVFzEXAUoSU1Pebgq1 ASmwC2uBiECrk+FqKC8xPjEa37CXH1bAi5255tAQTDFnINP84DEj81EuMFFfiwoIcGPv +PP09upSqGclZMuJEOeMPwfVimVABOfjAaP1aMhsvzn6n0teyMeNhm4g6nGx2NkLwz5N IcyEfFRf1t9fxivBje3vPSW7r950wYBvfVQ1zMBRucsSAunGsZPYektgMP+9iuWa7yx+ v9iQ== X-Forwarded-Encrypted: i=1; AJvYcCXYESW7tjaQyhJFuXZJRWp4hplmoTXAm16oYcF7H3PrnOprC+iGHpjV7edK/ajL84w4QVJ8FyRXQyG7Zvw3yqLpRsiHGB35hSq/QIHp2ttZLoie4S2hSUMBW0J5dqtHim32DXFsJAvYLvvc2gPJRCGqXi1y3dooTDAj9+4qzYq9U5NOcA== X-Gm-Message-State: AOJu0Yw9aRd3yUjKaTm5F2FrLkFjQmylqwZ86bhQGrja8q6esLPRQy5y wXrsZN+r3COi/jVhSCiyEFboTiyT9wba1Fj811MarRsAclZpq0L8J/sGeVFAjUjnY64sH9vfuzI lAqpQtMsjAHRLmQpizsQB7F9uIbo= X-Received: by 2002:a17:90b:1e09:b0:2ad:dcad:b45f with SMTP id pg9-20020a17090b1e0900b002addcadb45fmr4054047pjb.13.1713816418179; Mon, 22 Apr 2024 13:06:58 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240410064214.2755936-1-irogers@google.com> In-Reply-To: From: Namhyung Kim Date: Mon, 22 Apr 2024 13:06:46 -0700 Message-ID: Subject: Re: [PATCH v3 00/12] dso/dsos memory savings and clean up To: Arnaldo Carvalho de Melo Cc: Ian Rogers , Peter Zijlstra , Ingo Molnar , Mark Rutland , Alexander Shishkin , Jiri Olsa , Adrian Hunter , Kan Liang , James Clark , Athira Rajeev , Colin Ian King , Leo Yan , Song Liu , Ilkka Koskinen , Ben Gainey , K Prateek Nayak , Yanteng Si , Yicong Yang , Sun Haiyong , Ravi Bangoria , Anne Macedo , Changbin Du , Andi Kleen , Thomas Richter , Masami Hiramatsu , zhaimingbing , Li Dong , Paran Lee , elfring@users.sourceforge.net, Markus Elfring , Yang Jihong , Chengen Du , linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org, bpf@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Thu, Apr 11, 2024 at 11:42=E2=80=AFAM Arnaldo Carvalho de Melo wrote: > > On Tue, Apr 09, 2024 at 11:42:02PM -0700, Ian Rogers wrote: > > 12 more patches from: > > https://lore.kernel.org/lkml/20240202061532.1939474-1-irogers@google.co= m/ > > a near half year old adventure in trying to lower perf's dynamic > > memory use. Bits like the memory overhead of opendir are on the > > sidelines for now, too much fighting over how > > distributions/C-libraries present getdents. These changes are more > > good old fashioned replace an rb-tree with a sorted array and add > > reference count tracking. > > > > The changes migrate dsos code, the collection of dso structs, more > > into the dsos.c/dsos.h files. As with maps and threads, this is done > > so the internals can be changed - replacing a linked list (for fast > > iteration) and an rb-tree (for fast finds) with a lazily sorted > > array. The complexity of operations remain roughly the same, although > > iterating an array is likely faster than iterating a linked list, the > > memory usage is at least reduce by half. > > Got the first 5 patches, would be nice if more people could review it, > I'll try and get back to is soon. For the series: Acked-by: Namhyung Kim Thanks, Namhyung