From: Tejun Heo Subject: Re: [PATCH bpf-next v5 4/8] bpf: Introduce cgroup iter Date: Thu, 28 Jul 2022 07:35:14 -1000 Message-ID: References: <20220722174829.3422466-1-yosryahmed@google.com> <20220722174829.3422466-5-yosryahmed@google.com> Mime-Version: 1.0 Return-path: 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; bh=QspELtFwrGd992ER4IywagKhOwPAd04XFlDr4WU6NiI=; b=mr2y8Nixp9iQYiaPkk1ld3aAvfXUbpKTeQ15WW56UqOrHJT7F6ygOyrLj1DDaCkTiT Btb3DBlO0KaSYzChaNk/QE5FisTCujb6TIsaKo4sDfHWGqDOXRI4z6wzpsc71giBkXAE UhjaXLzeSQ2FYrOgzCYkyCnkLpH0GqfV6Nyk/MXzhQHa6peGkiIqaB74rxQlVlC4CRMH 0m98YNTpKu9tGdkZ38JBZ7DKi8bs2oCmbjDgzVxUBHk1Hvy75bihPcG4YlLTiseIQnl8 KKQA0QK0h3Dm+kDcrY67cJ6p/LBOkjXG3TRzWjzbNxxOvxuxKDD6/OsYCaLaW7q16zWD FPqg== Sender: Tejun Heo Content-Disposition: inline In-Reply-To: List-ID: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Hao Luo Cc: Yosry Ahmed , Alexei Starovoitov , Daniel Borkmann , Andrii Nakryiko , Martin KaFai Lau , Song Liu , Yonghong Song , Zefan Li , Johannes Weiner , Shuah Khan , Michal Hocko , KP Singh , Benjamin Tissoires , John Fastabend , Michal =?iso-8859-1?Q?Koutn=FD?= , Roman Gushchin , David Rientjes , Stanislav Fomichev , Greg Thelen , Shakeel Butt On Thu, Jul 28, 2022 at 10:20:46AM -0700, Hao Luo wrote: ... > is a good feature of this convention. My thoughts: It seems that ID > may be better, for two reasons. First, because ID is stateless, the > userspace doesn't have to remember closing the FD. Second, using > different identifications in two directions (userspace specifies > cgroup using FD, while kernel reports cgroup using ID) introduces a > little complexity when connecting them together. Yeah, you can pass the IDs around different processes, print and log them in meaningful ways and so on because they're actual IDs, so my preference is towards using them for anything new. Thanks. -- tejun