RVM

Rationalize createVM code

Details

  • Type: Sub-task Sub-task
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: None
  • Fix Version/s: None
  • Labels:
    None
  • Number of attachments :
    1

Description

CreateVM is a routine in libvm.c that is responsible for starting the VM, it takes an argument as to whether to create the VM on a separate thread or not. On IA32 this argument is ignored. On PowerPC it is taken. The Intel createVM code with native threads always keeps the primordial thread alive, whereas the PowerPC code that starts the VM on a separate thread only keeps it alive as long as the boot thread hasn't reached boot completed. We should have a coherent story on what this code is doing.

Activity

Hide
Filip Pizlo added a comment -

On IA32/Linux we keep the primordial thread alive in a bizarre way because on some versions of Linux's pthreads, if the main() thread dies, the process dies with it.

Show
Filip Pizlo added a comment - On IA32/Linux we keep the primordial thread alive in a bizarre way because on some versions of Linux's pthreads, if the main() thread dies, the process dies with it.
Hide
Filip Pizlo added a comment -

Actually, OS X pthreads do the same thing. If main() exits, the process exits. I suppose that makes sense.

I'm changing the code now so that createVM no longer takes that silly argument. This is a nice little simplification. Will commit when it's confirmed to not break stuff.

Show
Filip Pizlo added a comment - Actually, OS X pthreads do the same thing. If main() exits, the process exits. I suppose that makes sense. I'm changing the code now so that createVM no longer takes that silly argument. This is a nice little simplification. Will commit when it's confirmed to not break stuff.
Hide
Filip Pizlo added a comment -

Patch to simplify createVM().

Show
Filip Pizlo added a comment - Patch to simplify createVM().
Hide
Filip Pizlo added a comment -

I've got a patch that does this; holding off on it because I want to see if I can fix some of these crashes.

Show
Filip Pizlo added a comment - I've got a patch that does this; holding off on it because I want to see if I can fix some of these crashes.
Hide
Filip Pizlo added a comment -

Fixed in r15640

Show
Filip Pizlo added a comment - Fixed in r15640

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: