You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@harmony.apache.org by Fan Bin <fa...@gmail.com> on 2006/10/30 13:40:22 UTC

[drlvm] what's the difference between the structure VM_thread and HyThread?

Hi all,

I'm now reading the lastest version of drlvm. Now I have a question about the thread management module. I see that there are three kinds of control blocks: HyThread, JVMTIThread and VM_thread. What's the difference of their rols? Especially HyThread and VM_thread. As far as I know, there is no HyThread at first.

Thanks,
Fan Bin

Re: [drlvm] what's the difference between the structure VM_thread and HyThread?

Posted by Xiao-Feng Li <xi...@gmail.com>.
On 10/30/06, Mikhail Fursov <mi...@gmail.com> wrote:
> Just my $0.02:
> Actually VM_thread contains thread-local data. The VM_thread is a thread
> local data by itself. HyThread keeps a pointer to it, so VM_thread is always
> accessed from HyThread.
> Some of the components, e.g. GCv4 and GCv5, keeps all thread local data in
> VM_thread, but others JIT, GC_CC use more up to date method and request TLS
> slots directly from TM.
>
> Today we are in a transition from the old model when all TLS data was stored
> in VM_thread to the new model - when every component requests TLS slots
> independently from TM

Agree with Nikolay and Mikhail, VM_Thread was used for all the thread
specific data of a JVM thread. The transition is to make VM_Thread
only for the threading module, one of all the modules that share
HyThread.

Thanks,
xiaofeng

> On 10/30/06, Nikolay Kuznetsov <ni...@gmail.com> wrote:
> >
> > Yes, this data is non threading and separate fields of VM_thread
> > structure should be replaced with independent values (data structures)
> > stored in TLS under separate keys.
> >
> > Nik.
> >
>
> --
> Mikhail Fursov
>
>

Re: [drlvm] what's the difference between the structure VM_thread and HyThread?

Posted by Mikhail Fursov <mi...@gmail.com>.
Just my $0.02:
Actually VM_thread contains thread-local data. The VM_thread is a thread
local data by itself. HyThread keeps a pointer to it, so VM_thread is always
accessed from HyThread.
Some of the components, e.g. GCv4 and GCv5, keeps all thread local data in
VM_thread, but others JIT, GC_CC use more up to date method and request TLS
slots directly from TM.

Today we are in a transition from the old model when all TLS data was stored
in VM_thread to the new model - when every component requests TLS slots
independently from TM

On 10/30/06, Nikolay Kuznetsov <ni...@gmail.com> wrote:
>
> Yes, this data is non threading and separate fields of VM_thread
> structure should be replaced with independent values (data structures)
> stored in TLS under separate keys.
>
> Nik.
>

-- 
Mikhail Fursov

Re: [drlvm] what's the difference between the structure VM_thread and HyThread?

Posted by Nikolay Kuznetsov <ni...@gmail.com>.
Yes, this data is non threading and separate fields of VM_thread
structure should be replaced with independent values (data structures)
stored in TLS under separate keys.

Nik.

On 10/30/06, Fan Bin <fa...@gmail.com> wrote:
> Thanks,  so you mean that there is only non threading data currently in VM_thread block, and maybe the VM_thread block will be replaced by TLS in HyThread, right?
>
> Bin
>
> ----- Original Message -----
> From: "Nikolay Kuznetsov" <ni...@gmail.com>
> To: <ha...@incubator.apache.org>
> Sent: Monday, October 30, 2006 9:13 PM
> Subject: Re: [drlvm] what's the difference between the structure VM_thread and HyThread?
>
>
> > Hello,
> >
> > this is legacy thread structure. You're right, there was no HyThread
> > at first, but VM_thread structure. Also different DRLVM modules used
> > to have dedicated fields in this structure. Further it was decided to
> > make threading module independent and make usage model of threading
> > module the same for all other modules(i.e use thread local storage for
> > module specific data). But since VM_thread structure usage was very
> > heavy it was also decided to leave all non threading data in VM_thread
> > and put it in TLS till better times (I mean, till this data will be
> > divided into module depended parts and also put into TLS under
> > different keys).
> >
> > Nik.
> >
> > On 10/30/06, Fan Bin <fa...@gmail.com> wrote:
> >> Hi all,
> >>
> >> I'm now reading the lastest version of drlvm. Now I have a question about the thread management module. I see that there are three kinds of control blocks: HyThread, JVMTIThread and VM_thread. What's the difference of their rols? Especially HyThread and VM_thread. As far as I know, there is no HyThread at first.
> >>
> >> Thanks,
> >> Fan Bin

Re: [drlvm] what's the difference between the structure VM_thread and HyThread?

Posted by Fan Bin <fa...@gmail.com>.
Thanks,  so you mean that there is only non threading data currently in VM_thread block, and maybe the VM_thread block will be replaced by TLS in HyThread, right?

Bin

----- Original Message ----- 
From: "Nikolay Kuznetsov" <ni...@gmail.com>
To: <ha...@incubator.apache.org>
Sent: Monday, October 30, 2006 9:13 PM
Subject: Re: [drlvm] what's the difference between the structure VM_thread and HyThread?


> Hello,
> 
> this is legacy thread structure. You're right, there was no HyThread
> at first, but VM_thread structure. Also different DRLVM modules used
> to have dedicated fields in this structure. Further it was decided to
> make threading module independent and make usage model of threading
> module the same for all other modules(i.e use thread local storage for
> module specific data). But since VM_thread structure usage was very
> heavy it was also decided to leave all non threading data in VM_thread
> and put it in TLS till better times (I mean, till this data will be
> divided into module depended parts and also put into TLS under
> different keys).
> 
> Nik.
> 
> On 10/30/06, Fan Bin <fa...@gmail.com> wrote:
>> Hi all,
>>
>> I'm now reading the lastest version of drlvm. Now I have a question about the thread management module. I see that there are three kinds of control blocks: HyThread, JVMTIThread and VM_thread. What's the difference of their rols? Especially HyThread and VM_thread. As far as I know, there is no HyThread at first.
>>
>> Thanks,
>> Fan Bin

Re: [drlvm] what's the difference between the structure VM_thread and HyThread?

Posted by Nikolay Kuznetsov <ni...@gmail.com>.
Hello,

this is legacy thread structure. You're right, there was no HyThread
at first, but VM_thread structure. Also different DRLVM modules used
to have dedicated fields in this structure. Further it was decided to
make threading module independent and make usage model of threading
module the same for all other modules(i.e use thread local storage for
module specific data). But since VM_thread structure usage was very
heavy it was also decided to leave all non threading data in VM_thread
and put it in TLS till better times (I mean, till this data will be
divided into module depended parts and also put into TLS under
different keys).

Nik.

On 10/30/06, Fan Bin <fa...@gmail.com> wrote:
> Hi all,
>
> I'm now reading the lastest version of drlvm. Now I have a question about the thread management module. I see that there are three kinds of control blocks: HyThread, JVMTIThread and VM_thread. What's the difference of their rols? Especially HyThread and VM_thread. As far as I know, there is no HyThread at first.
>
> Thanks,
> Fan Bin