Scheduled ideas: Two threads with one "stone"
Gary Jennejohn
gljennjohn at gmail.com
Thu Jan 24 17:58:45 UTC 2019
On Thu, 24 Jan 2019 18:34:21 +0100
Jan Bramkamp <crest at rlwinm.de> wrote:
> On 24.01.19 17:32, Zaphod Beeblebrox wrote:
> > W.R.T. hyperthreading, it's come to my attention that FreeBSD has had some
> > recommendations for awhile --- namely hyperthreading is bad for secure
> > systems. That-is-to-say this is not about recent vulnerabilities of recent
> > Intel flavoured CPUs, but rather some thoughts on a different solution to a
> > different problem.
> >
> > I was building world on my laptop when I noticed how sucky it had become.
> > Now... I well know this is due to the fact that even a "nice -19 make -j32
> > buildworld" will slow the normal priority userland down by about 1/2
> > because the thread that is "me" on the CPU is competing with one of the
> > threads that is saturating the CPU. My normal priority thread will get
> > scheduled, but it competes equally for resources with threads at much lower
> > priority.
>
> You can use `idprio 10 ...` to minimize the impact of CPU bound tasks.
> If you want to go even further you could apply hierarchical resource
> limits on the make process. The idprio chainloader puts make and all its
> descendants into the idle scheduling class which allows normal time
> sharing threads to preempt them.
>
Or switch to SCHED_4BSD. I ran your command line and was still
able to watch a HD movie in full screen mode without a single
glitch. My Ryzen has 6 physical cores and 6 SMTs.
--
Gary Jennejohn
More information about the freebsd-hackers
mailing list