Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp235639rwb; Wed, 21 Sep 2022 21:22:11 -0700 (PDT) X-Google-Smtp-Source: AMsMyM53+pkzWIyEivlcEqEWovxja5FsZGCLsvuPsFoQWSPlu3oJjahDslr097Ma5wFYSJ5xNujx X-Received: by 2002:aa7:ca50:0:b0:44e:973b:461e with SMTP id j16-20020aa7ca50000000b0044e973b461emr1292732edt.414.1663820530839; Wed, 21 Sep 2022 21:22:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663820530; cv=none; d=google.com; s=arc-20160816; b=K7wGxuakspWDQeJwoamBG1vlKjy+IzaXY/w3oVy+vtVakgx4dF+I63lFhkXfCp0RRQ WCKfrpudiGrcvfrqq6PD/ua2pRnen5rb/9Yy4MPDRnFG79wDl7m/Lfy26rNPIzgfQpZ0 Mqgr0Ku3VoCaOQypKPbF3HooEbWS0DFkuGLZwxn6PXHN45gHFdsdh5ZHSWDUJLJWN1BJ YIrpbxRuqy3XDDyE1RlXiZd97tGS3NTiEJjchDFVPeKEchYW/hgQGNe8mJsVzYLhOkKm IZpbXyOIMOokAN61hnPAsTTXR1MHxCxNIPkDZg30zKUttyH0KG92GVWdqEYSlvhTPilF dS8A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version; bh=siMkRhF/SLAewvNkB/FUmhDXG1LTV2qd6SPVClT7RXM=; b=PoVXlARICrDcTObk9EBlRMjfhgyBLfSKAARHr6hfugIr6MPPX85o9ExRitw7b6jH+3 ijTukaUbt7vAzfuaCAQ2KYHHK38Whjn5bH2y4bRy6aupHrdR1ucc0x8lEcRJovSvMWg0 8E0/MTJTjXf806cMsWZ2hUCS5+jdRGRh15+UKOM3RFPDuosbuFov9wE5Vl6PcdmxAbsD TuAExD7AeWG4wjAAehacuRQs7Yz5rNzUZOS/LZ4W7VKvN6fVQsPsHJyA2X2PZaY20Oex l2M+rBBJfTm5A/A7hnjmAgSOZ5Ba2b8/gNalsEnRc1By44fyXNlyS+4Ka7y6bk+Dn47d I7vg== ARC-Authentication-Results: i=1; mx.google.com; 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 he43-20020a1709073dab00b00781bc50abefsi3881021ejc.387.2022.09.21.21.21.44; Wed, 21 Sep 2022 21:22:10 -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; 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 S229604AbiIVEIR (ORCPT + 99 others); Thu, 22 Sep 2022 00:08:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56160 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230371AbiIVEHy (ORCPT ); Thu, 22 Sep 2022 00:07:54 -0400 Received: from mail-oa1-f46.google.com (mail-oa1-f46.google.com [209.85.160.46]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 35783AF0D2; Wed, 21 Sep 2022 21:06:10 -0700 (PDT) Received: by mail-oa1-f46.google.com with SMTP id 586e51a60fabf-11e9a7135easo12152435fac.6; Wed, 21 Sep 2022 21:06:10 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date; bh=siMkRhF/SLAewvNkB/FUmhDXG1LTV2qd6SPVClT7RXM=; b=C4mhES5BtjVJNUwSFQaZTZsj0CD4u9wtDykPtVeSPaNVsbEWNrn1BYPtLlZIbYDKaZ Qd8eGmfGlzPfW9Y3JCXkAlkYO6miiZFvy2I9Bw2qy2awCvlJ7RNTlgg0Pc7O+FGLnWOg 3xxFgJJllc4QcqbquQbYcM+kGMk/PergZgCIa0ui84ijZElAX/1+18xsxnLIeDA9jfMu iR7CIkforn71dPL4nCcyQN9QH9AK+DNvXrLuym5+xAOfJDstP4gH9RX7c6uX/UzfF9gW UAjGgSs3lRlVCrWLaNGJV971mvxhB0O7TBje0PT2tQcTutU07oobpFjM/Do6WgGx/2eb fi/w== X-Gm-Message-State: ACrzQf0CD6PRr9mlTyxVPNuGW0/CvwQYuo0p1pwBdgjhNfEBuOnhL1PG KTPqr2lTm9Y61H+r6s1YYImmBTHcpzE1QlzlYulVdSfX X-Received: by 2002:a05:6870:524b:b0:12c:cfd2:81c0 with SMTP id o11-20020a056870524b00b0012ccfd281c0mr802693oai.209.1663819532230; Wed, 21 Sep 2022 21:05:32 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Namhyung Kim Date: Wed, 21 Sep 2022 21:05:20 -0700 Message-ID: Subject: Re: [PATCH v3 cgroup/for-5.20] cgroup: Replace cgroup->ancestor_ids[] with ->ancestors[] To: Tejun Heo Cc: cgroups , Zefan Li , =?UTF-8?Q?Michal_Koutn=C3=BD?= , Christian Brauner , linux-kernel , Kernel Team , Pablo Neira Ayuso , Arnaldo Carvalho de Melo , Jiri Olsa Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-1.4 required=5.0 tests=BAYES_00, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE, SPF_PASS 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 Hi Tejun, On Mon, Aug 15, 2022 at 2:17 PM Tejun Heo wrote: > > 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. I've realized that perf stat change needs backward compatibility. Will send a fix soon. Thanks, Namhyung