Message ID | 20230119110350.2287325-1-yukuai1@huaweicloud.com |
---|---|
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp254816wrn; Thu, 19 Jan 2023 02:43:42 -0800 (PST) X-Google-Smtp-Source: AMrXdXtEAyWplL2Ov3kwnrk6zoF5mFbtZ5akrE4y2ROwI6gSvnOF8YDYCcE0NKpZdiQqWK+FzNaS X-Received: by 2002:a17:907:1621:b0:870:34c:97df with SMTP id hb33-20020a170907162100b00870034c97dfmr21881533ejc.4.1674125022140; Thu, 19 Jan 2023 02:43:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674125022; cv=none; d=google.com; s=arc-20160816; b=YohdRD+tgGQLEKXpYwzRGEbVKC5D5KhVOddqTANen9bsdYUF08LPH9sMuWwNJvvvTn FcHSLjjq19qW5OKmD0604UtaAUwtXVgwgiPd68kwf0+Y7h4G4H41bm59HRIXQRzfLwKh Jl5SsaC7DQ8vwziDptEoJW8EX7sGJZ6qVmmAyvph0st9ERyYcXf5CwSut7KovUhnF0IC 97da8bYq7fEEGI1veFXdJopwY4wg/8JCqNEhE34zveo4m1bNzzqQc57GpoJWNhIdNN/y hljDAFg3J+uMfZedBqHTSsveEmmfHj8UWIBFw74dfkAa0J6OyniVazK44RC7VFGGS9R+ b37g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=+LJ8ty3iW5rUG7uzsXPWC7fKNj+UxgVHzF0nz+ATr+0=; b=BbUvf+rDOjos7Uey5gb5I5zSwRemoNwIFxp6O2x6kNkmHE5A0uugvHHuglG+bbSApl BM882WW4rZ/BpDXhPT+dDwqxzXIla8uxItWWd14SlkgBLSJwvexx5E5mB+SJvvpQycQ/ sBFeENBS+/6hxRnYwGaIXuN1zOideBe6TLPs8iNvmwblnEMF2fecd54K2oMyeDuztfvu skMdgpWgn33CHSf2Aai5TLRc243FhZcLXou2Lrpbv/y2rAvHKnh7ADuQNg2nQxjFwNE6 wf/weA1Irsj4thwCA4JvPeRmsp51BHKahgLMhQg7G0JXhJGRT7BTssyLrSL9k//roAn0 zfPw== 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id xa13-20020a170906fd8d00b0084d221887dasi38018333ejb.469.2023.01.19.02.43.17; Thu, 19 Jan 2023 02:43:42 -0800 (PST) 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 S230050AbjASKjw (ORCPT <rfc822;pfffrao@gmail.com> + 99 others); Thu, 19 Jan 2023 05:39:52 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33938 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229760AbjASKjn (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 19 Jan 2023 05:39:43 -0500 Received: from dggsgout11.his.huawei.com (unknown [45.249.212.51]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7AFB02105; Thu, 19 Jan 2023 02:39:41 -0800 (PST) Received: from mail02.huawei.com (unknown [172.30.67.143]) by dggsgout11.his.huawei.com (SkyGuard) with ESMTP id 4NyJzC4dW0z4f41Sv; Thu, 19 Jan 2023 18:39:35 +0800 (CST) Received: from huaweicloud.com (unknown [10.175.127.227]) by APP3 (Coremail) with SMTP id _Ch0CgCnUyHmHclj45hSBw--.55879S4; Thu, 19 Jan 2023 18:39:36 +0800 (CST) From: Yu Kuai <yukuai1@huaweicloud.com> To: tj@kernel.org, hch@lst.de, josef@toxicpanda.com, axboe@kernel.dk Cc: cgroups@vger.kernel.org, linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, yukuai3@huawei.com, yukuai1@huaweicloud.com, yi.zhang@huawei.com, yangerkun@huawei.com Subject: [PATCH -next v3 0/3] blk-cgroup: make sure pd_free_fn() is called in order Date: Thu, 19 Jan 2023 19:03:47 +0800 Message-Id: <20230119110350.2287325-1-yukuai1@huaweicloud.com> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-CM-TRANSID: _Ch0CgCnUyHmHclj45hSBw--.55879S4 X-Coremail-Antispam: 1UD129KBjvJXoWrur4DtF13tw1rtrWxXr4xWFg_yoW8Jry3pF sxK3y5GrsxAFsrAa1aka12qa4Sgw4rJa4jgryft34rCrWqyrykCwn29ws8GFyUAr97GayU XrnI9Fyvk34jy37anT9S1TB71UUUUUUqnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDU0xBIdaVrnRJUUUv014x267AKxVW8JVW5JwAFc2x0x2IEx4CE42xK8VAvwI8IcIk0 rVWrJVCq3wAFIxvE14AKwVWUJVWUGwA2ocxC64kIII0Yj41l84x0c7CEw4AK67xGY2AK02 1l84ACjcxK6xIIjxv20xvE14v26F1j6w1UM28EF7xvwVC0I7IYx2IY6xkF7I0E14v26F4j 6r4UJwA2z4x0Y4vEx4A2jsIE14v26rxl6s0DM28EF7xvwVC2z280aVCY1x0267AKxVW0oV Cq3wAS0I0E0xvYzxvE52x082IY62kv0487Mc02F40EFcxC0VAKzVAqx4xG6I80ewAv7VC0 I7IYx2IY67AKxVWUJVWUGwAv7VC2z280aVAFwI0_Jr0_Gr1lOx8S6xCaFVCjc4AY6r1j6r 4UM4x0Y48IcxkI7VAKI48JM4x0x7Aq67IIx4CEVc8vx2IErcIFxwACI402YVCY1x02628v n2kIc2xKxwCF04k20xvY0x0EwIxGrwCFx2IqxVCFs4IE7xkEbVWUJVW8JwC20s026c02F4 0E14v26r1j6r18MI8I3I0E7480Y4vE14v26r106r1rMI8E67AF67kF1VAFwI0_Jw0_GFyl IxkGc2Ij64vIr41lIxAIcVC0I7IYx2IY67AKxVWUJVWUCwCI42IY6xIIjxv20xvEc7CjxV AFwI0_Gr0_Cr1lIxAIcVCF04k26cxKx2IYs7xG6rW3Jr0E3s1lIxAIcVC2z280aVAFwI0_ Jr0_Gr1lIxAIcVC2z280aVCY1x0267AKxVW8JVW8JrUvcSsGvfC2KfnxnUUI43ZEXa7VUb XdbUUUUUU== X-CM-SenderInfo: 51xn3trlr6x35dzhxuhorxvhhfrp/ X-CFilter-Loop: Reflected X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,KHOP_HELO_FCRDNS, MAY_BE_FORGED,SPF_HELO_NONE,SPF_NONE 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1755447318803139487?= X-GMAIL-MSGID: =?utf-8?q?1755447318803139487?= |
Series |
blk-cgroup: make sure pd_free_fn() is called in order
|
|
Message
Yu Kuai
Jan. 19, 2023, 11:03 a.m. UTC
From: Yu Kuai <yukuai3@huawei.com>
Changes in v3:
- add ack tag from Tejun for patch 1,2
- as suggested by Tejun, update commit message and comments in patch 3
The problem was found in iocost orignally([1]) that ioc can be freed in
ioc_pd_free(). And later we found that there are more problem in
iocost([2]).
After some discussion, as suggested by Tejun([3]), we decide to fix the
problem that parent pd can be freed before child pd in cgroup layer
first. And the problem in [1] will be fixed later if this patchset is
applied.
[1] https://lore.kernel.org/all/20221130132156.2836184-8-linan122@huawei.com/
[2] https://lore.kernel.org/all/aa924294-2f54-1b53-fc6e-e4f8fa019b14@huaweicloud.com/
[3] https://lore.kernel.org/all/20221227125502.541931-1-yukuai1@huaweicloud.com/
Yu Kuai (3):
blk-cgroup: dropping parent refcount after pd_free_fn() is done
blk-cgroup: support to track if policy is online
blk-cgroup: synchronize pd_free_fn() from blkg_free_workfn() and
blkcg_deactivate_policy()
block/blk-cgroup.c | 63 ++++++++++++++++++++++++++++++++----------
block/blk-cgroup.h | 1 +
include/linux/blkdev.h | 1 +
3 files changed, 50 insertions(+), 15 deletions(-)
Comments
On 1/19/23 4:03 AM, Yu Kuai wrote: > From: Yu Kuai <yukuai3@huawei.com> > > Changes in v3: > - add ack tag from Tejun for patch 1,2 > - as suggested by Tejun, update commit message and comments in patch 3 > > The problem was found in iocost orignally([1]) that ioc can be freed in > ioc_pd_free(). And later we found that there are more problem in > iocost([2]). > > After some discussion, as suggested by Tejun([3]), we decide to fix the > problem that parent pd can be freed before child pd in cgroup layer > first. And the problem in [1] will be fixed later if this patchset is > applied. Doesn't apply against for-6.3/block (or linux-next or my for-next, for that matter). Can you resend a tested one against for-6.3/block?
Hi, Jens 在 2023/01/20 2:54, Jens Axboe 写道: > On 1/19/23 4:03 AM, Yu Kuai wrote: >> From: Yu Kuai <yukuai3@huawei.com> >> >> Changes in v3: >> - add ack tag from Tejun for patch 1,2 >> - as suggested by Tejun, update commit message and comments in patch 3 >> >> The problem was found in iocost orignally([1]) that ioc can be freed in >> ioc_pd_free(). And later we found that there are more problem in >> iocost([2]). >> >> After some discussion, as suggested by Tejun([3]), we decide to fix the >> problem that parent pd can be freed before child pd in cgroup layer >> first. And the problem in [1] will be fixed later if this patchset is >> applied. > > Doesn't apply against for-6.3/block (or linux-next or my for-next, for > that matter). Can you resend a tested one against for-6.3/block? > This is weird, I just test latest linux-next, and I can apply this patchset on the top of following commit: For latest for-6.3/block, this patch 2 can't be applied because following commit is not here: e3ff8887e7db blk-cgroup: fix missing pd_online_fn() while activating policy But this patch is already merged into 6.2-rc5. Thanks, Kuai
On 1/28/23 11:06 PM, Yu Kuai wrote: > Hi, Jens > > 在 2023/01/20 2:54, Jens Axboe 写道: >> On 1/19/23 4:03 AM, Yu Kuai wrote: >>> From: Yu Kuai <yukuai3@huawei.com> >>> >>> Changes in v3: >>> - add ack tag from Tejun for patch 1,2 >>> - as suggested by Tejun, update commit message and comments in patch 3 >>> >>> The problem was found in iocost orignally([1]) that ioc can be freed in >>> ioc_pd_free(). And later we found that there are more problem in >>> iocost([2]). >>> >>> After some discussion, as suggested by Tejun([3]), we decide to fix the >>> problem that parent pd can be freed before child pd in cgroup layer >>> first. And the problem in [1] will be fixed later if this patchset is >>> applied. >> >> Doesn't apply against for-6.3/block (or linux-next or my for-next, for >> that matter). Can you resend a tested one against for-6.3/block? >> > > This is weird, I just test latest linux-next, and I can apply this > patchset on the top of following commit: > > For latest for-6.3/block, this patch 2 can't be applied because > following commit is not here: > > e3ff8887e7db blk-cgroup: fix missing pd_online_fn() while activating policy > > But this patch is already merged into 6.2-rc5. Since I have one more conflict, I think we'll just rebase for-6.3/block when -rc6 is out, and then it should apply cleanly.
On Thu, 19 Jan 2023 19:03:47 +0800, Yu Kuai wrote: > Changes in v3: > - add ack tag from Tejun for patch 1,2 > - as suggested by Tejun, update commit message and comments in patch 3 > > The problem was found in iocost orignally([1]) that ioc can be freed in > ioc_pd_free(). And later we found that there are more problem in > iocost([2]). > > [...] Applied, thanks! [1/3] blk-cgroup: dropping parent refcount after pd_free_fn() is done commit: c7241babf0855d8a6180cd1743ff0ec34de40b4e [2/3] blk-cgroup: support to track if policy is online commit: dfd6200a095440b663099d8d42f1efb0175a1ce3 [3/3] blk-cgroup: synchronize pd_free_fn() from blkg_free_workfn() and blkcg_deactivate_policy() commit: f1c006f1c6850c14040f8337753a63119bba39b9 Best regards,