A blog about programming topics, mostly JVM, Linux kernel, and x86 related things.

Monday, October 29, 2007

revoke() System Call Status Update

I haven't been hacking on Jato as I've tried to beat the revoke system call into shape so that it's ready for inclusion when the merge window for Linux 2.6.25 opens. It's progressing nicely now but there's still some things that needs to be done:


  • Fix mmap(2) not to let user-space create new mappings while the revoke operation is in progress

  • Make sure we revoke all private and shared mappings created by fork(2) during a revoke operation

  • Kill pending read operations without messing up the read(2) fast-path

  • Make sure the changed struct file members are actually used by everyone after we return from the revoke system call


Implementing revoke has turned out to be bit painful but lets hope I can tackle these soon. Otherwise revoke will probably not be merged until 2.6.26 or later...

Friday, October 19, 2007

Haskell, Parsec, and QuickCheck

I got totally side-tracked today from my regular weekly Jato hacking as I started looking into writing a C compiler in Haskell. What really got me interested was this blog post because of two things: Parsec looks really cool for constructing parsers and the whole QuickCheck thing is totally new way of writing executable specifications of the software to me. It's not entirely clear how you're supposed to specify the other stuff such as semantic analysis, instruction selection, register allocation, and code emission with QuickCheck though. And yeah, I haven't written a single line of Haskell (or of any function language for that matter) so I figured it's about time I learned some.

As I really should get back to hacking the register allocator in Jato and I did spend most of the fall of 2005 writing a C compiler in Ruby (while I was supposed to be studying), I am trying to convince Tuomas to do all the hard work.

Sunday, October 7, 2007

Linear Scan Register Allocation in the Hotspot Client Compiler

While trying to figure out how to implement interval splitting in the register allocator, I bumped into Christian Wimmer's master's thesis which is excellent read for anyone interested in how the register allocator in Hotspot client compiler really works.