Received: by 2002:ab2:6203:0:b0:1f5:f2ab:c469 with SMTP id o3csp2542452lqt; Mon, 22 Apr 2024 13:55:30 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXkkK+6wo2gX31Q/rWzqMt9D2m/FPYZwpQujY2R19tVYaPAsgJxK2AtOmx3Zx+hmFc0YQ6dP2oYv+04bRH5TBCySPRYiCEsPBrfeGtMFQ== X-Google-Smtp-Source: AGHT+IFZtByY1kOcX66tXL0OBkTiqv5AEFJhgljImZ4ax84axRC39D6TLB5HH+fa5OEjsD2sbdIZ X-Received: by 2002:a05:6a20:5b14:b0:1ac:3b81:9fd4 with SMTP id kl20-20020a056a205b1400b001ac3b819fd4mr9955808pzb.44.1713819329958; Mon, 22 Apr 2024 13:55:29 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713819329; cv=pass; d=google.com; s=arc-20160816; b=QLfYEiSkvDzNXafLZlKIm3JsOZ2FI/u0dyLW/cq/pojYnhyRjeblBtVHgLDudoytfS ++2x3TqC5tDsVxoPyj3LEr3pEVNsF1gh08gCuPdEKobZUqXqu80x8Fy/CjjZcS7OlL3E fdU3opoXECWHFCS8eXqY5KcW9QJQKQYPSw87tLj3EqqnoH26O6ILXmGDyJj8dngdktYv RdWX2F8RCJax/0Ye1k3Tdrre090GDj47MvpPEIRx9N1BkVsXtwvb4VN5LyjWdOFAbdyI LVWXUr51e9BUKoOGd2PQ41eYbK/2tq+t2wITLEWi4eBWx8A1ogKgOLbTZlf+0nCJNyw8 akOw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:message-id:subject:cc:to:from:date:dkim-signature; bh=KP+05mJ7YxMLvM3uYzMJDLXWsVyC5htycrFweggEdLA=; fh=Xh4xqQyCwdWeJu9y48KAUNIHwBlt91kcWOlyluja1l0=; b=X68k3CF40EQGLHvcnXBmgQrBPBcJfqxCZLO7hzJlk2WHBbK2nRKGg61wPvuNRFWC+q oOPzxWCKjau70DB70ELGVyK3BHnDcpkRvokKn2Spd9/1K4eZ1LioRrd4/ZrS28NfZys6 O6FvnpShdL/7BTkRIISnTg6fuLzu+x/FMZEz4fZyOGimsrJZpWYc/X1krj1YKMdmQF98 sajVe/NGWW5bck/kSygagkXo3NfSt6FWKXH4mfxiJl/zcRTpfvhYi32KfN9uFrEP1IRF IxUDwfOf+NgwoEggbG8QdaMRXraMTr92sYNnXp8IWdMdxoOGbqlqlqUeL14mjyUm9/ui SJNw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=uYhbbKXu; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-154018-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-154018-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 fd30-20020a056a002e9e00b006f2e94df727si2068812pfb.297.2024.04.22.13.55.29 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Apr 2024 13:55:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-154018-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; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=uYhbbKXu; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-154018-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-154018-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 92601283576 for ; Mon, 22 Apr 2024 20:55:29 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7473F1CAAE; Mon, 22 Apr 2024 20:55:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="uYhbbKXu" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 90C5D1C68D; Mon, 22 Apr 2024 20:55:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713819318; cv=none; b=Hb1NJdXhkhBDC4UDSbW021PH58WsqllW+QARIVF925QyxrCxJMBim5mU1zMoG4R7I+RQRU48P9tKzDMOQ4BGcdz7mWlLjG1BMCOSq9itwEzi7KuQxtQ+LnNDNeRCZiXByXzM3ilG/PH8PdiZDUoNLuXVyZqNud/+r0M63mZtbIQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713819318; c=relaxed/simple; bh=zOJayybj5bm2pTJSI0p6yN4sVWz2Z2kuEJqDXj404O4=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=B1+4PBN3XKuRW6lxCbS8UR3OIhgsHBu/rQaDjwyg+N1VI+kXsZ8D9l+CIb/DnvpOEjaVRbeAImsSYk1yQFdQ/EH+nvlP+qmcSpujfRzC9fypAiH2JDifsljgls1XxhoXoOnJeXCftLWGleKNDGJtNwu5Uk5ZL+0RUHHClbKtOIo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=uYhbbKXu; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8DC64C113CC; Mon, 22 Apr 2024 20:55:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1713819318; bh=zOJayybj5bm2pTJSI0p6yN4sVWz2Z2kuEJqDXj404O4=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=uYhbbKXu7jdLBINWaEFTHBD/uCrZDgA4cgyaXvHRb+qyaD3gMsMLS2RbyCG1wDMQE t4FooY18pGI0j1YPxkI5mWUSCASCC+B2L2xRAiepYsVBw9sFlsOrBpWnaOJpjeb0GA j8GlenStbonuWp/ducEx6UEa2+4eccGV1VHUG92G3CuGqG/4TQD1Q+ui4Sq0O+NOLj a1BYJMtwa0NidptbKm2L+vSXPUPidni41j0uRAn0J4MCEVeH3PTi5oCcNFlCOuqMqB nyCTKiFvA5t/5kLIXyoGQJLOfPY8dbfFrjG9JYikWmqskBxIS/onQDaXpiliCnoZsR DaL48nfu4sbuA== Date: Mon, 22 Apr 2024 17:55:15 -0300 From: Arnaldo Carvalho de Melo To: Namhyung Kim 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 Subject: Re: [PATCH v3 00/12] dso/dsos memory savings and clean up Message-ID: References: <20240410064214.2755936-1-irogers@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: On Mon, Apr 22, 2024 at 01:06:46PM -0700, Namhyung Kim wrote: > On Thu, Apr 11, 2024 at 11:42 AM 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.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 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 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. - Arnaldo