From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2A114C433EF for ; Tue, 10 May 2022 22:07:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234619AbiEJWHx (ORCPT ); Tue, 10 May 2022 18:07:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57412 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231318AbiEJWHs (ORCPT ); Tue, 10 May 2022 18:07:48 -0400 Received: from mail-pl1-x62a.google.com (mail-pl1-x62a.google.com [IPv6:2607:f8b0:4864:20::62a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9BF625EBFE; Tue, 10 May 2022 15:07:47 -0700 (PDT) Received: by mail-pl1-x62a.google.com with SMTP id c11so45557plg.13; Tue, 10 May 2022 15:07:47 -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=/D0OGw2on3AvUmlzv6/hmtVTR0FwAvCOjEZGHeN3148=; b=D+gxb7yJZ8m9WsThtL1BuBBOK9yZLCBXHYCPmiuC3APueeYrvaQ54LuI6lVJ9KDkGH bq8GCDiooCm7ohQyIPpk/Kemojg6ouW6d3J42fNcrTqpgF5QKN4NAP95JpFbeuv6tpy8 eydzSFu4lyZgZrhRoHv/IdwFTGtzmVWzOiM/azxGTFxwwaR8UBZ8EFSiEh9bdNBHdb0B pxZ0jZeBQbGHGF+LgD5PRcmJm4mDJ/Ajquo0bduwqzhPfvj2IYFI0EwegKDL3MFvKjDU 4Hi5BLDA2H/KhFY4EuEhj+wqb2D5jVc74T94LZr/+9gDTT4iItLQjiB9E6fH5zaQNaPy bEeg== 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=/D0OGw2on3AvUmlzv6/hmtVTR0FwAvCOjEZGHeN3148=; b=pOJc0qRibX8J429WnIaQNxldeI9edZ2YZtkc854huV8xtvQiCrRHBqqB8SmQHjpxqk lKaRn6/lbyGOkrkbMLOCVzwJdxnmS9p62pOUD2/UcJJQ5c6c9WwTiZ7QqcEp0TBsHI/j JPRBa/RM6U4OmKposzkWRK/PXQyO5Dzuz26+QJyXaZFB/hv+RKI/I0b6wEuDfC1ZuvTl m/DZo9l8uueThrmBDk0rQ6itYd7pdRqneX1G98PxXbC/h0tAmq6Dz001q4Ot5LXzzAHg mLFxD8uZFx34GwI7D5eIyQamttHxFyQrA2s6mbRaeLNo6bLoYS1mRX1nrTXCUKXt+yhx /Z3A== X-Gm-Message-State: AOAM530qBNUu96ForQBo7sk0TmTZB+pzG/sEqTO2OFMN0qeqRDxX4BH/ YPgOVM9dNvsL0xcv4wGzMfI= X-Google-Smtp-Source: ABdhPJzxtINQ2mxuzNFYfiTFTPIUxv7J7/LYgiXNkci9t3/kBm0Ez1sdfLL3KriCyw+dsZt6P8aeSA== X-Received: by 2002:a17:902:ec8a:b0:15e:967b:f928 with SMTP id x10-20020a170902ec8a00b0015e967bf928mr23020423plg.133.1652220466953; Tue, 10 May 2022 15:07:46 -0700 (PDT) Received: from localhost ([2620:10d:c090:400::4:6c64]) by smtp.gmail.com with ESMTPSA id q7-20020a63d607000000b003c14af5062asm200577pgg.66.2022.05.10.15.07.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 May 2022 15:07:46 -0700 (PDT) Sender: Tejun Heo Date: Tue, 10 May 2022 12:07:44 -1000 From: Tejun Heo To: Hao Luo Cc: Yosry Ahmed , Alexei Starovoitov , Daniel Borkmann , Andrii Nakryiko , Martin KaFai Lau , Song Liu , Yonghong Song , John Fastabend , KP Singh , Zefan Li , Johannes Weiner , Shuah Khan , Roman Gushchin , Michal Hocko , Stanislav Fomichev , David Rientjes , Greg Thelen , Shakeel Butt , linux-kernel@vger.kernel.org, netdev@vger.kernel.org, bpf@vger.kernel.org, cgroups@vger.kernel.org Subject: Re: [RFC PATCH bpf-next 8/9] bpf: Introduce cgroup iter Message-ID: References: <20220510001807.4132027-1-yosryahmed@google.com> <20220510001807.4132027-9-yosryahmed@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello, On Tue, May 10, 2022 at 02:12:16PM -0700, Hao Luo wrote: > > Is there a reason why this can't be a proper iterator which supports > > lseek64() to locate a specific cgroup? > > > > There are two reasons: > > - Bpf_iter assumes no_llseek. I haven't looked closely on why this is > so and whether we can add its support. > > - Second, the name 'iter' in this patch is misleading. What this patch > really does is reusing the functionality of dumping in bpf_iter. > 'Dumper' is a better name. We want to create one file in bpffs for > each cgroup. We are essentially just iterating a set of one single > element. I see. I'm just shooting in the dark without context but at least in principle there's no reason why cgroups wouldn't be iterable, so it might be something worth at least thinking about before baking in the interface. Thanks. -- tejun