Home

Previous 20

Jul. 12th, 2008

Dirhash Low Memory Event Handling Patch

I now have some working code for my dirhash dynamic memory allocation Google Summer of Code project. It is currently being reviewed and needs further testing, but if you're feeling brave you can grab a patch against HEAD from my project page on the FreeBSD wiki.

What the new code does is add an event handler for vm_lowmem events. When one of these events happens, the kernel will try to delete dirhashes that have not been used for DH_RECLAIMAGE seconds. This is currently set to five seconds, but I have no idea if this will be an optimal time. A bit of benchmarking and testing will be necessary to sort that out. If all dirhashes have been used more recently than DH_RECLAIMAGE, instead the first unlocked dirhash on the TAILQ list used to keep track of them all will be deleted. Due to how the existing dirhash code organizes this list based on a scoring system, the first hash on the list should be a mix of the the least recently used and least frequently used.

If my code turns out to work as it should, then the default maximum memory for dirhash can be safely increased quite a bit. If the system has plenty of spare memory, then lots will be available for dirhashes. Then if the system becomes low on memory, some of this dirhash memory will automatically be freed up for use by whatever else needs it. Hopefully we'll see some performance improvements overall on systems with lots of memory that need to deal with large directories, but I haven't done the benchmarks yet.

Back Home in Stockholm

I returned home to Stockholm nearly two weeks ago, but haven't managed to find time to post anything since then. It's good to be home. I missed Emma a great deal and it has been wonderful to get to spend time with her again. The weather is quite nice, though we've had some humid and rainy days. I don't mind those so much though. The amount of sunlight is amazing! In the middle of the night the sky is still bright if you look north, and it's pretty much fully daylight here by around three in the morning.

I have a new apartment in Lappkärrsberget, or Lappis, a big student neighborhood north of Stockholm University. Yesterday was my second trip to Ikea to finish getting furniture for the new place. The room is a little smaller than the one I had previously, but much cheaper and quite cute. Emma and my good friend Heydar also live in Lappis so I can visit them or they me with just a couple of minutes walk instead of a 30-45 minute trip by bike or Tunnelbana. I have a road right out my window but it is usually fairly quiet, and there are lots of trees to look at. A bunch of cows have been brought in to a nearby field, so I get to listen to them mooing too! I'll take some pictures of the new apartment soon.

My sister and her husband came to visit from Washington DC shortly after I returned from SF. They spent a couple of days with me in Stockholm and that was pretty fun. They then went on to Helsinki, St. Petersburg, and Tallinn before they come back here in a sort of loop around the Baltic Sea. Emma and I are getting on the ferry to Tallinn tonight to meet up with them and we'll all come back to Stockholm together in a couple of days. I am excited for the trip. I love the big Baltic ferries/party boats. And I've never been to Estonia, nor did I ever even think about it before I came to Sweden.

Oh, yesterday I bought an iPhone, now that they are finally available legitimately in Sweden. It's quite cool, though it was annoying how I couldn't get iTunes to connect to Apple's servers for several hours yesterday to finish setting the thing up. I love new toys. I'm now locked into a two year abonnemang with Telia, so I guess I will be staying in Sweden for awhile!

Jun. 11th, 2008

Dirhash memory allocation update

The Summer of Code officially started a couple of weeks ago, so I've been getting started on my project. I've not written any actual code yet, but have been busy with other aspects of the project. First of all I have been reading a bit of documentation and code relevant to dirhash itself and FreeBSD memory management. I have a lot to learn, especially about the memory stuff. The two approaches I am looking at, mentioned in the USENIX paper by Ian Dowse and David Malone (my SoC mentor), are to either use the buffer cache for dirhash's memory so the VM can take care of providing memory as it is available, or to use a method for allocating memory where the kernel can signal for some to be freed in low memory situations, perhaps using the slab allocator.

