On Mon, Sep 11, 2023 at 11:00:41AM +0100, Stuart Henderson wrote:
> -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.
> 
We can probably just say "userland threads"/"kernel threads" these days ?

I expect documenting KERN_PROC_SHOW_THREADS  would be a good idea /

Reply via email to