Received: by 2002:a05:6602:18e:0:0:0:0 with SMTP id m14csp289912ioo; Fri, 20 May 2022 22:32:08 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwq6oDYKTFAKMtuYlBQ5Mbb+vrHv/cw04p+TIMPMxnwBy2FRzEbm0DcMxGoxfuKsLKYbMsQ X-Received: by 2002:a17:906:f17:b0:6fe:94f6:cb8a with SMTP id z23-20020a1709060f1700b006fe94f6cb8amr10973265eji.456.1653111128587; Fri, 20 May 2022 22:32:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653111128; cv=none; d=google.com; s=arc-20160816; b=EOCIdQUSqujwDHuXBgnMmwxzWzkZzbAhBSetvrXK/0Vw1MAY+NoFeGrQ/CtUBIINwM qUm5CVVMn6cHwJ5f64w1dJpJDcKW2xIgvmFUx0vwq22Nmddq2m8WVphI4tYV9ySABl2M P/Egtl1v8cB8OEd2jD8N0RevG7YKOpLkNN+FL45d9SJuHbFMwdSE+EDtZHhkyfirpUOL +yRG9IeOy5414dJbeZt0MXCRKe6yYa99sOhSoruEYGm/IpHWvMvh5CKtwWOWuSyt1Gg6 PO30BIJIboeyyMhyXMMbFGCOuXjSKSxLnq4ci8QidfExuwxCk0aCRdaAlyqXigpunRkV waeg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:sender:dkim-signature; bh=+9muHQcSOPadjELaK4tBcIlD0k856uUfntUxfRazXLk=; b=sD+mjNiSX6YZjJOGxW4w0CJ40P2sosiraCsnEi/1J81JOdNwEEUEVpDI5bdpa+hSjh BNtypbj6h3dsjUkIanG4x3PCV3H035TKmHXCQ+jDAdMVc32gmovFzPS/B3irxEmrPBGz CMeoW10E53hS2D7HKCb4ZHMHR1Dvo9qj77VPXMovZmsie9NG7nlYKOcxHNG+jG1dFXqW oj1zIMyvVzKk40aq4EMXPRTu8OjPHqwok4qho/HKWyEvAXU0ogO5FirEyWuao5s4qUs7 4eITWARmke2KWL/+RBBDeTn4gYJberCMMy8gj0hLP/w5gYKGInEYgpXKfd/GtRGGTfBw o+WQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=Ao4YwNxE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id mp40-20020a1709071b2800b006fe97a3f6a3si2672125ejc.181.2022.05.20.22.31.41; Fri, 20 May 2022 22:32:08 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=Ao4YwNxE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1348512AbiETL1v (ORCPT + 99 others); Fri, 20 May 2022 07:27:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40802 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1348502AbiETL1m (ORCPT ); Fri, 20 May 2022 07:27:42 -0400 Received: from mail-pf1-x42d.google.com (mail-pf1-x42d.google.com [IPv6:2607:f8b0:4864:20::42d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7035D118009; Fri, 20 May 2022 04:27:41 -0700 (PDT) Received: by mail-pf1-x42d.google.com with SMTP id y199so7516308pfb.9; Fri, 20 May 2022 04:27:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=+9muHQcSOPadjELaK4tBcIlD0k856uUfntUxfRazXLk=; b=Ao4YwNxEANIqA3Dyk1b/rxmBdNuHL7GvoYBuDycoCTZQt/Vw7ghB/x/W1uDmrygwUh ZCOdrrAEkOWjqjv6YVqpVG4zrjzsDCqFbhMv46EPRRMudfif5CGT4m7OGe5qGXs2xCH6 gdzX9ygA7ovfxwBmlG4x9Irbwdb3DkHTyKqVVGELOPbMvf9k6p/xlMXriOgcjKGO4rLv pPIJvH/5FMQq9/loteNF5RYVpe4mtKF4+lZuVNiVrwpN6GT7rXoipiYq/z2HO9FxiVLd tyeTXejon/ephAWoN7uz4Bdz48sZvRU0qsArH1lB8+SpkRWYtZpMHOweZEBpupJDWxFz zTWw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to; bh=+9muHQcSOPadjELaK4tBcIlD0k856uUfntUxfRazXLk=; b=gFuk6fji04CaZOYXOOb06PNv0EwdB6EUqXbflQyPfaGs0/PqX7uyNR6qbwg+9+7O5H 6pe8eDsI46ZywuPTLyJr17vrLU3A5CDnPdekKLruMCRinEtvBa1iqp1REK9FFYsZtTXB yn6FWkfCeyCO2bj1aSbBnz6w7z1RqzrBNPS7nFfPA6heeVeeMfgY72aEis+EYFXQsM4i Q9+h22/QfaeZRG0R2MVZzOuau/wVeCPzfzHQJV+Nai0nkgyDUUdFvhlgCIj6Es0iaAPy nHTeypXBfko1BKATB7liAjOIrIsaeFt0gLMQZ6YCbrlQaTIJJUzrzauod82n4iqJJrVV WT6Q== X-Gm-Message-State: AOAM530iwUP6UA+0j374oiIOEZO/8r3Xpj7uRzHHvS3pOimC0wh0Ow7J 4LiI3QxvWv+3fOfYx4vgkCE= X-Received: by 2002:a05:6a00:1690:b0:517:cc9e:3e2d with SMTP id k16-20020a056a00169000b00517cc9e3e2dmr9548003pfc.0.1653046060372; Fri, 20 May 2022 04:27:40 -0700 (PDT) Received: from localhost ([2620:10d:c090:400::4:1761]) by smtp.gmail.com with ESMTPSA id m9-20020a1709026bc900b0015ea95948ebsm5445350plt.134.2022.05.20.04.27.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 May 2022 04:27:39 -0700 (PDT) Sender: Tejun Heo Date: Fri, 20 May 2022 01:27:38 -1000 From: Tejun Heo To: Yosry Ahmed Cc: Alexei Starovoitov , Daniel Borkmann , Andrii Nakryiko , Martin KaFai Lau , Song Liu , Yonghong Song , John Fastabend , KP Singh , Hao Luo , Zefan Li , Johannes Weiner , Shuah Khan , Roman Gushchin , Michal Hocko , Stanislav Fomichev , David Rientjes , Greg Thelen , Shakeel Butt , Linux Kernel Mailing List , Networking , bpf , Cgroups Subject: Re: [PATCH bpf-next v1 3/5] bpf: Introduce cgroup iter Message-ID: References: <20220520012133.1217211-1-yosryahmed@google.com> <20220520012133.1217211-4-yosryahmed@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-1.5 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, May 19, 2022 at 10:11:26PM -1000, Tejun Heo wrote: > If you *must* do the iterator, can you at least make it a proper iterator > which supports seeking? AFAICS there's nothing fundamentally preventing bpf > iterators from supporting seeking. Or is it that you need something which is > pinned to a cgroup so that you can emulate the directory structure? Or, alternatively, would it be possible to make a TEST_RUN_PROG to output a text file in bpffs? There just doesn't seem to be anything cgroup specific that the iterator is doing that can't be done with exposing a couple kfuncs. Thanks. -- tejun