-H is userland threads, -k is kernel threads. I guess "kernel visible" was to distinguish between the old uthread where threads were handled in userland and not visible to the kernel, and rthread ...

--
 Sent from a phone, apologies for poor formatting.

On 11 September 2023 10:02:32 Marc Espie <marc.espie.open...@gmail.com> wrote:

I was reading through ps.1, which has two slightly different options
    -H      Also display information about kernel visible threads.
    -k      Also display information about kernel threads.


It's not at all obvious what the difference between these options might be.

From the log:
--------------------
revision 1.77
date: 2011/09/25 00:29:59;  author: guenther;  state: Exp;  lines: +5 -3;
Add -H option to show rthreads, hiding them by default

Diff from uwe@
--------------------
so slightly more info.

Looking at the code, now this is KERN_PROC_KTHREAD vs KERN_PROC_SHOW_THREADS
in kvm_getprocs(3).

Now KERN_PROC_KTHREAD is documented, but there is nothing about
KERN_PROC_SHOW_THREADS.

The code around (dothreads) in kvm* doesn't make things really obvious.

Reply via email to