From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; dkim=none Received: from mail-pf1-f176.google.com (mail-pf1-f176.google.com [209.85.210.176]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2BE7C10DB; Wed, 29 Nov 2023 17:50:01 -0800 (PST) Received: by mail-pf1-f176.google.com with SMTP id d2e1a72fcca58-6cdde2aeb64so424605b3a.2; Wed, 29 Nov 2023 17:50:01 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701309000; x=1701913800; 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=UJ1p2+ISWRL6Js+YhCiI0715c5Y3azFj2GwPodT3Wto=; b=SGROZ8nevUWPztdDVQaRtjIg674a+M5vBA+12nwuEtkrPszMXdaLJ9lfnKfUi4EaO1 it8EnKpfJCuo1t+qZPkLguq6A9kthQat9+JVGqwFNKRTalxyEkJBDERwgaTUpBNvdZiW +0uNXxuGy7Sps1jIl4xnRvMKaTp/7oLAmNc1AWz3hj3vfPKG2I3H34B3NdrwGBdXVg/v zmzLgRnrURMTqaC2B99UAjQpsXa+bkYYGwglUBqvRFvKU0BF26nPuQwUBeAYsOyTooaq gT4A/W7uMIyXI+mkw/zeK6Hx0l0jMkivNdJWDMMoJtbwjDLsgYBj3hjZZ68aTRiMlnNp kVvg== X-Gm-Message-State: AOJu0YzlHhO+MS7zBKV+x5ImS9tuGqBF6ju2OT5IXGZduQcJZwva6H13 i0hKNtDninIVh3hzajDZdqYxTSjYHINMpXMV/eY= X-Google-Smtp-Source: AGHT+IE55/JJiB5fPNHVAw2uUqmDUlC6s9lgSp+ZZAVtpRvjYzw3lCKucPLV4W1GCbOVlU92JIzMXh9of2ulZeah7hM= X-Received: by 2002:a05:6a21:3392:b0:18c:ba47:74ea with SMTP id yy18-20020a056a21339200b0018cba4774eamr10946235pzb.31.1701309000571; Wed, 29 Nov 2023 17:50:00 -0800 (PST) Precedence: bulk X-Mailing-List: linux-perf-users@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20231127220902.1315692-1-irogers@google.com> <20231127220902.1315692-7-irogers@google.com> In-Reply-To: <20231127220902.1315692-7-irogers@google.com> From: Namhyung Kim Date: Wed, 29 Nov 2023 17:49:49 -0800 Message-ID: Subject: Re: [PATCH v5 06/50] tools lib api: Add io_dir an allocation free readdir alternative To: Ian Rogers Cc: Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Mark Rutland , Alexander Shishkin , Jiri Olsa , Adrian Hunter , Nick Terrell , Kan Liang , Andi Kleen , Kajol Jain , Athira Rajeev , Huacai Chen , Masami Hiramatsu , Vincent Whitchurch , "Steinar H. Gunderson" , Liam Howlett , Miguel Ojeda , Colin Ian King , Dmitrii Dolgov <9erthalion6@gmail.com>, Yang Jihong , Ming Wang , James Clark , K Prateek Nayak , Sean Christopherson , Leo Yan , Ravi Bangoria , German Gomez , Changbin Du , Paolo Bonzini , Li Dong , Sandipan Das , liuwenyu , linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, Guilherme Amadio Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Mon, Nov 27, 2023 at 2:09=E2=80=AFPM Ian Rogers wro= te: > > 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. > > Signed-off-by: Ian Rogers Acked-by: Namhyung Kim Thanks, Namhyung