Received: by 2002:a05:7412:b10a:b0:f3:1519:9f41 with SMTP id az10csp9110rdb; Wed, 29 Nov 2023 17:50:43 -0800 (PST) X-Google-Smtp-Source: AGHT+IErSVkhr2G6ekkuBiZxNEbyrUbxhXc2dRAarbF7AnrUB4aN/g2aMldERJBR9ZrvGcEyd5Vz X-Received: by 2002:a17:903:454:b0:1ce:65e9:29bb with SMTP id iw20-20020a170903045400b001ce65e929bbmr23093854plb.54.1701309043330; Wed, 29 Nov 2023 17:50:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701309043; cv=none; d=google.com; s=arc-20160816; b=N2YZlq2ztQycbBYPLmx7EZtc1rUgFXPb/4LIjVJF3F5WGqOqJfN5bWqjdJb10m/18Q 9vv2oYNNfuB1v9YIA7wzh44PJRtWqV3+FcpZ4CMY3KaH6aiVmJvrkgI8Gl7oWlFWD2Va /kXqrhjho96WQqzrB9eJE9PJKQ4QiE2Swgn6ZIj7/4u3XjvnevHQqr/wyQNghgNP8F2o 5hC4UfaP1inpx+v69KjGtGd0K6ycELv6Y7uRrOavWqr7B1FX3CKYv4O7YrdisMiVFNV1 YmE1gO9QedgBRtAP3aeYVcpOXDECfRGqFjTvOJpmrTasbyAchWnEb3CaWIyxwLoIvBqz TrhQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version; bh=k9kr5MVuurP9EvPn9J1PqtDuC8AZELZfp86UZg7mob4=; fh=aWa9tyepd0GWyBFjkZa5ys7uNwpZ1AjfSj0Mu1iuQbE=; b=X3Ak7b/fM1XdE5OfMvKbdHXj67tHj1Q9ZXbnrQ0TclIS5NAvsPmdRDwr3slxAzB4W2 6jeLmmwoPtDp+aLt9bsqO1TNd3jQd0hncNRXN9gJNuUqcAYtTLiE1yrghLe1Nj5aCDSo 8SkgQJ3ezpFlFdrUqxCLkC0WznUOYeK9vHkgLIJCVmeHHxZw5AfpOkVIkp749822NdDF qCj4q7CYfaV0SLljRkSeuSh0lx4Zc1Ovu0Sm4qJWeVC4KSyDWKo2HYDi/WC15j2AeQAp xni+slfWSo5S77wSZ/bkbGBZD+ini/Ib7JM4RGAdYt7ZUo16V8SAZwVhp6CGJgPNs8vs I3ww== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from howler.vger.email (howler.vger.email. [2620:137:e000::3:4]) by mx.google.com with ESMTPS id j21-20020a170902759500b001cfc6492730si74300pll.80.2023.11.29.17.50.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 Nov 2023 17:50:43 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) client-ip=2620:137:e000::3:4; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id 1A6F18085F98; Wed, 29 Nov 2023 17:50:20 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230074AbjK3BuF convert rfc822-to-8bit (ORCPT + 99 others); Wed, 29 Nov 2023 20:50:05 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33024 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234936AbjK3BuC (ORCPT ); Wed, 29 Nov 2023 20:50:02 -0500 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-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) 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: 8BIT X-Spam-Status: No, score=-1.0 required=5.0 tests=MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on howler.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Wed, 29 Nov 2023 17:50:20 -0800 (PST) On Mon, Nov 27, 2023 at 2:09 PM Ian Rogers 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. > > Signed-off-by: Ian Rogers Acked-by: Namhyung Kim Thanks, Namhyung