idle threads say 100%

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

idle threads say 100%

Ted Unangst-6
I know there have been some changes in this area, but this seems like a
remaining bug.

Run top. Press S to show system processes. Observe idle1 and idle3 (the
hyperthreaded idles) stuck at 100%. With 0:00 time.

Now if you switch hw.smt=1 the 100% slowly ticks down, but the time
immediately jumps up to many hours.

Just a peculiarity I noticed. Perhaps there's some way to consolidate special
cases?

Reply | Threaded
Open this post in threaded view
|

Re: idle threads say 100%

Theo de Raadt-2
There was work before release which had to be pulled since it changed
API which some ports could not handle.

A new approach (adding a different API) is in the works from Scott.

However, it is possible there are other bugs in the way the cpus are
'parked'.

Or it could simply be bugs in top, which Scott is also addressing.

> I know there have been some changes in this area, but this seems like a
> remaining bug.
>
> Run top. Press S to show system processes. Observe idle1 and idle3 (the
> hyperthreaded idles) stuck at 100%. With 0:00 time.
>
> Now if you switch hw.smt=1 the 100% slowly ticks down, but the time
> immediately jumps up to many hours.
>
> Just a peculiarity I noticed. Perhaps there's some way to consolidate special
> cases?
>

Reply | Threaded
Open this post in threaded view
|

Re: idle threads say 100%

Mark Kettenis
> From: "Theo de Raadt" <[hidden email]>
> Date: Thu, 01 Nov 2018 14:21:43 -0600
>
> There was work before release which had to be pulled since it changed
> API which some ports could not handle.
>
> A new approach (adding a different API) is in the works from Scott.
>
> However, it is possible there are other bugs in the way the cpus are
> 'parked'.
>
> Or it could simply be bugs in top, which Scott is also addressing.

I think Ted is pointing out a different issue here that doesn't really
have anything to do with SMT.  The issue is that in some cases we end
up with CPUs reporting being 100% busy running the idle thread instead
of reporting being 100% idle.  This happens quite a lot on machines
with lots of CPUs immediately after they are booted.  Usually this
funny state disappears after some time.

An idle CPU is of course running the idle thread, so in that sense
this isn't super-strange.  But it does indicate there is some kind of
accounting issue.  I have a feeling this happens before any processes
have been scheduled on these CPUs.  But I've never found the problem...

> > I know there have been some changes in this area, but this seems like a
> > remaining bug.
> >
> > Run top. Press S to show system processes. Observe idle1 and idle3 (the
> > hyperthreaded idles) stuck at 100%. With 0:00 time.
> >
> > Now if you switch hw.smt=1 the 100% slowly ticks down, but the time
> > immediately jumps up to many hours.
> >
> > Just a peculiarity I noticed. Perhaps there's some way to consolidate special
> > cases?
> >
>
>