public inbox for linux-block@vger.kernel.org
 help / color / mirror / Atom feed
From: Tejun Heo <tj@kernel.org>
To: Yahu Gao <gaoyahu19@gmail.com>
Cc: Jens Axboe <axboe@kernel.dk>,
	cgroups@vger.kernel.org, linux-block@vger.kernel.org,
	Yahu Gao <yahugao@didiglobal.com>,
	Kunhai Dai <daikunhai@didiglobal.com>
Subject: Re: [PATCH] block,iocost: fix potential kernel NULL
Date: Fri, 13 May 2022 06:28:41 -1000	[thread overview]
Message-ID: <Yn6HOSAE/aAeMGLU@slm.duckdns.org> (raw)
In-Reply-To: <20220513145928.29766-2-gaoyahu19@gmail.com>

Hello,

On Fri, May 13, 2022 at 10:59:28PM +0800, Yahu Gao wrote:
> From: Yahu Gao <yahugao@didiglobal.com>
> 
> Some inode pinned dying memory cgroup and its parent destroyed at first.
> The parent's pd of iocost won't be allocated during function
> blkcg_activate_policy.
> Ignore the DYING CSS to avoid kernel NULL during iocost policy data init.

Thanks for the analysis and patch but I'm not quite sure the analysis is
correct. When a cgroup goes down, its blkgs are destroyed
blkcg_destroy_blkgs() which is invoked by blkcg_unpin_online() when its
online_pin reaches zero which is incremented and decremented recursively, so
an ancestor's blkgs should be destroyed before a descendant's if the code is
working as intended. Can you guys dig a bit deeper and why we're losing
ancestor blkgs before descendants?

Thanks.

-- 
tejun

      reply	other threads:[~2022-05-13 16:28 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-13 14:59 [PATCH 0/1] block,iocost: fix potential kernel NULL Yahu Gao
2022-05-13 14:59 ` [PATCH] " Yahu Gao
2022-05-13 16:28   ` Tejun Heo [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Yn6HOSAE/aAeMGLU@slm.duckdns.org \
    --to=tj@kernel.org \
    --cc=axboe@kernel.dk \
    --cc=cgroups@vger.kernel.org \
    --cc=daikunhai@didiglobal.com \
    --cc=gaoyahu19@gmail.com \
    --cc=linux-block@vger.kernel.org \
    --cc=yahugao@didiglobal.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox