Received: by 2002:ab2:6203:0:b0:1f5:f2ab:c469 with SMTP id o3csp2544425lqt; Mon, 22 Apr 2024 14:00:32 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCU/Jl1ggY2LqmYF10obzZdU6JjiXiCOZ+5PWXtmUQde0pplBXBJ/BmXM3IOkfo16wKVliMmqzcUvDEm0wtPYGXnEtAbBqAyMaoAUoPfMA== X-Google-Smtp-Source: AGHT+IGVyNsA4iX33eGUF/hUl1aHeaXFjFPtvCaDovqrQ4NmRY6NbGyGN63EpPLBgkQUw++PE52Z X-Received: by 2002:a05:6a20:d49a:b0:1ad:4dc6:7791 with SMTP id im26-20020a056a20d49a00b001ad4dc67791mr1506142pzb.15.1713819632215; Mon, 22 Apr 2024 14:00:32 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713819632; cv=pass; d=google.com; s=arc-20160816; b=n4wVigw4l4fXsZJsZNJFeZ+/SlCGMW7nOq7LgEMmn+Poca3cvOiADrMlPd8oJuGQBZ eYvpug2eXaQu5aTJzZcTM6pO2Nmmw5C2q65S8kzwt/amxbk/Tx58mVxw/rDXd1b4fA2d pBhTvzgA7rHRo4N4rd7uHBF6n1VyXSnYaPJnUh575ABtrpsE6GHFkAxkbSEjr56o+8pR 4dPpJR+S/em3IkxnuFbzpgvai9I1AgFkJulsy8KOKos/kp/TS3QBsvgLGJTY8rs5FdYm 36WZuqgBudRUYlxQOegQxjs2qFBQOWnlG/mLB0UpsMDYZJHUDMJjYlOUch0DNPljgs4l vuwA== 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:dkim-signature; bh=9DtxLkBqU8o+Vd60v8MnikP8aabry94GM1z7ZjGXJAA=; fh=+Tn8F5ECkxSaG4fbBwM58Ki9th50EMlOImI5ih2YQ6M=; b=DjbyJWFeukY+F5/KRCpTbdx0UKzQNUw7WdNd/7IOXAIGlhUc60JGWJxAEkjmDseNOa slCFcESl+LbF2gsIMqhI37n/Gb1ruFZ2KnPdrcfYS8kjJWait/63075pdQ9l6C4HY6s1 8ABax1kg/OJg1P7Bqh1J1T4D2e1PLDeTjOcyvZowKBFKSwnlNriYTQ4bfZeJISsi8bhM SO9CLCRXN+CwluwJXs1ya4RcqDAHJ1alEDz8eUUjZQJIsfN2+e+myrYM15FgOT2IPdhH 7Aivry/9nvig5p+3kPwBLUgIjkwirxT2XYpuwHXH5pdg5J6RyqQYDPq+bSdPgDavsUXK ZfZQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=mbzWU88C; arc=pass (i=1 spf=pass spfdomain=google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=google.com); spf=pass (google.com: domain of linux-kernel+bounces-154025-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-154025-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id e18-20020a63ee12000000b005dc5568b149si8251462pgi.297.2024.04.22.14.00.31 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Apr 2024 14:00:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-154025-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=mbzWU88C; arc=pass (i=1 spf=pass spfdomain=google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=google.com); spf=pass (google.com: domain of linux-kernel+bounces-154025-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-154025-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com 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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 9BA33B21535 for ; Mon, 22 Apr 2024 20:59:54 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1A96D1C6A7; Mon, 22 Apr 2024 20:59:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="mbzWU88C" Received: from mail-qt1-f172.google.com (mail-qt1-f172.google.com [209.85.160.172]) (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 39A3B1BC53 for ; Mon, 22 Apr 2024 20:59:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.160.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713819585; cv=none; b=S3T7K9YKPmQRXzKXtguHcTjjzr/ge2Vv700pEfE3Y6DYVolcjMOf+GuD/lZaNfUkhpJiLXUhUWNs3L8dfbjB9a9LRMHI4bnABnEH9+8QQTOj8mBQqLU3wX1DoNoUrZK/GJBiTNfb79HKrwiO/6rI47HAm1KhReC1dc9QZ27nz+A= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713819585; c=relaxed/simple; bh=9DtxLkBqU8o+Vd60v8MnikP8aabry94GM1z7ZjGXJAA=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=N5jvn0pF4Em7F743T+H1TrY6+Ft3ywSqNm4kwtgBIIZvZ+m/O40Sfyqs13EJTQtmGLj9Hh7x/JVNq8AyJObYBCosie5nyZNdeCkwmLnqwhGSOpMqgzrT+9DVzHiJG8Sk6I03BzyVbYtEnqyyAPP54rCuT0MZjhM0z7BCAOFvVGM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=mbzWU88C; arc=none smtp.client-ip=209.85.160.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=google.com Received: by mail-qt1-f172.google.com with SMTP id d75a77b69052e-439b1c72676so39391cf.1 for ; Mon, 22 Apr 2024 13:59:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1713819582; x=1714424382; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=9DtxLkBqU8o+Vd60v8MnikP8aabry94GM1z7ZjGXJAA=; b=mbzWU88CFNzYso5y3z5u0Y7gx+04dJRwteJm/Hx7ACnQ/V62GydtY5pYvdxn0tJE9j J4dazF7HgDQ9euLkxTPEPc+vOF27vdPqiKmzaUnD4onpIlsXIXYOecG5km7ogSX3tjmw WXXfnqC6OIKl77hqQHI/Abf42JvRBemo0s9xSgpzrKxqx/kSUTPPJTZDrJ53gAiDKtCJ W/2mXwzO6zGIHiOnPAEoKLKAr1STrw46B0RXBM1HDkxwbIi2TRhpXSAXeEpWJi+b90+t pF9U6pGLKCCZcrGOOCtiiAU3mE0nyaV/JSh5dHzBchvBsvuUtrHQrpCSVx9Vn86A+mPe PVlQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713819582; x=1714424382; 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=9DtxLkBqU8o+Vd60v8MnikP8aabry94GM1z7ZjGXJAA=; b=gNSZL46bjWYIx1+T/x9OtbcKW4j56OdTJHL7ZitGxBFwyo1yEI8e5xgiQwJcnTcUcB wamyk1PJP+nC0dexIakyMk9LDIIcl0wljYsJJItJgoOCRmvZzzyFEKH6LdBtZLCWRDFp YJM8Byj3z84fZyOoRKSaalLNUHXLpubiGgCTDkPwLa9dMHKOVnhRqcAhJoPHdgTuzMzm 0X7toeML7sdfkD3FJz44u7hw/3DvHYsqRYlaPWUrQxM92GSpzJwmUrc/d2yipk+YqhZt n5Ju858kZ7LItlwEyLq9ovozI8WxsrgGyQxaW0ZSIhNeHAuJe1RaA58OuAN8tzV7F6Tf /a2Q== X-Forwarded-Encrypted: i=1; AJvYcCXRGRgHYX50zGkFiZN+yk7XgdM91tOk9m24F/A8NvJEmk092sBYyh+9v9LxycYmohTKR4G+N65hmNvuyO9ct2hCVp66Q8wfhwVSewW0 X-Gm-Message-State: AOJu0YyMFw07nb1RfhNDIQCGWU0BE2yvuKIxMHI66viamZT75uaJsQzF F/eO/T6mZBEh0uvo2U5uY9a3pHUtB7ImMpM64B+AFgQrXuROk070O8dygpqZ6RSJd30Q6xz6HpO 20VAc/fANxsH2eE/+Q1jIbSzLuWW3KPWM1U3a X-Received: by 2002:ac8:748f:0:b0:437:6b79:c9ff with SMTP id v15-20020ac8748f000000b004376b79c9ffmr83042qtq.10.1713819581839; Mon, 22 Apr 2024 13:59:41 -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: Ian Rogers Date: Mon, 22 Apr 2024 13:59:27 -0700 Message-ID: Subject: Re: [PATCH v3 00/12] dso/dsos memory savings and clean up To: Arnaldo Carvalho de Melo Cc: Namhyung Kim , 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 Mon, Apr 22, 2024 at 1:55=E2=80=AFPM Arnaldo Carvalho de Melo wrote: > > On Mon, Apr 22, 2024 at 01:06:46PM -0700, Namhyung Kim wrote: > > 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@googl= e.com/ > > > > 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 don= e > > > > 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, althou= gh > > > > iterating an array is likely faster than iterating a linked list, t= he > > > > 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 > > It is not applying right now, I've just merged with torvalds/master and > I'm running build tests now, will push to tmp.perf-tools-next right now. Ok, do you want me to rebase on tmp.perf-tools-next? Thanks, Ian > - Arnaldo