[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHk-=wiOSyfW3sgccrfVtanZGUSnjFidSbaP3tg9wapydb-u6g@mail.gmail.com>
Date: Sun, 26 Jan 2025 10:34:16 -0800
From: Linus Torvalds <torvalds@...ux-foundation.org>
To: Oleg Nesterov <oleg@...hat.com>
Cc: Paolo Bonzini <pbonzini@...hat.com>, "Michael S. Tsirkin" <mst@...hat.com>,
Christian Brauner <brauner@...nel.org>, "Eric W. Biederman" <ebiederm@...ssion.com>, linux-kernel@...r.kernel.org,
kvm@...r.kernel.org
Subject: Re: [GIT PULL] KVM changes for Linux 6.14
On Sun, 26 Jan 2025 at 06:21, Oleg Nesterov <oleg@...hat.com> wrote:
>
> > Should we just add some flag to say "don't show this thread in this
> > context"?
>
> Not sure I understand... Looking at is_single_threaded() above I guess
> something like below should work (incomplete, in particular we need to
> chang first_tid() as well).
So yes, I was thinking something similar, but:
> But a PF_HIDDEN sub-thread will still be visible via /proc/$pid_of_PF_HIDDEN
>
> > We obviously still want to see it for management purposes,
> > so it's not like the thing should be entirely invisible,
>
> Can you explain?
I was literally thinking that instead of a "hidden" flag, it would be
a "self-hidden" flag.
So if somebody _else_ (notably the sysadmin) does "ps" they see the
kernel thread as a subthread.
But when you look at your own /proc/self/task/ listing, you only see
your own explicit threads. So that "is_singlethreaded()" logic works.
Maybe that's just too ugly for words, and the kvm workaround is better.
Linus
Powered by blists - more mailing lists