From: Andi Kleen <ak@linux.intel.com>
To: Chengdong Li <chengdong.li@linux.alibaba.com>
Cc: ebiederm@xmission.com, peterz@infradead.org,
kjlx@templeofstupid.com, hbathini@linux.vnet.ibm.com,
brendan.d.gregg@gmail.com, linux-kernel@vger.kernel.org,
chengdong.licd@alibaba-inc.com
Subject: Re: Question: How to switch a process namespace by nsfs "device" and inode number directly?
Date: Wed, 12 Sep 2018 09:51:27 -0700 [thread overview]
Message-ID: <20180912165127.GX27886@tassilo.jf.intel.com> (raw)
In-Reply-To: <52b34c00-fb4d-7490-5a40-0b7328895ad1@linux.alibaba.com>
On Wed, Sep 12, 2018 at 10:05:27AM +0800, Chengdong Li wrote:
> Thank you, Andi!
>
> Yes, that's a situation, also it's an important one I guess.
>
> Another case is that a process running inside a container has exited but the
> container still alive.I think this is also a common case. The potential fix
> solutions I am thinking are following:
>
> - Using nsfs "device" and inum. This is why I am asking for your help. As we
> already have nsfs "device" and inum of each thread at least.
>
> - If the current thread has exited, it's probably the parent thread and the
> leader thread of that container are still alive. If we could have those
> threads' pid, then we could use setns.
This would require perf record to parse the data stream and do this
in time. There's no guarantee it can do that in time, and it would
cause a lot more overhead. Currently the data is just passed through.
>
> If the first item is not doable, I would like to try the second one.
Yes I think that's needed.
-Andi
prev parent reply other threads:[~2018-09-12 16:51 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-10 8:50 Chengdong Li
2018-09-10 16:02 ` Andi Kleen
2018-09-12 2:05 ` Chengdong Li
2018-09-12 16:51 ` Andi Kleen [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=20180912165127.GX27886@tassilo.jf.intel.com \
--to=ak@linux.intel.com \
--cc=brendan.d.gregg@gmail.com \
--cc=chengdong.li@linux.alibaba.com \
--cc=chengdong.licd@alibaba-inc.com \
--cc=ebiederm@xmission.com \
--cc=hbathini@linux.vnet.ibm.com \
--cc=kjlx@templeofstupid.com \
--cc=linux-kernel@vger.kernel.org \
--cc=peterz@infradead.org \
/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
Powered by JetHome