All of lore.kernel.org
 help / color / mirror / Atom feed
From: Oleg Nesterov <oleg@redhat.com>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Paolo Bonzini <pbonzini@redhat.com>,
	"Michael S. Tsirkin" <mst@redhat.com>,
	Christian Brauner <brauner@kernel.org>,
	"Eric W. Biederman" <ebiederm@xmission.com>,
	linux-kernel@vger.kernel.org, kvm@vger.kernel.org
Subject: Re: [GIT PULL] KVM changes for Linux 6.14
Date: Sun, 26 Jan 2025 20:03:56 +0100	[thread overview]
Message-ID: <20250126190356.GC28135@redhat.com> (raw)
In-Reply-To: <20250126185354.GB28135@redhat.com>

On 01/26, Oleg Nesterov wrote:
>
> On 01/26, Linus Torvalds wrote:
> >
> > 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.
>
> Got it...
>
> I don't think we even need to detect the /proc/self/ or /proc/self-thread/
> case, next_tid() can just check same_thread_group,
>
> -	if (!(pos->flags & PF_HIDDEN)) {
> +	if (!(pos->flags & PF_HIDDEN) || !same_thread_group(current, pos))) {
>
> right ?

Or we can exclude them from /proc/whatever/task/ listing unconditionally,
and change next_tgid() to report them as if there are not sub-threads, iow
"ps ax" will show all the PF_HIDDEN tasks... I dunno.

Oleg.


  reply	other threads:[~2025-01-26 19:04 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-24 16:37 [GIT PULL] KVM changes for Linux 6.14 Paolo Bonzini
2025-01-25 14:30 ` Marc Zyngier
2025-01-25 18:12 ` Linus Torvalds
2025-01-25 18:31   ` Linus Torvalds
2025-01-27  3:55     ` Eric W. Biederman
2025-01-26 14:20   ` Oleg Nesterov
2025-01-26 18:34     ` Linus Torvalds
2025-01-26 18:53       ` Oleg Nesterov
2025-01-26 19:03         ` Oleg Nesterov [this message]
2025-01-26 19:16         ` Linus Torvalds
2025-01-27 14:09           ` Oleg Nesterov
2025-01-27 15:15             ` Paolo Bonzini
2025-02-04 14:19               ` Christian Brauner
2025-02-04 16:05                 ` Paolo Bonzini
2025-02-05 11:49                   ` Christian Brauner
2025-02-05 16:12                     ` Linus Torvalds
2025-02-26 12:14                     ` Christian Brauner
2025-02-26 19:03                       ` Oleg Nesterov
2025-02-27  8:15                         ` Christian Brauner
2025-01-25 18:16 ` Linus Torvalds
2025-01-27 15:24   ` Sean Christopherson
2025-01-27 15:25   ` Paolo Bonzini
2025-01-25 18:30 ` pr-tracker-bot

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=20250126190356.GC28135@redhat.com \
    --to=oleg@redhat.com \
    --cc=brauner@kernel.org \
    --cc=ebiederm@xmission.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mst@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=torvalds@linux-foundation.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.