lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250208105821.1cdb54fc@pumpkin>
Date: Sat, 8 Feb 2025 10:58:21 +0000
From: David Laight <david.laight.linux@...il.com>
To: Ian Rogers <irogers@...gle.com>
Cc: Peter Zijlstra <peterz@...radead.org>, Ingo Molnar <mingo@...hat.com>,
 Arnaldo Carvalho de Melo <acme@...nel.org>, Namhyung Kim
 <namhyung@...nel.org>, Mark Rutland <mark.rutland@....com>, Alexander
 Shishkin <alexander.shishkin@...ux.intel.com>, Jiri Olsa
 <jolsa@...nel.org>, Adrian Hunter <adrian.hunter@...el.com>, Kan Liang
 <kan.liang@...ux.intel.com>, Sam James <sam@...too.org>, Jesper Juhl
 <jesperjuhl76@...il.com>, James Clark <james.clark@...aro.org>, Zhongqiu
 Han <quic_zhonhan@...cinc.com>, Yicong Yang <yangyicong@...ilicon.com>,
 Thomas Richter <tmricht@...ux.ibm.com>, Michael Petlan
 <mpetlan@...hat.com>, Veronika Molnarova <vmolnaro@...hat.com>, Anne Macedo
 <retpolanne@...teo.net>, Dominique Martinet <asmadeus@...ewreck.org>,
 Jean-Philippe Romain <jean-philippe.romain@...s.st.com>, Junhao He
 <hejunhao3@...wei.com>, linux-kernel@...r.kernel.org,
 linux-perf-users@...r.kernel.org, "Krzysztof Ɓopatowski"
 <krzysztof.m.lopatowski@...il.com>
Subject: Re: [PATCH v2 0/7] Add io_dir to avoid memory overhead from opendir

On Fri,  7 Feb 2025 15:24:41 -0800
Ian Rogers <irogers@...gle.com> wrote:

> glibc's opendir allocates a minimum of 32kb, when called recursively
> for a directory tree the memory consumption can add up - nearly 300kb
> during perf start-up when processing modules. Add a stack allocated
> variant of readdir sized a little more than 1kb

Does 300kB really matter?

You seem to be trading memory allocation against system calls.
My 'gut feel' is that the system call cost will dominate.
(Unless all the directories are small.)

There might, of course, be other code in glibc that is designed
to make it all slower than necessary.

	David

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