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: Mon, 10 Sep 2018 09:02:01 -0700 [thread overview]
Message-ID: <20180910160201.GV27886@tassilo.jf.intel.com> (raw)
In-Reply-To: <0eb9ec62-1c1b-5903-2db6-43ca571580b9@linux.alibaba.com>
On Mon, Sep 10, 2018 at 04:50:42PM +0800, Chengdong Li wrote:
> Hi folks,
>
> I am getting stuck by the lack of approach to switch process namespace by
> nsfs "device" and inode number in user-space, for example (mnt: 0xf0000000)
>
> From my best understanding, the normal way to do that is by setns system
> call. But setns only accept fd that refer to a opened namespace, sometimes
> we couldn't get it.
>
> For example: After perf record, perf report couldn't work well once the
> process that runs inside a container has exited, as the /proc/pid/ns doesn't
> exist anymore after process exit.
The kernel name space doesn't exist anymore at this point, so there is simply no way
to reconstruct it.
Perhaps would need some higher level side band data for perf, similar as what
is done for JITed code. Somehow the container run time needs to tell perf
where to find the code.
-Andi
next prev parent reply other threads:[~2018-09-10 16:02 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 [this message]
2018-09-12 2:05 ` Chengdong Li
2018-09-12 16:51 ` Andi Kleen
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=20180910160201.GV27886@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