I have also been learning a little bit about Perforce, the version control system used by FreeBSD for experimental projects. I have not used Perforce before this, and it is a bit different from the VCSs I've used before (CVS and Subversion). Also, I have done a bit of experimentation with the current dirhash implementation just to be sure that it can free memory it no longer needs. This was just a simple test where I created a directory with a couple of million entries, checked the vfs.ufs.dirhash_mem sysctl, removed the directory, then checked vfs.ufs.dirhash_mem again to make sure the memory used had decreased. It had. Finally, I sent off a brief proposal to do a talk about this project at EuroBSDCon 2008. Obviously I don't have much to create a talk with yet, but I should by the end of the summer. Plus, the second day of EuroBSDCon this year happens to fall on my birthday, and I think hanging out with fellow BSD nerds in France could be a fun birthday activity :)

May. 25th, 2008

New photos, Eurovision song contest

The day after I arrived in San Francisco was Bay to Breakers, so I immediately had an opportunity to take a lot of photos. Here are some of them. I avoided photographing the many naked people there were wandering around, so those should all be safe for work. I also took a few other photos while walking and biking around the city. San Francisco is a pretty nice looking place.

View from Alamo Square University of San Francisco Street I'm living on SF City Hall

Then, today was the finals for the Eurovision song contest. I wish I could have been in Sweden watching it with Emma and some friends, but I could at least get a live stream of it over the Internet. It was pretty entertaining. Dima Bilan from Russia won, but I liked other songs better, like the one from Iceland's Euroband. Sweden's entry from Charlotte Perelli sadly did not do very well in the voting. My favorite though was Baila el Chiki Chiki from Rodolfo Chikilicuatre in Spain:

Very amusing song. None of these videos are from the actual final contest performances because I couldn't find those on youtube yet. The whole contest can be streamed though, like the finals here.

May. 18th, 2008

In San Francisco

Today I made the long journey from Stockholm to San Francisco. I was a day later than intended, because yesterday I overslept massively and missed my flight--something that I have been doing far too often lately. I am now extremely tired because I got up about twenty-five hours ago and have spent much of that time in transit.

I bought some duty free akvavit in Stockholm and they tried to take it away from me in London. The airport security guy at Heathrow told me that Sweden is not part of the EU, and thus booze I bought there was not eligible to be duty free. I argued with him that in fact Sweden absolutely is part of the EU. He ultimately talked to his manager and they decided to let me through with my tasty akvavit anyway. Very weird.

My new flat is quite nice. It is somewhat furnished, but I need to make an Ikea trip to get the stuff it doesn't have yet. That will also give me an opportunity to buy some Swedish food that I will no longer be able to find readily at supermarkets. I'm living in the inner Richmond, which is not a neighborhood I've lived in before, so I'm going to need to explore to figure out where stuff is. Also, I'd really like to find a bike to ride. It would be great to be able to ride to work rather than take the bus.

I already miss Emma and feel homesick for Sweden. Riding BART into the city I felt like I've seen everything before, but it's become kind of foreign. It is strange to return to one's own country and not feel like it is home anymore. But I expect that I'll be keeping myself very busy in the coming weeks so the homesickness shouldn't be too bad.

Apr. 22nd, 2008

Trip to San Francisco

My employer is having me come over to the states for six weeks starting next month to do some extra work while I have time off from classes. I'll be in San Francisco from the 16th of May until the 28th of June. Get in touch with me if you want to hang out!

Mar. 29th, 2008

Switch to Movable Type

I've reworked my site once again. This time I'm using Movable Type to power everything. I've imported old entries I used to have on a now-defunct Typo powered blog, as well as more recent posts from my LiveJournal.

Mar. 27th, 2008

Norrland

Emma and I spent the last week in northern Sweden. We took the train (which was on time, comfortable, and from an easy-to-reach station, all unlike flying) to Härnösand, where she is from. From there we also took a day trip by car to Umeå. I had a nice time. I met her parents and some more of her friends. It was Easter so we used that as an excuse to eat lots of candy. Sadly the mild winter has affected norrland too, so there wasn't a lot of snow in Härnösand and Umeå, but there was certainly more than I've seen in Stockholm. It also got rather cold at times. I believe down to -14°C one night, which seems quite cold considering it is now spring. I took quite a few photos. Here are some of the ones I've uploaded to Flickr:

Bagarstuga Emma Hella handmade wooden skis Frozen sea
Tags:

Mar. 15th, 2008

Air travel is so lame

