Monthly Archives: December 2013

Who Is This Spoiled Princess?

This past weekend, I got a real good look at my greatest enemy.

It started Friday morning–before that, actually. I had started on my Toastmasters speech a week ago. For some reason, though, my practice kept falling apart. I simultaneously approached and avoided the speech all Thursday afternoon and night (yes, I was up all night); then after a last few broken run-through in the car on the way, accepted that I’d have to ad lib my way through it. I did fine–not my best, but fine. The other speaker, an accomplished and seasoned Toastmaster, gave a 2 to 3 minute speech, and brought down the house when she gave a member a gift on behalf of the club during Table Topics. Because of the way those events fell, she was voted best Table Topics for the meeting, and the club let me have the Best Speaker’s ribbon. “I don’t deserve this,” I thought as I sheepishly accepted it.

From there, I went to the Dojo. When I first started working there, I didn’t want to hog any of the semi-secluded tables around the edge of the room, which I thought I should leave for regulars and “real” geeks. So I took a seat at the emptiest location, in the center of the room. I sat in that same general area from then on out of habit. Then on this day, forgetting about happy hour, I stayed later than usual. At least four people I knew who had come to socialize came through, one at a time, and I shared a big smile and a wave with each one of them. One of them, a famous geek with a Wikipedia page, chatted with me for some time–he was duly impressed that I was working on the kernel, and he glowed with the respect I had just earned from him. I felt warm and happy as I drove home that night, my internal vision filled with happy smiling faces.

But there was one thought that kept popping up that evening and the next day, a thought I tried to tell myself was insignificant. I wasn’t sitting in the middle of an empty room just so people would see me, I thought. But I had been there. Haughty little princess, sitting on my throne and soaking up the attention.

I couldn’t bring myself to settle into my work the next day. I wasted time through the evening and night until about 8am, when I was forcing myself to finish a game of sudoku that I actually dreaded and loathed, even though I was repeatedly falling forward in my chair from lack of sleep. The last semi-coherent thought I identified before I finally pulled myself out of the trance was “Good, another half hour down the drain where it belongs. You have no right to that time or to the pride of that finished work. When you throw it away, you understand that you’re not special.”

Guilt. Guilt because earning money isn’t supposed to be fascination and joy, it’s supposed to be misery in a Bullseye store. Guilt because I’m supposed to be silent and invisible, not be seeking attention with a blog and a social media presence. Guilt because a hot new laptop is supposed to be a frivolous toy, not a tool to get the job done. Guilt because I’m supposed to be all alone on the playground, hated and rejected, not immersed in a community of supporters and kindred spirits. Guilt because I’m always supposed to be a loser, not a living, acting human being.

Getting the guilt off my back will be the real challenge these three months. Understanding the kernel’s MMU will be trivial compared to that.

I have at least one tool I can use: visualization. I got through the application period, and several Toastmasters contests, by picturing myself working, practicing and succeeding. Even though I knew failure was a distinct possibility, and I let that knowledge drive me harder, I never allowed myself to dwell on the image of it. Next, I can visualize myself introspecting, identifying the guilt and the fact that it is unearned, and saying No.

My New Year’s resolution last year was to advance my career, which I did; but the real resolution was to cultivate the mindset to allow it to happen. The game is now leveling up.

Fridie Spidie: Loving Mommy

Wolf spider with babies

From the photographer’s blog post:

This particular spider captured my attention in a way I hadn’t expected. When you’re shining for spiders using a headlamp, you usually see just a few reflections from their large forward facing eyes. When my lamp light shone on this one, however, I thought I’d found a walking jewel. Light reflected from all the eyes of the babies she carried on her back, as if from a multifaceted gemstone!

Image by Troy Bartlett.

My SCALE 12x proposal

I’ve been asked by the OPW administrators to speak at the Linux Collaboration Summit in March, assuming it works out for them. Usually, an appropriate conference is chosen each round, and a session is scheduled for the interns to give lightning talks. Since I’m the only kernel intern in North America, however, I might end up with the whole session to myself (we’ll see). I’ve started planning my talk already, and while I’m at it, why not submit it to SCALE too? Hope I get accepted–cross your fingers for me!

“Hacking the Kernel, Hacking Myself”

I was chosen, out of eighteen successful applicants, to be one of four Linux kernel interns through the Gnome Outreach Program for Women. This is the story of my journey from a frustrated retail worker, dreaming of writing code for a living, to a full fledged kernel developer. It’s about the technical aspects of my project, which is updating the swapoff algorithm to be of linear complexity instead of quadratic. It’s also about my participation in the OPW program and the opportunities it offered me, both in terms of mentoring and support and in opening the door to my career. Finally, it’s about how I grew and changed as a coder and a person as I rose to the challenge and broke into the industry.

My talk will be made up of several stories, each about a pivotal moment for me and for my code. Because my code and I grow and develop together, the stories will have technical discussions of my work with the kernel’s virtual memory subsystem intertwined with descriptions of my learning and creating processes, my relationships with my mentors and other members of my support team, and my identity as a coder. I’ll also talk about the Outreach Program for Women, how it works, and its value in bringing new contributors to the fold.

The first story will be about the application process, which was a transformative process in itself. What seemed like an army of talented, hungry coders flooded the opw-kernel list with patch after patch for forty days. Did I measure up against them? The next story will be about my first week on the job. Now it was time for the real test. Did I have both the chops and the attitude? As for the rest of the stories, they’ll be surprises, because I haven’t lived them yet. The deadline for this proposal is five days after the start of the internship period, and the conference is three weeks before its end, so I’ll just have to wait and see.

The First Week is Always the Worst…

…or so I’ve been told. Well, if after the absolute bliss of the past week and a half, if it can only go up from here, I can’t wait to see how awesome this internship will get!

Don’t get me wrong; it’s been challenging, for sure. I’ve pushed myself, panicked, made some humiliating mistakes, hit the wall, and given up at the end of the day with a brain that felt like it was soaked in blackstrap molasses. I wouldn’t have it any other way. The bigger the challenge, the bigger the payoff, both in terms of self esteem and the utterly fascinating things I’m learning.

I couldn’t enumerate them, because there are so many, and because I’m not totally clear on them myself yet.

I’ve learned how the kernel keeps sets of data objects (such as struct pages, which represent pages of virtual memory) on a string like beads by running a struct list_head through them.

struct page {
        /* First double word block */
        unsigned long flags;
...
       struct list_head lru; 
...

I’ve learned how it uses this method to sort pages into four Least Recently Used lists: active and inactive file pages (which don’t need to go to swap space, because they’re backed by the original file on disk), and active and inactive anonymous pages (which have no file or device backing them). It uses these lists to choose which pages will be banished to swap when the time comes.

I’ve learned how the kernel finds a previously banished page in swap space and reads it back in. The location in swap space is stored in an unsigned long, so that it can fit into a page table entry. Some bits specify which swap area the page is in (there can be up to 32), and some specify the offset from the start of the swap area where the page is to be found. There are macros to sort it all out.

I’ve learned what a system call looks like within the kernel code. It’s just a function with its header replaced by a macro, like this: SYSCALL_DEFINE1(swapoff, const char __user *, specialfile).

I’ll stop there.

In the coming week, I hope to fit all these and more together into a clear working map of the Linux memory manager. I already have a partial map, but it’s just a start. I also hope to deepen my concentration and focus, and maintain them for longer periods of time. If it’s half as good as my first week, it will still be awesome.