harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Weldon Washburn" <weldon...@gmail.com>
Subject Re: [jira] Created: (HARMONY-4601) [drlvm][gc_gen] Thread termination in thread.SmallStackThreadTest is terribly slow
Date Mon, 06 Aug 2007 20:22:22 GMT
Some additional questions:
1)
I think the spin lock in question is gc_platform.h, line 273,
"#definetry_lock(x) (!atomic_cas32(&(x), LOCKED, FREE_LOCK))".  Is
this correct?
2)
What workloads do we know the spin lock prevents from running?  In other
words, is this spin lock preventing anyone from getting their work done?
3)
Is the only impact of the spin lock to waste CPU cycles?  Or is the spin
lock actually aggrevating other bugs in the system?  Is the spin lock
causing race conditions to appear that otherwise are rarely seen?  In other
words, does replacing the spin lock with a OS supported mutex actually fix a
bug or simply make a bug less likely to cause problems?


On 8/5/07, Gregory Shimansky <gshimansky@gmail.com> wrote:
>
> Weldon Washburn wrote:
> > Gegory, Xiao-Feng,
> > Thanks.  We will get to this problem during redesign/reimplementation.
> >       Weldon
>
> Ok maybe it is not really a bug, I agree. I just created it for tracking
> why thread.SmallStackThreadTest is excluded from the acceptance tests.
>
> > On 8/4/07, Xiao-Feng Li <xiaofeng.li@gmail.com> wrote:
> >> This issue is not a bug. It depends on TM's design for thread
> >> destruction. As I understand, Weldon suggested to serialized the
> >> process of thread termination/creation in TM. The gc_thread_kill
> >> should be invoked in the serialization part. If that's true, the spin
> >> lock can be removed. I put the spin lock there because TM redesign is
> >> not finished. When it's done, we will remove the spin lock, but then
> >> it's TM's responsibility to invoke gc_thread_kill at proper moment.
> >>
> >> Thanks,
> >> xiaofeng
> >>
> >> On 8/3/07, Gregory Shimansky (JIRA) <jira@apache.org> wrote:
> >>> [drlvm][gc_gen] Thread termination in thread.SmallStackThreadTest is
> >> terribly slow
> >>
> ----------------------------------------------------------------------------------
> >>>                  Key: HARMONY-4601
> >>>                  URL:
> https://issues.apache.org/jira/browse/HARMONY-4601
> >>>              Project: Harmony
> >>>           Issue Type: Bug
> >>>           Components: DRLVM
> >>>          Environment: Linux/ia32
> >>>             Reporter: Gregory Shimansky
> >>>
> >>>
> >>> The test creates a big number of threads (4000) that mostly do
> nothing.
> >> Threads are waiting and then are joined by the main thread. This mostly
> >> doesn't consume CPU on the machine. But then all of these threads go
> through
> >> gc_thread_kill function. It executes thread deletion from a list under
> a
> >> global spin-lock, so all 4000 threads are waiting on it using CPU at
> the
> >> same time since the lock spins inside of the loop.
> >>> This test usually doesn't finish on linux/ia32 (for some reason it
> works
> >> on other platforms) and times out. So I created this bug report to
> exclude
> >> it.
> >>> --
> >>> This message is automatically generated by JIRA.
> >>> -
> >>> You can reply to this email to add a comment to the issue online.
> >>>
> >>>
> >>
> >> --
> >> http://xiao-feng.blogspot.com
> >>
> >
> >
> >
>
>
> --
> Gregory
>
>


-- 
Weldon Washburn

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message