Well, I'm not in Kiruna. Thursday night my friends and I made our way to Arlanda airport to catch a quick flight to Kiruna. The flight was delayed, and some time after our supposed new departure time, someone who worked for the airline came and told us that there was a problem with radar or the radio in Kiruna, so no planes could land. She gave no estimate on when we'd get to leave. Several hours passed. Someone else finally came out around midnight or so and told us that they would not be able to fly tonight, and there would be another plane that could take us at 6 o'clock the following morning. After some deliberation, Emma and I decided that sleeping in the airport and having our time in Kiruna cut down quite a bit was a bunch of bullshit, and we were going to go home. Heydar, Lisa, and Antoine all decided they'd stick it out and take the morning flight. Emma and I got the airline to remove our luggage from the plane, collected it, bid our friends farewell as they looked for some nice benches to sleep on for a few hours, and took a rather expensive taxi ride back home.

I am not at all fond of flying anymore. Being on planes itself can occasionally be fun despite the cramped conditions and unpleasant airplane air, but all the crap about getting to inconveniently located airports, going through check-in and security queues, waiting for delayed flights, etc. has become so old. I am thinking I should try to only resort to air travel when I'm going to other continents. Short flights are quick and usually cheaper than trains, but I don't think all this cheap air travel we have nowadays is really worth the other costs it brings about. The cost to passengers in the rather low quality of service airlines can afford to provide makes the experience of flying not fun, and with what must be very low profit margins I don't see how airlines can afford to properly pay their employees. The environmental impact of so much air travel can't be good, either.

I am disappointed that I am missing out on cross country skiing, riding a snowmobile to the ice hotel, and going for a little trip by dog sled. I wanted to see some real snow and aurora borealis and sit in a sauna. I guess this will all have to wait for next winter now. But, in a couple of days Emma and I are going to take another trip. We're going to be visiting Härnösand for about a week, the town she is from, and possibly taking a little day trip up to Umeå as well. These places are in norrland so there will probably be a little snow up there too, but not the huge amounts that there likely still is in Kiruna.

On an unrelated note, I am currently experimenting with growing a beard. It is very strange.
Tags: ,

Feb. 25th, 2008

Skola, resa, och flickvän!

It's been awhile since I've posted much about what I'm up to. Life has been busy. After returning from my little trip to the US I started back into class right away. Currently I am taking courses in parallel computing, numerical differential equations (that one is mostly about finite volume methods for hyperbolic PDEs), and astrophysics. I'll be finished with astrophysics next month and in late March will be starting an advanced numerical analysis course. For the first couple of weeks of the semester I was slacking off a bit, but no time for that anymore. School is seriously kicking my ass now.

Next month during our spring/Easter break from classes I will be taking a trip with some folks up to Kiruna. I'm hoping to see some aurora borealis, an ice hotel, real snow (we had hardly any in Stockholm this winter), sitting in a sauna then jumping into that snow, cross country skiing, and perhaps going for some rides on a dog sled and/or snowmobile. I am really looking forward to this trip.

Other even more exciting news is that I now have a girlfriend! For the past few weeks I've been seeing a nice Swedish girl named Emma. She is awesome. I am quite happy.
Tags: ,

Feb. 9th, 2008

Caucus time!

Non-Americans, non-Washingtonians, and Republicans can safely ignore this post.

