linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Vipin Sharma <vipinsh@google.com>
To: Sean Christopherson <seanjc@google.com>
Cc: pbonzini@redhat.com, dmatlack@google.com, kvm@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] KVM: Move VM's worker kthreads back to the original cgroups before exiting.
Date: Tue, 14 Dec 2021 19:58:39 -0800	[thread overview]
Message-ID: <CAHVum0ec420f4dMseNRCJqzfLV+5V6NpmaBibPZDzsc15S_3oA@mail.gmail.com> (raw)
In-Reply-To: <YbjRb0XR7neyX/Gy@google.com>

On Tue, Dec 14, 2021 at 9:16 AM Sean Christopherson <seanjc@google.com> wrote:
>
> On Tue, Dec 14, 2021, Vipin Sharma wrote:
> > +     WARN_ON(cgroup_attach_task_all(kthreadd_task, current));
>
> As the build bot noted, kthreadd_task isn't exported, and I doubt you'll convince
> folks to let you export it.
>
> Why is it problematic for the kthread to linger in the cgroup?  Conceptually, it's
> not really wrong.

Issue comes when a process tries to clear up the resources when a VM
shutdown/dies. The process sometimes get an EBUSY error when it tries
to delete the cgroup directories which were created for that VM. It is
also difficult to know how many times to retry or how much time to
wait before the cgroup is empty. This issue is not always happening.

  reply	other threads:[~2021-12-15  3:59 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-14  5:07 [PATCH] KVM: Move VM's worker kthreads back to the original cgroups before exiting Vipin Sharma
2021-12-14 15:46 ` kernel test robot
2021-12-14 16:14 ` Lai Jiangshan
2021-12-22 20:14   ` Vipin Sharma
2021-12-14 17:16 ` Sean Christopherson
2021-12-15  3:58   ` Vipin Sharma [this message]
2021-12-14 17:44 ` kernel test robot
2021-12-15 18:27 ` Paolo Bonzini
2021-12-22 20:12   ` Vipin Sharma

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=CAHVum0ec420f4dMseNRCJqzfLV+5V6NpmaBibPZDzsc15S_3oA@mail.gmail.com \
    --to=vipinsh@google.com \
    --cc=dmatlack@google.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pbonzini@redhat.com \
    --cc=seanjc@google.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;
as well as URLs for NNTP newsgroup(s).