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 1BDECC19F2C for ; Tue, 16 Aug 2022 05:10:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232307AbiHPFKs (ORCPT ); Tue, 16 Aug 2022 01:10:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48548 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233223AbiHPFK3 (ORCPT ); Tue, 16 Aug 2022 01:10:29 -0400 Received: from mail-pj1-x1035.google.com (mail-pj1-x1035.google.com [IPv6:2607:f8b0:4864:20::1035]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8C66D23D; Mon, 15 Aug 2022 14:17:19 -0700 (PDT) Received: by mail-pj1-x1035.google.com with SMTP id q7-20020a17090a7a8700b001f300db8677so7828843pjf.5; Mon, 15 Aug 2022 14:17:19 -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; bh=gWg73cYfI3vn4ljKPn4NYzrF9DqHWCnArM+29mdyT+I=; b=JdnWdzKSg3O1vPGcLmn7GlIHnJU/Z/J6io8Fo9ke8TmxNBQVwOYCBoi66M69jVhNAb +9wgMaaslDSuSEQUV5pfj52eY1qRUbZ/LS4Z9UwUHPjivwimi+teLl0IixZ77o7nKeaO dUnInH76iDFaiADer3fl19//dgpQ7cSvpFJAb2rPPVX7xS1S87WXZay9b3LRUOHqOar+ xRF7l3DTI4EgW15ppokevTzJQTlke5q3Zm35MpdrMsOJq45vXPM3U8eswj6d7vgLeMhu uRJ5C4SKERyaTiDg7tN3KphglynvwlIZSAlXnAkUo/K1Zk5SR8+9WqhJVymF9vEN/TCN hAXA== 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; bh=gWg73cYfI3vn4ljKPn4NYzrF9DqHWCnArM+29mdyT+I=; b=SVpTQPwQw5H6WappGElqMErDR9XYq8yqJQwpUx3j9/ymvqPTLe9QsO3xepERZ6dLe4 Bf6oaf+Xo19vbM0DTjhVmWNc9TpMa8VWLn5KaXhHB0WZzrt2kOBuhJ9UQPl3S7M6nmH/ 1NJfSVcnueAYOOoSZ578s4u3AOOuQWIRBkyjyuyEYHA7pfU3I10wtxjyVG1+58IbQFFM zRBUdIEUFsTCrtFpRQsadDLb/4hWjFeA3WcrQLFgrXDzZvmHU5bOLmgGrrhJYjHGLaBs K1sDK/MdnTMsKkdLj88lW8W0IWlD8mVQi+JS2V/jz98Bu1FHHxbvz4l9GJ8e5sIoSjVA MH0A== X-Gm-Message-State: ACgBeo2I0TfpXk3bmyw3qy1tFCm1MJw3ZLwbM2ItKJ0rBzAAacLliihV YF73idRaVyZPruo9dvKj1JHCZq9/kf0= X-Google-Smtp-Source: AA6agR5mZ4yUj2OIUywAQUhn9sLjDDE0zs2XVNVDH0HtX3bSYz1GS4zEzTW7gZk/pWDAhRVVyQIj3w== X-Received: by 2002:a17:902:c405:b0:170:88b3:c108 with SMTP id k5-20020a170902c40500b0017088b3c108mr19034977plk.172.1660598238617; Mon, 15 Aug 2022 14:17:18 -0700 (PDT) Received: from localhost ([2620:10d:c090:400::5:3a69]) by smtp.gmail.com with ESMTPSA id f7-20020a623807000000b0052acb753b8bsm6901114pfa.158.2022.08.15.14.17.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Aug 2022 14:17:18 -0700 (PDT) Sender: Tejun Heo Date: Mon, 15 Aug 2022 11:17:16 -1000 From: Tejun Heo To: cgroups@vger.kernel.org, Zefan Li , Michal =?iso-8859-1?Q?Koutn=FD?= , Christian Brauner Cc: linux-kernel@vger.kernel.org, kernel-team@fb.com, Namhyung Kim , Pablo Neira Ayuso Subject: Re: [PATCH v3 cgroup/for-5.20] cgroup: Replace cgroup->ancestor_ids[] with ->ancestors[] Message-ID: References: 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 On Fri, Jul 29, 2022 at 01:10:16PM -1000, Tejun Heo wrote: > Every cgroup knows all its ancestors through its ->ancestor_ids[]. There's > no advantage to remembering the IDs instead of the pointers directly and > this makes the array useless for finding an actual ancestor cgroup forcing > cgroup_ancestor() to iteratively walk up the hierarchy instead. Let's > replace cgroup->ancestor_ids[] with ->ancestors[] and remove the walking-up > from cgroup_ancestor(). > > While at it, improve comments around cgroup_root->cgrp_ancestor_storage. > > This patch shouldn't cause user-visible behavior differences. > > v2: Update cgroup_ancestor() to use ->ancestors[]. > > v3: cgroup_root->cgrp_ancestor_storage's type is updated to match > cgroup->ancestors[]. Better comments. > > Signed-off-by: Tejun Heo > Acked-by: Namhyung Kim Applied to cgroup/for-6.1. -- tejun