Received: by 2002:a05:6602:18e:0:0:0:0 with SMTP id m14csp3483330ioo; Mon, 30 May 2022 03:08:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwJqXz93mzhTUXU868cBmzUhmjBIch1sxaVWaK6tPNUDmIJZ8XsTVfSOp5qaOL2O0zNuATJ X-Received: by 2002:a05:6402:35cd:b0:42b:7545:9726 with SMTP id z13-20020a05640235cd00b0042b75459726mr37157402edc.77.1653905327919; Mon, 30 May 2022 03:08:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653905327; cv=none; d=google.com; s=arc-20160816; b=NLM8IFS1sjbEBdZoxl+phYss19RASfMmWr3dHJEDrJCWmQMIiMaTyEvy6p28Go9IKQ u0GE2HdQRTNJxrwMpHOzb02djnUbfEgJ9kwTCDeELlDYkZQobwUePFY4LlJ6qFRckDGZ QHAIu3a4hF99LR8wf6g9mA9mpgVymL1AR9zo6ypzli1RxspvvUJsYd4z7ZCfNKAr38p2 ZnxiqM1O/bXqKjyaW9PJ1oBz/DPnZ+8WO4qApE/Ea5IlugyfBC/DA+AO4NJdrpwL0gXp DuTDCn+8U+yS6tD5GBHWrd7uDB/5wJGShcBzc3z6jZofJNiVeUaAToHfD+4cbITFdXAU f2Iw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject; bh=y+2ZNljfOKwnlqIW3IGcaSqtSkeG/RNoJSW+/bi8KmM=; b=0+LTQeeLquFvN2wOoAFc1j5ppS3Gnlah3NVsXUuriGTpXl/DHCz+MqylzR1LX8U9Mp YPXvztLNHtd7KwO49rEx0AzH9X3/NzLDBZTxeZ2dN7q0XnxMchMH9bFCVc2WlURpfnBM p3UCz4qdIaKzin+Hchmig3EyuS4UmDiiRyABXSeXxZmCtxdj1zZEf63Iusvt9/LVZQjM OPG4LZOASzpR1a3KS3l9C9pyjc7VqSvD7oQVAXKJc9JwOl6sYndiW8jnDQKacCuorm5c w5yAJr87YPn9qaCD48+7/kscRBOHf/s8xu6c0Hxbdu9qm86A042DTRdsP9kLut0t9LGP PjHA== 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i2-20020a170906850200b006fec719f47esi11829671ejx.565.2022.05.30.03.08.21; Mon, 30 May 2022 03:08:47 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232156AbiE3Bx6 (ORCPT + 99 others); Sun, 29 May 2022 21:53:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38358 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231463AbiE3Bx5 (ORCPT ); Sun, 29 May 2022 21:53:57 -0400 Received: from loongson.cn (mail.loongson.cn [114.242.206.163]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 8E1DA1A045; Sun, 29 May 2022 18:53:55 -0700 (PDT) Received: from [10.180.13.185] (unknown [10.180.13.185]) by mail.loongson.cn (Coremail) with SMTP id AQAAf9Cxf+avI5RiXrQHAA--.38136S3; Mon, 30 May 2022 09:53:51 +0800 (CST) Subject: Re: [PATCH] cgroup: wait for css offline when rmdir To: Tejun Heo Cc: Zefan Li , Johannes Weiner , cgroups@vger.kernel.org, linux-kernel@vger.kernel.org References: <1653619158-27607-1-git-send-email-zhanghongchen@loongson.cn> From: Hongchen Zhang Message-ID: Date: Mon, 30 May 2022 09:53:51 +0800 User-Agent: Mozilla/5.0 (X11; Linux loongarch64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-CM-TRANSID: AQAAf9Cxf+avI5RiXrQHAA--.38136S3 X-Coremail-Antispam: 1UD129KBjvdXoW7GryrCFWfKryfCry7Wry3Arb_yoWDtrX_Wa 4Iyryku3sruF1DCayUtr43ZayagrWj9rykJFWkWw4IkFyfKFWDWF17ur1fXwnxWF43trnr GrZIyr1Sqw4avjkaLaAFLSUrUUUUUb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUIcSsGvfJTRUUUbIxYjsxI4VWkKwAYFVCjjxCrM7AC8VAFwI0_Jr0_Gr1l1xkIjI8I 6I8E6xAIw20EY4v20xvaj40_Wr0E3s1l1IIY67AEw4v_Jr0_Jr4l8cAvFVAK0II2c7xJM2 8CjxkF64kEwVA0rcxSw2x7M28EF7xvwVC0I7IYx2IY67AKxVW5JVW7JwA2z4x0Y4vE2Ix0 cI8IcVCY1x0267AKxVWxJVW8Jr1l84ACjcxK6I8E87Iv67AKxVW8Jr0_Cr1UM28EF7xvwV C2z280aVCY1x0267AKxVW8Jr0_Cr1UM2AIxVAIcxkEcVAq07x20xvEncxIr21l5I8CrVAC Y4xI64kE6c02F40Ex7xfMcIj6xIIjxv20xvE14v26r1j6r18McIj6I8E87Iv67AKxVWUJV W8JwAm72CE4IkC6x0Yz7v_Jr0_Gr1lF7xvr2IY64vIr41lc7I2V7IY0VAS07AlzVAYIcxG 8wCY02Avz4vE-syl42xK82IYc2Ij64vIr41l4I8I3I0E4IkC6x0Yz7v_Jr0_Gr1lx2IqxV Aqx4xG67AKxVWUJVWUGwC20s026x8GjcxK67AKxVWUGVWUWwC2zVAF1VAY17CE14v26r12 6r1DMIIYrxkI7VAKI48JMIIF0xvE2Ix0cI8IcVAFwI0_Jr0_JF4lIxAIcVC0I7IYx2IY6x kF7I0E14v26r1j6r4UMIIF0xvE42xK8VAvwI8IcIk0rVWrZr1j6s0DMIIF0xvEx4A2jsIE 14v26r1j6r4UMIIF0xvEx4A2jsIEc7CjxVAFwI0_Jr0_GrUvcSsGvfC2KfnxnUUI43ZEXa 7IU5PpnJUUUUU== X-CM-SenderInfo: x2kd0w5krqwupkhqwqxorr0wxvrqhubq/ X-Spam-Status: No, score=-3.8 required=5.0 tests=BAYES_00,NICE_REPLY_A, SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham 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 On 2022/5/27 下午4:48, Tejun Heo wrote: > On Fri, May 27, 2022 at 10:39:18AM +0800, Hongchen Zhang wrote: >> when remove a cgroup dir, make sure all the csses associated which >> the cgroup are all offlined,so that we will be sure that the resources >> allocated by the csses are all freed when rmdir exit successfully. > > Offlining doesn't guarantee that resources are freed and there's no definite > time limit on how long it'd take to free all resources. e.g. for memcg, if > there isn't sufficient memory pressure, its page cache can remain > indefinitely. Is there something practical you're trying to achieve? > > Thanks. > Hi Tejun, When I test the LTP's memcg_test_3 testcase at 8 Node server,I get the -ENOMEM error,which caused by no avaliable idr found in mem_cgroup_idr. the reason is the use of idr in mem_cgroup_idr is too fast than the free.In the specific case,the idr is used and freed cyclically,so when we rmdir one cgroup dir, we can synchronize the idr free through wating for the memcg css offlined,and then we can use it the next cycle. Thanks.