That’s a strange place for a horn…

Why do I always end up playing with linkers?

This week is apparently the attack of the satanic linkers week. In both LAM 7.1 and the ISI logger project, I’m fighting with linkers to make them bend to my will. Which is probably my first mistake – I should just give up and let them bend me to their will. But I’m stubborn and believe that I’m smarter than your average piece of code, so on we fight.

On the LAM front, I’m trying to figure out why I can’t seem to intercept calls to deallocate_pages in the OS X libc memory management code. deallocate_pages is a call that should happen right before the call to vm_deallocatepages, which is the OS X equiv to sbrk() with a negative number for the second argument. Why do we need to do this, you might ask? Well, using networks like IB or Myrinet requires pinning pages in memory so that they are not moved around while a DMA transfer is going on. Pinning pages is really expensive, so you don’t unpin unless you really need to. So the bottom line is that you need to know when memory has been free()ed by the system, so that you don’t return memory to the system while it is still pinned. On most Unix systems, you just use ptmalloc and intercept all the calls to malloc(), free(), and friends. On OSX , it is a bit more complicated, since there is this crazy two-level namespace thing going on. So instead, we try to hook into the lowest level of things. Still not sure if this is going to work – need to spend some more time on the issue….

On the Logger front, it’s much simpler. We seem to be encoding the wrong path in an rpath somewhere, so we aren’t finding shared libraries at runtime in certain circumstances. Obviously, this isn’t a good thing, but is probably just a shell scripting error or something similar, rather than a major misunderstanding as to how the platform’s linker actually works. So all is probably going to be ok on this front in the next couple of days. At least, I hope so.

San Fran is a weird place

Went up to the bay area this weekend for the Bay to Breakers 12K race. Very entertaining race. For starters, there was a definite lack of port-a-potties in the starting area, yet there were many along the way. Follow that up with a group of guys who carried a fully operational bar (including the bartender and multiple kegs) the entire 12K and you kind of get the picture. Wandered around San Fran on Saturday with Rachel, which was entertaining – we only got lost 3 or 4 times… Which isn’t too bad, all things considered. Drove back Monday, which was more eventful than usual. A rock decided to cause significant damage to my windshield, so that kinda sucks.

Stupid Computers

Something evil has happened today such that I don’t seem to have an account on many of the OSL machines any more. This is probably going to take an afternoon to get worked out… Blah.