When I left San Francisco I decided to be a resident of Washington state again, so I'm voting with you Washingtonians out there in this primary. However, I didn't really know that voting in the Democratic primary in Washington is meaningless (correct me if I'm wrong about that) until today. I've already voted absentee. I wonder why they even send Democratic absentee ballots to people overseas if our votes don't mean anything. I wasted 10kr. on postage!

Anyway, please please go caucus today. I wish I could be there. And if you want my opinion on the matter, I think you ought to support Senator Obama.

Feb. 6th, 2008

Stockholm rail map for iPod Touch and iPhone

I found this cool Berlin subway map for iPhone/iPod Touch that Randy Reddig made. It was inspired by an NYC subway map by Khoi Vinh, and in turn inspired me to make one for SL's tunnelbana (metro/subway), lokalbanor (local train), and pendeltåg (commuter train) map of Stockholm. Download it here, unzip, and take a look at the readme.txt file to see how to put it on your iPod or iPhone.

I'd like to make one of these for SL's bus system too, but have not yet found a suitable map to chop up. The best Stockholm city bus map I've found doesn't have night busses on it. Most of the time when I'm taking the bus it's only because the t-bana is closed for the night, so having the night bus routes would be really useful!
Tags:

Feb. 5th, 2008

I am also a Lemming

I have given in. I am on Facebook now. I can't seem to figure out how to find many people to add as friends, and I don't want to give them my whole address book. So I guess look at my profile and me as a friend on there if you want.

Jan. 26th, 2008

I'm a Photographer!

One of my photos of Stockholm was found on Flickr and now has been added to the most recent version of the Schmap Stockholm Guide. See it here by mousing over the entry for Norrmalm in the list of neighborhoods.

Dec. 24th, 2007

London -> US

I'm currently at Heathrow airport, waiting for a delayed flight to Chicago. I'm guessing the delay is related to the massive amount of fog in London today. I don't want to pay for wifi here so I'll probably not post this for awhile. I've heard more American accents around me at this airport than I have since I was still in the US, I think. Apparently a lot of Americans go to London.

I was unexpectedly upgraded to business class! I got to go through fast track security, which meant very short lines. I'm excited. I think I will get a bed on the plane.

I have been in London only since early yesterday afternoon. I dropped off my things at Emma's house (old friend from way back when I lived on San Juan Island), then wandered around the city a little bit. I took some photos that I will upload to Flickr at some point in the near future.
Here are some random London observations )
So some time and a lot of miles have passed. I'm now in Chicago. My flight was very nice. Business class certainly makes an eight hour flight much nicer. I did have a bed. Wish I would have slept in it rather than watching movies and Top Gear the whole time. The flight ended up being nearly three hours late to depart, and as a result I missed my connection in Chicago. I have been at O'Hare airport now so far for over seven hours. I slept on a bench a little bit, and am now waiting to board a new flight... to St. Louis. There I transfer and finally get to Seattle some time around 11am PST.

This is the second time I've flown with a stopover in Chicago ever, and the second time I've been stuck in a Chicago airport for an ungodly number of hours due to missing said connection. I think I should take it as a sign and not book flights that stop in Chicago anymore. I am very glad my return trip from Seattle is non-stop to London. Also, my phone doesn't work at all. I suspect that it is not actually quad band, so I'm probably going to have to track down another one somewhere.
Tags:

Dec. 10th, 2007

Tentative plans in the US

So two weeks from now I'll be in Washington state, hanging out with my family. Here is my planned itinerary for where I'll be while I'm traveling to and in the US. Dates other than when I'm flying are approximate, and dates are in local time for whatever time zone I'm in at take off/landing. Confusing.

  • 22 December: Stockholm to London flight
    • 22 December - 23 December One night in London!
  • 23 December: London to Seattle flight
    • 23 December - ~27th December: Hanging out with family in Buckley
    • ~27th December - ~2nd January: Seattle
    • ~2nd January - ~4th January: Portland
    • ~4th January - 6th January: Seattle
  • 6 January: Seattle to SF flight
    • 6 January - 9 January: Work/hang out in San Francisco
  • 9 January: SF to Seattle flight
    • 9 January - 14 January: More family/studying time in Buckley
  • 14 January - 15th January: Seattle to London
    • 15 January - 16 January: One more night in London!
  • 16 January: London to Stockholm

And then on the 17th of January I get to try and take a final exam. Should be exciting!

I just got an unlocked quad-band mobile phone so I can use it pretty much anywhere in the world but South Korea and Japan. I will be using my Swedish phone number while I'm in Europe, and in the US I plan to switch to an American SIM card I bought on eBay which should soon arrive in the post. If you wish to be able to call/text me while I'm in the US please let me know and I will give you my number once I have it. Or if you want my Swedish number I can give you that too.

Tags:

Dec. 2nd, 2007

autocomplete=off on password fields sucks

The other day I decided to finally try and figure out why it is that Safari and other browsers do not offer to remember passwords for me on certain web sites. I regularly encounter this problem on some banking web sites, and the Yahoo login page for Flickr. Looks like the common way of keeping browsers from remembering passwords is the non-standard autocomplete HTML form attribute (assigned a value of "off"). This originally was a feature added to Microsoft Internet Explorer, but Firefox and Safari support it now, along with probably lots of other browsers.

