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 26514C433F5 for ; Tue, 11 Oct 2022 00:18:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229795AbiJKASn (ORCPT ); Mon, 10 Oct 2022 20:18:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45890 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229716AbiJKAS3 (ORCPT ); Mon, 10 Oct 2022 20:18:29 -0400 Received: from mail-pf1-x42a.google.com (mail-pf1-x42a.google.com [IPv6:2607:f8b0:4864:20::42a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 301DB5C9E3; Mon, 10 Oct 2022 17:18:28 -0700 (PDT) Received: by mail-pf1-x42a.google.com with SMTP id 204so12054289pfx.10; Mon, 10 Oct 2022 17:18:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:sender:from:to:cc:subject:date:message-id :reply-to; bh=xm8Uch19R6NmYEbBkjcqkxQLt/DtdpQviAbU+5kyHeg=; b=HBXnfJdLfLouo9iEPM66BHhv/PtDj/o/wxFo1cOhKl/R5e1EWC6xOAGDiaw0T1frh+ QuCSxWZLMbBAtcHs2EZ+10XspyM7Vsi6Z2OnpUhJ2Y7m8RSSikhiqgQJ4lDMYZ425Yei bhO7e/Focu7uTT1h+Nx1QpZs4+BZ1Ze/bDoqcyY5Hav29eBAW8/8a9eNjtplJArxP8/x N/qDDfqGIiGI+SwaNDbzujkHfMOvd8T25luGAFsbVcgKx9FkDQqFSPhzZjHysqGag6Bu NWfJxrXndFcrX22F6bvnLh6q9rqZhP1FnjtBuhe7M46mjW95TnA0Bya8gFdyvjGQypH5 I5oQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:sender:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=xm8Uch19R6NmYEbBkjcqkxQLt/DtdpQviAbU+5kyHeg=; b=jfb2waQdL03g6cjQw4BcU/poBoNa0yz2q4IWrScDJcwsxXLT5AZCIQX6qpOGhB8MgW LuMfln4vaX//YUHRc0HT4GYTUt3GKuO/dxQQN7DKmwjnlNBFL0UlEpL4oqQlqJE6AN34 Nrppuz16cb+ygiyDHn2FVc14gbpufcrLbyJvA0kBCuTRGIenf+DB9UJXVFOKk8zdrx5m MYvbRjHpqVA2WAf3mLLnSG6yg9D5z/4s/BDE4Vb8/91Y2fvoHAgPunlaSVUDGthCgGS2 juRfJmr3P90AqWR8wh2YxHhfYCo3j6vHWY5g4hf5Q/f1puLsnlQLbjp5zDKnqULd0nE+ KLUA== X-Gm-Message-State: ACrzQf2bQvfwdv0k6W38Z/pXNOvziByGud/mvBC1mu2iqe7JALbNuuin cHPZeIkd+84OhtUw98B+hOM= X-Google-Smtp-Source: AMsMyM6bdfpr/R75A28nYjhdauGVB7hAOtJRLtv7DZ3d5D7k2S9Ypzqr8t3MG5ylFEVSyxAuiXUJDw== X-Received: by 2002:a63:942:0:b0:43c:428d:16a9 with SMTP id 63-20020a630942000000b0043c428d16a9mr18164718pgj.423.1665447507505; Mon, 10 Oct 2022 17:18:27 -0700 (PDT) Received: from localhost (2603-800c-1a02-1bae-a7fa-157f-969a-4cde.res6.spectrum.com. [2603:800c:1a02:1bae:a7fa:157f:969a:4cde]) by smtp.gmail.com with ESMTPSA id g20-20020a63dd54000000b0043c9da02729sm6852023pgj.6.2022.10.10.17.18.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 10 Oct 2022 17:18:27 -0700 (PDT) Sender: Tejun Heo Date: Mon, 10 Oct 2022 14:18:25 -1000 From: Tejun Heo To: Yosry Ahmed Cc: Zefan Li , Johannes Weiner , Yonghong Song , Alexei Starovoitov , Daniel Borkmann , Andrii Nakryiko , Martin KaFai Lau , Song Liu , John Fastabend , KP Singh , Stanislav Fomichev , Hao Luo , Jiri Olsa , cgroups@vger.kernel.org, linux-kernel@vger.kernel.org, bpf@vger.kernel.org Subject: Re: [PATCH v1 2/3] cgroup: add cgroup_all_get_from_[fd/file]() Message-ID: References: <20221010235845.3379019-1-yosryahmed@google.com> <20221010235845.3379019-3-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: bpf@vger.kernel.org On Mon, Oct 10, 2022 at 05:14:24PM -0700, Yosry Ahmed wrote: > On Mon, Oct 10, 2022 at 5:11 PM Tejun Heo wrote: > > > > On Mon, Oct 10, 2022 at 11:58:44PM +0000, Yosry Ahmed wrote: > > > Add cgroup_all_get_from_fd() and cgroup_all_get_from_file() that > > > support both cgroup1 and cgroup2. > > > > Looks generally good. How about cgroup_v1v2_ as the prefix? > > Thanks for taking a look. > > I don't have a strong opinion here. I picked cgroup_all_* vs > cgroup12_* or cgroup_v1v2_* because it's easier on the eyes. I'd rather have something which is really distinctive because the difference is rather subtle. > My preference would have been to rename the old versions to > cgroup_dfl_* instead, but like you said this might confuse existing > users. Yeah, it's confusing to have parallel file / id lookup functions with different behaviors and we've asssumed that all these from-userspace lookups are cgroup2 only for a while now. > Anyway, I am fine with whatever you choose. Let me know if you need me > to send a v2 for changing the prefix. Please send an updated version. I don't mind whether it's cgroup12_ or cgroup_v1v2_. Thanks. -- tejun