Chinaunix首页 | 论坛 | 博客
  • 博客访问: 244653
  • 博文数量: 32
  • 博客积分: 557
  • 博客等级: 中士
  • 技术积分: 431
  • 用 户 组: 普通用户
  • 注册时间: 2011-04-20 23:05
文章分类

全部博文(32)

文章存档

2015年(4)

2014年(2)

2012年(4)

2011年(22)

分类: LINUX

2011-06-02 00:13:25

By Jake Edge
June 18, 2008

In a linux-kernel thread about fixing the Kernel Janitors project, Peter Zijlstra , with a bit of his perspective on attracting better kernel contributors. As he is a relatively recent addition to the kernel community, his path from Linux user to kernel hacker may serve as a template of sorts for others who are starting out now. We asked Peter to answer a few questions by email to help fill in some more of the details.

LWN: How did you get started with Linux? What attracted you?

Peter: Around the time Win95 came around, IIRC [if I remember correctly]. I used to do demo coding on DOS, which involved rebooting your machine every time you messed up, and whereas DOS reboots quite quickly, doing the same on Win95 was anything but quick.

A friend of mine introduced me to Unix/Linux at the time, and I started learning all about programming in a real environment. Basically all programming up to that point was in a freestanding environment where you had to poke the hardware to get anything done.

So initially it was the charm of a proper multitasking OS (with memory protection) that got me to use it – not having to reboot your machine every time, and the luxury of being able to run a debugger.

LWN: How quickly did you start poking around in the kernel? What did you first start to look at and why?

Peter: The kernel ... well that took a seriously long while. The above introduction to Linux was around 95/96 IIRC. My first real kernel patches were about 10 years later.

In those 10 years I learnt a lot about programming. I learnt about Unix system programming, I learnt about C++, multi-threading, database engines, and a whole range of interesting things.

Somewhere along I got a real internet connection and started lurking on mailing lists, including LKML – I must have been reading that on and off for about 5 years by the time I really sat down and wrote some patches.

During that time I might have sent in some trivial build fixes, and I remember finding a priority leak in one of the realtime patches. But I wasn't actively coding on the kernel – I just liked running real exotic stuff, you know Gentoo and building just about everything from CVS.

So what got me started on the kernel ... I can't quite remember how it happened, but I ran into some of Rik's [van Riel] Advanced Page Replacement stuff. I had worked on that problem space earlier while doing database engines, and had recently run into it again at work. So I started reading those papers and some of the proposed kernel patches, and I started to itch.

I dropped basically everything I was working on in my spare time (hacking WindowMaker, writing a C++ ASN.1-DER serialization class, writing a new LDAP server and I'm sure some other projects that are rotting away on a harddrive somewhere :-) and started hacking.

Why ... I'm not sure – it sure got me back to where I started out – crashing machines (and boot times haven't improved over those past 10 years at all).

I think because of the challenge – I knew I could write whatever it was I was coding and this page replacement stuff was a whole new challenge, and TBH [to be honest] the kernel code didn't look too hard at the time (phew how ignorant I was..)

LWN: How well were your contributions received by kernel hackers? Did you make any missteps along the way?

Peter: Some better than others. I think its natural for every kernel hacker to grow a huge pile of discarded patches. Not everything will make it. But don't get discouraged by that, you did get to learn something from doing them.

Mis-steps, feh, still do ;-) Unlike most people seem to think, kernel hackers are human too.

LWN: What suggestions do you have for folks that are looking at getting involved in kernel hacking today?

Peter: Just do it – seriously it's that easy. Oh and don't be afraid of criticism, you'll get it anyway – in spades. Criticism is not personal, it's about your patch, there are two things you can do:

  • take it and act upon it
  • convince the other he's wrong

OK it can get personal, but that is only if you repeatedly fail the above two points.

LWN: There has been a lot of talk about the Kernel Janitors project recently, do you think that is a good way to get started with kernel development? What do you think should be done differently in that (or other) project(s) to attract more and better contributors?

Peter: I'm not sure. The Kernel Janitors thing doesn't really seem to work out. I think that might be due to two things:

  1. we don't have enough simple but interesting things lined up (not saying there are none, but we don't have a ready list). I think a proper challenging project would be much better that moronic code clean ups.
  2. the kernel really isn't a place for newbies; now let me explain this before it gets all mis-interpreted :-)
    • Things really get a lot easier if you're fairly competent at (Unix) system programming before starting at the kernel.
    • Kernel hacking is a solitary business in that you need to do things, nobody is going to do them for you. That is not saying nobody can help you if you have a question. Also, nobody is going to force you to do something – you need to want doing it.
Now, none of this means you can't start hacking the kernel without knowing C or any programming it all, but you'd better be ready for one hell of a ride (Yes, there are people who learnt C from doing kernel stuff, but that is going to take a serious amount of will-power to pull off).

So I guess what I'm saying is that you need to really want to do it. There is no other way to become a kernel hacker than by simply doing it.

LWN: Do you work on Linux for your job, as a hobby, or both?

Peter: Both; initially it was spare time besides $JOB. But after keeping this up for about a year my wife nudged me to look for a kernel job, since I obviously enjoyed hacking the kernel more than $JOB, and she'd get some of that spare time back ;-)

So I applied for a kernel position at a few of the larger vendors, and Red Hat won the race.

Already having had a year's worth of exposure to kernel code and LKML, certainly helped in getting this amazing opportunity. Have I already mentioned I absolutely love working on the kernel?

So now I get to poke at the kernel all day, every day...

LWN: What are your current kernel projects? What kinds of things do you see yourself doing in the kernel in the future?

Peter: Current active projects are group scheduling and some -rt work. I should pick up the swap over network code again, and there are some other loose ends.

The future ... well we'll see what happens, loads of interesting stuff to do.

We would like to thank Peter for taking the time to answer our questions.


阅读(1674) | 评论(0) | 转发(2) |
给主人留下些什么吧!~~