The idea is presumably to keep users from storing passwords in an insecure manner on their computers. However, I use the built in keychain on Mac OS X, so it stores these remembered passwords in a fairly secure manner. Firefox's password manager also can encrypt stored passwords with a master passphrase if you tell it to. I don't memorize most of my passwords, so whenever I log in to a site that won't let me store a password in my keychain I have to go and decrypt a GnuPG encrypted text file I store all my passwords in. This essentially means I do the same thing as using the keychain would, but it requires doing pointless extra stupid work.

I should get to decide what my computer will do. I don't need web sites telling me how to secure things. This kind of behavior encourages users to choose crap passwords just so they can remember them, or re-use the same password for many sites/accounts. Both are, of course, bad for security.

Does anyone have any suggestions on how I can make Safari ignore the autocomplete form attribute? So far the only solutions I've seen for working around this involve patching WebCore, which seems scary and like total overkill. I don't want to use some other password manager either--I'd rather use the one built in to the OS. I tried using Privoxy with some filter rules, but gave up because it was taking too much effort and time to configure. I'm considering switching back to Firefox. I think it at has some extensions that will make it ignore this damn form attribute, or at least GreaseMonkey can do it for me. But it would be cool if I could just make Safari ignore this autocomplete attribute.
Tags:

Nov. 30th, 2007

LaTeX math fonts and Leopard do not get along

Well, I've got a new problem now. My math fonts for LaTeX are all kinds of screwed up, as described here and many other places. Sometimes if I view a PDF with LaTeX generated equations in it in Preview everything looks fine, but if I just change focus away from Preview and go back it could get screwed up. Here's a video of what happens:



Googling told me I should try wiping out ATS databases with the following commands:

atsutil databases -removeUser
sudo atsutil databases -remove

(Gotta log out after running just the removeUser option, and reboot if you do the full on remove as root). This seems to provide temporary reprieve, but I start experiencing font breakage again after not too long of messing around with generating PDFs from LaTeX.

So annoying! I really hope this is just a display bug and my PDFs are actually fine when I email them to people or print them. It would be nice if this somehow gets fixed soon.
Tags:

Some thoughts about Leopard

I bought the newest release of Mac OS X a little while back and installed it on my Macbook. I have mixed feelings about it. Read more... )

All this being said, overall I'm pretty happy with the upgrade. I hope some of the nastier problems I've encountered get ironed out soon in software updates.
Tags:

Nov. 27th, 2007

Heather and I go to Helsinki and have Swedish Thanksgiving

For the last week and a half or so I had [info]pacie visiting me here in Stockholm. She came all the way from Seattle. We had lots of fun. We went ice skating in Kungstragården, then met up with Heydar for bowling in Friedhemsplan and had food and drinks at Garlic and Shots, a place I'd been meaning to check out for months (and now can say I highly recommend).

Heather ice skating at Kungstragården Garlic and Shots


Then we took a weekend trip to Helsinki. That was also pretty awesome. The Viking Line ferries are quite nice, even better than the boat that I took to Poland. It was a 16 hour trip each way but there was plenty of entertainment available on the ship, including some quite decent restaurants. We only spent a day in Helsinki itself, but had a good time just wandering around looking at various sites.

My ship Sad statue Faces on the side of a building Three Smiths statue


As usual, if you click on any of these photos you can see several more on Flickr. The following week we did more chilling in Stockholm. I had to do some not terribly exciting things like go to class, do homework, and work. Heather decided we should have Thanksgiving dinner though, and tracked down a number of Thanskgiving-ish foods. We had turkey, mashed potatoes, and apple pie, not to mention some delicious Bordeaux. Stuffing, cranberries, and pumpkin pie could not be located, but it was an excellent feast nonetheless.

Heather headed back home on Saturday and I've returned to my attempts at working and studying. Who wants to visit me next?!

P.S.I've got a few short video clips I've taken on my camera I've been kind of wanting to post somewhere. Anyone have recommendations for good video sharing sites to upload to? I want something like Flickr for video, but dunno if there's anything closer to that than Youtube.
Tags: ,

Previous 20