"GOT", but the "O" is a cute, smiling sun Index | Thread

Martin Pieuchot <mpi@openbsd.org>
Re: tog yield commit reverted
Tue, 4 Feb 2020 12:04:25 +0100

Download raw body.

On 04/02/20(Tue) 11:13, Stefan Sperling wrote:
> On Tue, Feb 04, 2020 at 10:58:43AM +0100, Martin Pieuchot wrote:
> > On 03/02/20(Mon) 19:13, Stefan Sperling wrote:
> > > FYI,
> > > 
> > > I had to revert commit 6b8a2b8fcd99 because it broke tog search.
> > > It's quite likely that this could be fixed differently?
> > 
> > That means pthread_yield() is used for synchronisation, which isn't
> > guaranteed.
> > 
> > Do you have more details about the "breakage"?  Where was the other
> > thread stuck?  Or why couldn't it make progress?
> You should be able to reproduce by running tog in /usr/src.
> Then search for commits from some developer (mpi or stsp) and try to
> move through the search with the 'n' key. Eventually you will hit it.
> Tog ends up spinning on the CPU in the main thread, which keeps drawing
> the log view over and over again and doesn't realize that the next match
> has (apparently) been found. And the log thread is sleeping here:

That suggests that the "next match" isn't correctly communicated between
the two threads.  Could you point me to the piece of code responsible for