On Mon, 2 Dec 2024 15:25:54 +0100
Corinna Vinschen wrote:
> On Nov 29 20:58, Takashi Yano wrote:
> > On Wed, 27 Nov 2024 17:53:53 +0100
> > Corinna Vinschen wrote:
> > Hmmm, just setting THREAD_PRIORITY_NORMAL might be appropriate.
> > See v3 patch.
> > 
> > > The culprit of the behaviour you're seeing is the fact that *all*
> > > cygthread's are running with THREAD_PRIORITY_HIGHEST prio.
> > > 
> > > Maybe it's time to rethink this.  Most (none?) of the cygthreads really
> > > need highest priority.  This *may* have been useful when we only had a
> > > single CPU core, but these times have gone by, and cygthreads serve
> > > quite a few tasks which don't need THREAD_PRIORITY_HIGHEST.
> > > 
> > > We could try to start all threads with normal priority, and
> > > only threads suffering from priority problems could be moved to
> > > another prio.
> > 
> > Enough testing will be necessary for that, I think.
> 
> I see what you mean, so yeah, let's try it your way and cherry-pick
> into 3.5.

You mean applying the 4th patch to master branch, then apply another
patch which drops setting THREAD_PRIORITY_HIGHEST. Right?

> For the main branch, we should really try to drop setting all
> cygthreads to THREAD_PRIORITY_HIGHEST and leave it as the discretion
> of the thread itself to manage its priority.
> 
> Also, even if a higher prio is required for one thread or another,
> THREAD_PRIORITY_ABOVE_NORMAL might be sufficient in most cases.

Just in my short trial, there is no problem even without HIGHEST
proiority. I'd test that more.

-- 
Takashi Yano <takashi.y...@nifty.ne.jp>

Reply via email to