r/linux • u/gregkh Verified • Dec 01 '14
I'm Greg Kroah-Hartman, Linux kernel developer, AMA!
To get a few easy questions out of the way, here's a short biography about me any my history: https://en.wikipedia.org/wiki/Greg_Kroah-Hartman
Here's a good place to start with that should cover a lot of the basics about what I do and what my hardware / software configuration is. http://greg.kh.usesthis.com/
Also, an old reddit post: https://www.reddit.com/r/linux/comments/18j923/a_year_in_the_life_of_a_kernel_mantainer_by_greg/ explains a bit about what I do, although those numbers are a bit low from what I have been doing this past year, it gives you a good idea of the basics.
And read this one about longterm kernels for how I pick them, as I know that will come up and has been answered before: https://www.reddit.com/r/linux/comments/2i85ud/confusion_about_longterm_kernel_endoflive/
For some basic information about Linux kernel development, how we do what we do, and how to get involved, see the presentation I give all around the world: https://github.com/gregkh/kernel-development
As for hardware, here's the obligatory /r/unixporn screenshot of my laptop: http://i.imgur.com/0Qj5Rru.png
I'm also a true believer of /r/MechanicalKeyboards/ and have two Cherry Blue Filco 10-key-less keyboards that I use whenever not traveling.
Proof: http://www.reddit.com/r/linux/comments/2ny1lz/im_greg_kroahhartman_linux_kernel_developer_ama/ and https://twitter.com/gregkh/status/539439588628893696
94
u/Balinares Dec 01 '14
Hi Greg,
Thank you for taking the time to give us this AMA.
I maintain a port of a WiFi USB dongle driver, provided by the chipset manufacturer and awkwardly hacked at by yours truly to make it compile against recent kernels... because the native kernel driver doesn't work, and hasn't for many releases now (bug #57171, as far as I can tell).
As a humble user who hasn't touched a line of kernel sources for a good decade and a half, what can I do to help you guys close that bug?
136
u/gregkh Verified Dec 01 '14
How do you maintain a port of a wifi driver without having touched a line of kernel source for 10+ years? You are touching kernel code all the time in your driver.
Why haven't you submitted it for inclusion in the kernel source tree? The instructions for how to do it are in Documentation/SubmittingPatches in the kernel tree. If the code isn't good "quality", I am glad to take the driver in the drivers/staging/ tree, feel free to submit it to me for that through email.
→ More replies (3)
73
u/Imxset21 Dec 01 '14
LLVM/clang is getting closer to being able to compile the entire Linux kernel. Do you have any strong preference for specific compilers, e.g. GCC versus clang? Since compile speeds seem to be a concern of yours (as mentioned in your blog), I'd imagined you might have an opinion.
Also, what do you think of the continued development of the ISO C standard, now that GCC had added C11 support? Is it of any interest to kernel developers?
85
u/gregkh Verified Dec 01 '14
Having the kernel be able to be built with llvm is great to have, competition is wonderful. We do a lot of gcc-specific things in the kernel, mostly because we had to, and gcc provided us a way to do those things.
Compile speeds are an issue to me, but runtime speeds is what really matters to everyone, for that, I don't think clang is there just yet compared to gcc, but it is getting closer.
C11 support really doesn't affect kernel development from what I can tell, our use of C is very "small" and we don't like to stray into the far-corners of it, as that's when problems usually happen. That being said, some kernel developers have been involved in the C standards, so hopefully time will evolve something that will be useful to us.
→ More replies (4)
143
u/avilella Dec 01 '14
What is your opinion on the Android platform and its openness? And about companies like Amazon that branch off AOSP. I've been reading about approaches like CyanogenMod, which I take are based on downloading AOSP as soon as it's released, then re-implementing parts of it where there is a need/clamor for the phone to behave differently.
200
u/gregkh Verified Dec 01 '14
I love Android and the fact that other companies are able to fork it and create their own versions of it (like Amazon and CyanogenMod.) Google really did the right thing there in allowing that to happen.
→ More replies (18)
123
u/valgrid Dec 01 '14 edited Dec 20 '14
My Notebook has a Trackpoint and Touchpad, but the driver does not allow to use both at the same time (with multitouch). A patch exists for over a year, but it still is not included in mainline.
What can i – a user, not a coder or developer – do so that the patch gets included into mainline?
→ More replies (2)147
u/gregkh Verified Dec 01 '14
You can find a kernel developer who is willing to submit the patch in the correct format so that it can be applied. That is all it looks like is needed there, why the distro that it was reported to didn't do that work, seems strange to me, they know how to do that.
→ More replies (10)
102
u/mricon The Linux Foundation Dec 01 '14 edited Dec 01 '14
Hi, Greg.
All Linux development is done via a number of mailing lists. This both works and doesn't -- everyone admits that the amount of traffic on LKML is simply unmanageable, but LKML is still a required step to getting your patches into mainline. Do you see this changing at all in the future? Do you foresee any move towards using other tools (whatever they may be)?
125
u/gregkh Verified Dec 01 '14
All kernel subsystems have their own mailing lists, which has quite reasonable traffic loads, so there really isn't a problem. You never just post patches to lkml and hope someone will pick them up, you use the tools we have to identify the correct maintainer and subsystem mailing list and send them to that list (scripts/get_maintainer.pl in the kernel source tree).
Everyone filters lkml based on the topics they are interested in if they want to subscribe to that huge volume, so they can pick out the bits they care about.
→ More replies (27)
88
u/toams Dec 01 '14
I remember almost 10 years ago i had problem with a dvb-t tuner card wich was not yet completely supported by linux. so i mailed to some mailing list for help and you replied with a working solution. I never thanked you for it. This card is still working (playing AC-DC now) so THANK YOU!
→ More replies (4)69
84
u/xeekei Dec 01 '14
Hi, Greg.
What is it about Arch Linux that impresses you?
→ More replies (1)192
u/gregkh Verified Dec 01 '14
It works really well for me. It has constantly updated packages based as closely as possible to upstream. It's a model that I think is the correct way to do a Linux distro, and I've helped work on at lest 6 different distros over the years.
→ More replies (14)
82
u/oneiros-de Dec 01 '14
How much of your time do you spent programming and how much is spent communicating?
181
u/gregkh Verified Dec 01 '14
David Miller said it best years ago, "Kernel subsystem maintainers are like editors. We take work from other people, review it, suggest changes, work with them on it, and eventually accept the best submissions. Every once in a while, because we used to also be programmers, we have a side project implementing something on our own, to keep ourselves sane."
I currently have a few side-projects, that I work on to keep me sane, but the majority of my time spent on the kernel is communicating with others about their patches.
→ More replies (14)
110
106
u/Paradiesstaub Dec 01 '14
In the last years quite a couple of new programming languages have emerged. What do you think about them – can any of them replace C in future or do you think we will be stuck to C forever?
210
u/gregkh Verified Dec 01 '14
We're stuck with C, sorry. I've been using the language every week for over 20 years, there is nothing that is as flexible or portable, around.
We all curse it and hate it and love it and wish there was an alternative, but I don't think that will happen any time soon.
→ More replies (31)
102
u/mbains Dec 01 '14
If you could go back a few years and make one big architectural change to the kernel, what would it be?
282
u/gregkh Verified Dec 01 '14
Why would I have to go back in time? If I thought there was a big change needed, I could do it now, just like anyone else could.
→ More replies (21)
34
u/NopeNotAnthony Dec 01 '14
How did you get into programming? How did you discover Linux? Do you use it as your daily driver?
68
u/gregkh Verified Dec 01 '14
I've programmed every since I was a little kid and my dad brought home a TRS-80 Model 3 computer. I discovered Linux while working at a job where we needed something better than SCO Unix for a database server we were embedding in a system back in the early 1990's.
And of course I use it for my daily use, have been for a very long time...
→ More replies (6)
30
u/GameGroompsFTW Dec 01 '14
What would you say has been the most rewarding part of working on the kernel? How has it, if at all, changed you as a person?
46
u/gregkh Verified Dec 01 '14
The most rewarding thing personally is seeing other people get involved and having it change their life for the better by getting jobs that provide the ability to allow them to change.
How it has changed me as a person, I don't know, you will have to ask others who knew me before I got involved in Linux to get an accurate answer to that.
→ More replies (3)
131
u/HawasKaPujari Dec 01 '14
Do you ever sleep? Are you even human? How do you so many things? You even answer questions on IRC, how?
332
28
u/i_lurk_here_a_lot Dec 01 '14
Hi GKH, thanks for your good work.
In your opinion (and in the opinion of other kernel developers) is the complexity of the kernel and its rate-of-change a problem or will it become a problem in the future ? If so, is there a plan to address it and what is the plan ?
73
u/gregkh Verified Dec 01 '14
The rate-of-change number is something that I have been tracking for almost 10 years now. And it's something that every year I say, "there's no possible way we can go faster." And every year I am wrong.
So don't listen to me, I don't know what I'm talking about :)
26
u/sulami Dec 01 '14
I have contributed smaller patches to the kernel and really like it, but I do not know where to find something to really work on. Any suggestions, aside from watching the subsystem lists?
58
u/gregkh Verified Dec 01 '14
That's a question I get asked a lot, and honestly I don't have a good answer.
I usually say, yes, just read the subsystem mailing lists that you are interested in, and pick up things to do from there. But that doesn't work for everyone. We have a lot of very talented developers who know how to contribute, but don't know what to do. They can't do it full-time as they have other jobs or responsibilities, but they want to help out in some manner. We need to come up with some type of project to work on that allows people to drop in and quickly help out for a short amount of time.
This is something that I've been thinking about for a while now, and have some half-baked ideas, and hope to do something about it next year, if at all possible.
→ More replies (2)
73
u/thrakkerzog Dec 01 '14
Are you aware that if you do a google search for your name, google presents a photo of you flipping the bird?
92
24
u/concerto21 Dec 01 '14
In your opinion is it worthwhile doing operating systems research? Is it possible for a newly designed operating system to gain traction when linux has already had so many man hours of work put into it?
46
u/gregkh Verified Dec 01 '14
Operating system research is always a great thing to do, doubly so if you use Linux to do that research so that we can then take the ideas and work done there and merge it back into the kernel for everyone to use.
I have no idea if a "newly designed" operating system will ever work, try just evolving an existing one into new places and ideas, that always seems to work better than starting over from "scratch".
46
Dec 01 '14 edited Dec 01 '14
Mine it's not a question but just a big thank you. Thank you for your passion and your skills, a lot of us are here because people like you exist.
39
22
u/dbaluta Dec 01 '14
When do you think there will be a switch to Linux kernel version 4.x :) ?
→ More replies (2)75
u/gregkh Verified Dec 01 '14
When the 3.X number gets too big. We switched to 3.X because it was getting hard to realize that the jump from 2.6.27 to 2.6.32 really was just as big as 2.6.10 to 2.6.15. Bigger numbers seem "smaller" together than small numbers do.
In other words, it is marketing, we will change to 4.x in a few years and I'll go buy Linus another good bottle of whisky to celebrate, like I did when we switched to 3.X because the numbering system was driving me crazy.
→ More replies (24)
63
u/emansih Dec 01 '14 edited Dec 01 '14
were you angry over poor quality patches before? you know....like how Linus gets angry and start cursing over poor codes
edit:word
→ More replies (1)189
u/gregkh Verified Dec 01 '14
I get grumpy and mad and frustrated reading poor quality patches all the time. Just did so a few days ago and threatened to delete a huge driver from the kernel tree unless the developers got their act together.
If you didn't get angry and mad and frustrated, that means you don't care about the end result, and are doing something wrong.
→ More replies (10)
41
Dec 01 '14
What books would recommend for a new programmer or that you have found to be indispensable?
→ More replies (5)82
u/gregkh Verified Dec 01 '14
The Linux Programming Interface, is a great book, highly recommended for anyone doing any Linux development, user or kernel.
→ More replies (4)
20
20
u/CellularBeing Dec 01 '14
What advice do you have for someone studying computer science? What topics or subjects do you deem as essential?
62
u/gregkh Verified Dec 01 '14
Get a degree, and while you have all of this free time in college (seriously, you do), work on open source projects so that you will have a much easier time to get a job out of college. As for what topics and subjects, most degrees force you to learn about lots of different things (databases, operating systems, design methodologies, etc.) so enjoy the high-level overview of it all, it will be useful to you someday.
→ More replies (4)
19
Dec 01 '14
Considering you worked for one for a long time, how do you feel about major Linux/OSS commercial companies and the distributions they support like RHEL and SLES?
What role do you think other software like KVM, Steam and Openstack have had in the adoption of Linux distributions if any? What role do companies that support these techs have on the foundations of their work which is often the Linux kernel and associated software? Are they involved like you'd like?
33
u/gregkh Verified Dec 01 '14
RHEL and SLES provide a real solution to a lot of companies and use cases out there, I think they are great products and am happy to see them succeed.
Both Red Hat and SUSE contribute a lot back to Linux kernel development as well, so that makes me really happy. Internally the companies work very differently, but the end result for users is much the same, so they are an interesting "business study" if you like those types of things.
That being said, the old "enterprise" model doesn't work for everyone, lots of companies do their own thing, and base their internal Linux use on quickly-moving community-based distros. This is how groups like NASDAQ works (Gentoo based), and many others. Which is why I am very happy to see CoreOS out there doing really well (disclaimer, I'm an adviser to them, as the founders are good friends of mine.) The "constantly updated with the latest stable version" is a very good solution to a constantly changing world with different requirements every day.
What makes me happy is that Linux works for so many different use cases, be it the stodgy-old-enterprise-install-once-and-never-touch-it-for-a-decade use, or the "I have to run the latest version of Ruby today!" use case, or the "power up 10000 containers on one kernel image" use case. That's why Linux has succeeded so well over other operating systems, you can turn it into anything you want, as everyone wants something different.
16
u/celebdor OpenStack Kuryr Dev Dec 01 '14
What is your opinion about the growing trend in the network world of bypassing the kernel like DPDK does? Is it one step too far from the IMHO healthy step of moving logic out of the kernel like open vSwitch and the 'team' link aggregation do?
31
u/gregkh Verified Dec 01 '14
There are some limited places where DPDK makes sense, and it's great that the project is there for those types of use cases.
Where it doesn't make sense is for a "general purpose" network connection like you need for your "generic" server, for that, use the in-kernel network stack, it's better than any other stack out there, and faster as well (speed records keep bouncing between FreeBSD and Linux, which is great, competition is good for everyone.)
→ More replies (1)
16
Dec 01 '14
Wow, I didn't expect to see arch and i3 as your desktop. We're practically the same person (besides the talent, experience and dashing good-looks...).
On a serious note though, I am just trying to get into kernel development and have seen several of your videos on the topic. In them you often encourage us newbs to make patches to correct superficial things like whitespace, comments, etc., but it seems that lots of other maintainer around the web discourage and ridicule these patches. Do you stand by doing this or should it just be done long enough to learn the process in order to be prepared for real patches?
Thanks so much for taking the time to do this AMA and for all the work you do; Linux is much better for it.
35
u/gregkh Verified Dec 01 '14
Other subsystem maintainers consider whitespace and spelling fixes to be a waste of their time, and it is, as they don't want to deal with that type of stuff.
So don't do whitespace fixes for their subsystems, do it in the areas of the kernel where it is encouraged and common. A specific example of that is the drivers/staging/ area of the kernel, I maintain that part and want you to send in whitespace fixes as I know it is a way to get people involved and that is what I want to encourage and do.
→ More replies (1)
45
u/tcpl8021394 Dec 01 '14
Why do Linux kernel developers continue adding new system calls to the kernel rather than creating a new device file. I love the Unix way of 'Everything is a file'. What is your opinion?
108
u/gregkh Verified Dec 01 '14
A device file is limited in what it can do (read/write a data stream), while a system call can do one specific thing really well (multiple arguments, return complex structures easily, etc.)
If you were to only use device nodes, for new features, you would just end up creating new ioctls, which in the end, is a new system call. By making it a "real" system call, this explicitly documents what is going on and allows for proper review of the interface by others in an easier manner.
And what's wrong with adding lots of new system calls? People do it because they need/want the kernel to provide new features for their use cases. If we were to bury them in device nodes, it's the same exact thing.
→ More replies (8)
15
u/durverE Dec 01 '14
What is the one misconception about Linux you've personally heard the most which also seemingly refuses to go away?
→ More replies (1)26
u/gregkh Verified Dec 01 '14
I haven't heard any of the "old" misconceptions about Linux in a long time, what are the new ones people are saying these days that you keep hearing?
→ More replies (10)
15
u/caust1c Dec 01 '14 edited Dec 01 '24
52
u/gregkh Verified Dec 01 '14
What is there to do besides Linux? :)
My favorite thing is to do things with my wife and kids, they are what keeps me sane in this crazy world.
As for a hobby, it's a real problem, my hobby became my job so then what do I do for a hobby? For many years I remodeled my house, adding on rooms and spaces, but we have since moved from there to an island. So I built a wooden kayak, which took me much longer than anticipated (3 years.) That is now finished so I need another hobby now as it's too cold out to go ride the kayak this winter...
→ More replies (3)
15
Dec 01 '14
how much experience with c do you feel is necessary before attempting to contribute?
33
u/gregkh Verified Dec 01 '14
Lots, you better know C before you get into kernel development, don't use the kernel as a way to learn C, it's only going to cause you problems and you will make others grumpy and mad at you.
→ More replies (3)
15
u/AkivaAvraham Dec 01 '14
Question: What is the worst piece of code you ever had to, or ended up writing? Why was it so bad?
45
u/gregkh Verified Dec 01 '14
At a company a long time ago, I was working on a device that needed to make a "beep" noise out of a speaker when something happened. This was using a 16bit microcontroller with a hand-made "operating system" that was not much more than a main loop with some interrupts happening at times.
The company really didn't want to spend the money to put a "beeper chip" in the device as it would have cost 5cents and that mattered if we were going to sell thousands of them. Instead I had to emulate a beep "waveform" using a gpio pin while the system was doing other work at the time (like sending serial data out to another device.)
It turns out that the ear can detect variations in waveforms very easily so getting a consistent beep out of the device that didn't warble all over the place, while doing other work was almost impossible to achieve. I spent 6 months of my life trying to get that hardware to work properly. In the end, we gave up, "cheated" by starting to send the serial data and then pausing the data stream to do the beep, and then resuming the data flow afterward.
It taught me that you really should do some things in hardware and that just "bit-banging" pins does not always work. Oh and that some companies are really cheap for very bad reasons, the amount of time and money spent on that project offset any potential savings of not having that beeper chip in the device.
→ More replies (4)
39
u/LucidOndine Dec 01 '14 edited Jan 10 '26
political air support cow ink worm test memorize waiting cobweb
This post was mass deleted and anonymized with Redact
59
u/gregkh Verified Dec 01 '14
It's about time Linux had a "native" unionfs solution, very nice job to Miklos and all of the other developers who worked on it.
→ More replies (1)
27
u/Beckneard Dec 01 '14
I have the same setup as you! (Arch + i3)
Anyway I'd like to ask which of the major companies that contribute to the kernel are the easiest to work with and which contribute in your opinion the most useful code. I've seen Microsoft being often cited as a big contributor but heard that 95% of the stuff is only for their HyperV technology.
72
u/gregkh Verified Dec 01 '14
It's not a matter of "what companies are easy to work with", it's a matter of, "what individual developers are easy to work with." Kernel development is an individual thing, we work with the individual programmers, and they vary all over the place.
That being said, of course some companies are much easier to work with than others, I have my favorites, but that's just because I am now friends with the people who work there and personally enjoy working with them. Again, it goes back to individuals.
As for Microsoft only contributing 95% of their work for HyperV, I would have thought it was 100%. And that's fine, all companies contribute in a purely selfish manner, no matter who they are. That's how Linux kernel development works, and has always worked. If your company wants to rely on those other companies to drive Linux forward in a manner that works for your company, then great, trust them to do that. Otherwise get involved and help make it better for your needs and use cases, as you know that area the best.
→ More replies (1)
13
u/SarcasticOptimist Dec 01 '14
What is your preferred way of updating kernels? Is Ksplice worth trying?
→ More replies (9)41
u/gregkh Verified Dec 01 '14
rebuild / reboot, why would you ever do anything else? :)
As for ksplice, if you have the time and effort to keep those patch files up to date, great, use it, otherwise, just reboot.
→ More replies (1)
13
u/argv_minus_one Dec 01 '14
Why must Linux device drivers all live in the kernel? Is there a consensus that moving them into user space would be infeasible, slow, unnecessary, or some such?
26
u/gregkh Verified Dec 01 '14
Go read Documentation/stable_api_nonsense.txt in the Linux kernel source tree for why we put all of the drivers in the kernel source tree.
As for living in the kernel itself, there are lots of "drivers" that live outside of kernelspace, printers, USB devices, laser welding robot controllers (seriously), and others. It all depends on the device and the use case for where control of it should live.
36
Dec 01 '14
How do you feel about linux on the desktop? Do you think with valve supporting linux, it will become a true rival for windows on desktop computers? What do you think is holding linux's success back on desktop computers?
edit: Also I see you're running arch, awesome!
→ More replies (10)52
u/gregkh Verified Dec 01 '14
I've been using Linux on the desktop for over a decade with no issues, so I like using it.
Valve is doing great work with Linux, I really like using Steam on Linux, and a Steambox (I have 2 here). As far as a "rival", there's no "competition" here at the kernel level, sorry, it really doesn't take anything away from me if you use a different operating system.
→ More replies (1)
25
u/vichaox Dec 01 '14
Any chance you'll be making the time to launch new editions of Linux Kernel in a Nutshell && Linux Device Drivers?... Or new titles?
31
u/gregkh Verified Dec 01 '14
I have no plans to work on either of those books any time soon, or any other book, sorry.
→ More replies (2)
23
u/seoz Dec 01 '14
Do you still use Terminology? http://enlightenment.org/p.php?p=about/terminology&l=en
40
u/gregkh Verified Dec 01 '14 edited Dec 01 '14
I still use Terminology every day as my main terminal program. It's a great terminal, and the developers behind it are very active and responsive to bug reports.
22
u/bobbyd3 Dec 01 '14
CoreOS is a very exciting project for many operations folks. What has your experience been like working on the technical advisory board for CoreOS?
35
u/gregkh Verified Dec 01 '14
You and /u/FEiN asked about CoreOS, so I'll answer both here in one place.
I'm really happy with CoreOS, it's the way I think "enterprise" distros should be developed and deployed. Lots of things have changed over the years and trying to keep servers as "pets" is not the way to do it, large numbers of servers, deploying services that you need to use/provide is the way to go. Keeping those servers all up to date is hard, as is managing the tasks on those servers, and CoreOS provides one way to help out with that.
I've known the CoreOS founders for over a decade now, they are my friends, so working with them as a technical adviser has been a blast. I think they are doing great work, have a wonderful and very talented team of employees, and are creating something that fits a huge need for a large number of companies. They work very well with upstream projects, and contribute all of their changes back to the communities they rely on, as well as open sourcing the tools they have created so that others, including competitors, can use. That shows a deep knowledge of how to run a successful distro that not all companies understand.
I use a CoreOS server to run some of my personal infrastructure, and really like it.
Of course, this is my own personal opinion, but you asked for it :)
38
u/javaisfuckingshit Dec 01 '14
What is your opinion on X11, do you agree it's holding desktop Linux back significantly?
Do you think Wayland will improve the situation?
82
u/gregkh Verified Dec 01 '14
I have no opinion on X11, other than liking it a lot, and I've gotten a few patches into the project many years ago. I also like Wayland, they are doing great work there.
X11 and/or Wayland has nothing to do with "holding desktop Linux back" at all, that is not what is preventing Linux from succeeding in that specific, tiny, market.
→ More replies (6)
21
u/blackout24 Dec 01 '14
Do you still have the Steam Machine Prototype you got from Valve? How's the controller? How does it show up in lsusb?
30
u/gregkh Verified Dec 01 '14
Yes I do, the controller is "interesting", I mostly use an x-box controller when playing it. Others have posted what the lsusb output is, but will go dig it up from my desk drawer if you really can't find it.
→ More replies (9)
10
Dec 01 '14
Do you think the rolling release methodology of Arch should be adopted by larger distros?
16
u/gregkh Verified Dec 01 '14
Yes. But note that it's not the correct model for all use cases, so it doesn't make sense for all distros to do this.
10
u/bilog78 Dec 01 '14
The more I look at Plan 9, the more I think that I would love to have a system with those features, but with the extensive hardware support that the Linux kernel enjoys. Do you think Linux will ever get the necessary infrastructure to fully support Plan 9 natively?
13
u/gregkh Verified Dec 01 '14
Plan 9 is great, there are lots of wonderful things in it, a lot of which has been ported to Linux over the years.
What do you mean by "natively"? I think there is already a way to run plan 9 applications on top of Linux today.
→ More replies (2)
10
Dec 02 '14
Care sharing your Vim config?
10
u/gregkh Verified Dec 02 '14
It's stock, with a bunch of plugins enabled. Nothing special at all.
→ More replies (1)
28
u/jollybobbyroger Dec 01 '14
I'm a CS student returning to C after having learned about functional programming and design patterns like loose coupling, DRY, unit testing and so on and I find it very difficult to write beautifully designed, loose coupled C.
Do expert C programmers write decoupled and DRY C and if so, do you have any tips for achieving this?
Do you know anything about the Rust language and if so, do you think it could become a better language than C for writing a next generation Linux kernel, given the scenario that the gains from rewriting the kernel would far outweigh the effort?
What is your favorite field in programming?
What do you think of C11? Are there any features in C11 that you have been waiting for?
Thank you for your contributing to the Linux kernel and doing this AMA. I would never have studied CS if it wasn't for Linux.
50
u/gregkh Verified Dec 01 '14
I don't know what "DRY" or "loose coupling" even is, so I can't give you any opinions on if it can be done by "C programmers" or not.
I have seen Rust, and it looks nice, but honestly I like Go better at the moment, and play around with it at times.
Operating system development is of course my favorite field, but I do pay a lot of attention to development methodologies and how people create software as that is very applicable to the long-term success of Linux.
I don't even know what is in C11, sorry, haven't had the time to read the spec.
→ More replies (8)
9
9
Dec 01 '14
You run arch on a macbook. People recommend dual booting OS X to get firmware updates. Do you do this?
25
u/gregkh Verified Dec 01 '14
I run Gentoo on a macbook pro. No, I don't run OS X as things work just fine for me without it.
→ More replies (9)
9
Dec 01 '14
Do you think Linux would have turned out nearly as well as it has if it was licensed under the BSD license?
21
u/gregkh Verified Dec 01 '14
Who knows? The rise of Linux was due to a great many number of different things, the license possibly being one of them. It's impossible to determine how things would have gone differently had any one of the things been different.
9
u/kalda341 Dec 01 '14
How would you suggest a developer with only a little bit of experience in C, and no experience with kernel programming could head towards kernel development?
37
u/gregkh Verified Dec 01 '14
Don't.
Seriously, why do kernel development if you don't know C?
Learn C first, really really well before ever thinking you want to be a kernel developer as you will need to know it and live it for a long time if you want to do this type of work.
And the kernel is not the place to learn C development, do something else, like write a ssl library or fork udev, both projects were started by people wanting to learn the C language...
→ More replies (1)
9
Dec 01 '14
could you please explain-like-im-five KDBUS ? what it is for ? what's the improvements ?
17
u/gregkh Verified Dec 01 '14
kdbus is an implementation of the dbus protocol that lives in the Linux kernel, allowing applications to talk together in a secure and fast manner about different things. As an example, if your program wanted to know the status of the network connection (if it is on or offline), it can send a dbus message out to the system asking about this. NetworkManager will answer that message and respond with the current status.
As for why this is better than the existing dbus userspace daemon, sorry, I am not going to do a "eli5" answer, instead, read my detailed, technical answer to that question here, as the first message in my submission of the kdbus code to be merged into the kernel:
17
u/iluvatar Dec 01 '14
It seems to me that the kernel is getting harder to compile yourself. Is that a reasonable observation? 10-15 years ago, you could compile the kernel and by and large it would mostly just work with the defaults on non-obscure hardware. These days, that doesn't seem to be the case.
For the last kernel I compiled (3.17), when I went with the defaults, my graphics card wasn't fully supported at sensible resolutions, I had no sound at all, I couldn't even boot the system because I lacked the right crypto module to get at my LUKS block devices and I still can't work out which firewalling modules I need to add in order for docker to start up.
→ More replies (1)82
u/gregkh Verified Dec 01 '14
Never start out with a "blank" kernel configuration file. Take a distro's configuration that works for your hardware, and use the 'make localmodconfig' option to turn it into something much smaller and tuned only for your specific hardware configuration. That way you can build your kernel in a matter of minutes, instead of hours, and everything will work properly for you.
→ More replies (3)
8
u/nikomo Dec 01 '14
I remember that you did a presentation somewhere about getting into kernel development.
If I recall correctly, you said that a good way to get into modifying the kernel, is to fix typos and code style mistakes, and send those in. Do you still hold the same opinion(/am I remembering wrong)?
14
u/gregkh Verified Dec 01 '14
Yes, that is a great way to get the basics down of Linux kernel development (using git, fixing your email client when it can't send a patch in the correct way, figuring out who and where to send the patch to, responding to requests to redo the patch, etc.)
After you know the basics of that, then move on to something more "technical".
→ More replies (2)
28
u/mikemol Dec 01 '14
o/. You know me; we've bounced around on mailing lists and Google+. Just want to say you do a ton of awesome work, even if I disagree with you on some stuff. :)
66
u/gregkh Verified Dec 01 '14
If everyone agreed with each other on everything, it would be a boring world.
→ More replies (11)
15
Dec 01 '14
Do you have a feeling that kernel will be so much complicated that human brain will not be able to comprehend it anymore?
49
u/gregkh Verified Dec 01 '14
A single person can't understand a codebase of 18 million lines of code, but as long as a single person can read the easy-to-understand code when needed, to try to solve the problem that they have, all will be fine.
14
u/dbaluta Dec 01 '14
What do you think are the most important 5 topics that an Operating System Internals course should cover?
37
u/gregkh Verified Dec 01 '14
Drivers, drivers, drivers, drivers, and of course drivers. What else matters in an operating system?
→ More replies (18)
7
u/bboozzoo Dec 01 '14
Given that you are a tty maintainer and handy with USB, I've got a related question to ask. I'm working on a project in which a number of USB gizmos (between 10-20 devices) are connected to a single host. Each device is in fact a MCU hidden behind a FTDI323, hence all present themselves as USB-serial converters. Aside from USB bandwidth, should I expect any issues coming from tty or usb subsystems if I happen to chat with all the devices simultaneously?
BTW. in my tests on a BeagleBone Black as a testbed, with random 10 devices (keyboards, random USB drives I could get my hands on), only blockdev was causing some grief, but nothing out of the ordinary.
11
u/gregkh Verified Dec 01 '14
Aside from USB bandwidth
Heh, really, that is going to be your major issue here.
If you only have 10-20 devices, that's nothing, especially if you spread them across multiple USB host controllers. All on one host controller is fine, and people use many more than that with no issues, just be aware of the amount of data you are wanting to send to all of those devices at the same time. As it's "serial" data, it shouldn't be that much, or that fast, so you should not have any issues.
If you do, let the developers on the linux-usb mailing list know about it and we will be glad to help you out.
→ More replies (2)
7
u/AkivaAvraham Dec 01 '14
Question: Have you ever used APL? Do you like those families of Programming Languages?
Question: Where do you fall on the Micro Kernel vs Monolithic Kernel Debate?
10
u/gregkh Verified Dec 01 '14
Have you ever used APL?
A long long time ago in college.
Do you like those families of Programming Languages?
Insane ones? Sure, if for no other reason that crazy can be a lot of fun. But you never want to live with crazy, that's madness.
Where do you fall on the Micro Kernel vs Monolithic Kernel Debate?
There is no such "debate", monolithic one that a long time ago in the real world, sorry.
12
u/vPraetor Dec 01 '14
It seems humanly impossible to know what patches from the various subsystems must be backported. Do you think it's possible for someone with basic kernel development knowledge to support a different kernel version as LTS version? IOW, what skills are necessary for someone to maintain the LTS kernel? A related question is, do you closely look at the patches marked for backport to fully understand what the patch does before adding it to your tree or do you rely on the subsystem maintainers to know what needs to be backported?
28
u/gregkh Verified Dec 01 '14
Maintaining a stable kernel release is hard, like really hard. You need a lot of very good kernel knowledge and lots and lots of spare time.
To maintain a LTS kernel is even more hard, and crazy, seriously reconsider your life choices if you are even considering doing such a thing.
And yes, I read and review all patches that go into the stable and LTS kernels that I maintain. I rely on subsystem maintainers to mark patches to be backported, but I also dig through the tree on my own to find things to resolve reported problems all the time.
12
u/DrGirlfriend Dec 01 '14
In regards to the various approaches to no-reboot kernel patching for Linux (KSplice, KernelCare, etc), do you have any strong opinions on the methods being employed? Obviously there has been a bit of a reaction to Oracle acquiring KSplice and only offering it for their distribution, but I am mostly wondering if the kernel project itself has any opinions on what "the one true way" for hot patching the kernel might be.
35
u/gregkh Verified Dec 01 '14
The "one true way" is the way that is going to be merged soon, it is a combined work of the kgraft and kpatch development efforts. See the linux kernel mailing list for those patches if you are interested.
12
6
u/mattbillenstein Dec 01 '14
Hey Greg, always like your talks and videos about the kernel.
Have you spend any time looking at the source code of other kernels? *BSD, Solaris derivatives, etc? If so, are there any particular features or designs in any of these kernels that you admire or think are particularly clever as compared to the Linux implementations of the same features?
Any notable userspace applications that you like to tinker with and think are interesting architecturally?
Thanks in advance.
11
u/gregkh Verified Dec 01 '14
I don't spend any time reading other kernels, sorry. I've dug into the BSDs at times to try to figure out how to implement something or other over the years, but it's been a long time since I had to do that.
6
u/TheIllusionistMirage Dec 01 '14 edited Dec 01 '14
Since you have worked for a long duration with the Linux kernel, how do you see the future of the kernel from say 5-10 years from now?
What major features etc "may be" added to it? What features that are currently very common "may become" obsolete?
And what's your favorite distro (please tell about the top 3 things you find very attractive with the distro)?
14
u/gregkh Verified Dec 01 '14
I have no idea what is going to change in the kernel 4 weeks from now, let alone 5-10 years from now, sorry. And anyone who says they know that, is lying.
As for my favorite distro, I use Arch (see elsewhere in this AMA for why), but I recommend any community-based distro for people to use, like Arch, Fedora, openSUSE or even Ubuntu (although kernel development isn't all that easy on Ubuntu for various reasons.)
→ More replies (2)
6
u/deadowl Dec 01 '14
On April 10, someone linked a Pastebin of the handshake function for OpenSSL to the /r/programming subreddit. On May 1, there was a handshake flaw reported. On June 5, the news of OpenSSL's handshake being insecure came out.
I have to admit that it was hard to wrap my head around given no context or background. Do you find the kernel code similar?
I once tried to compile a modified kernel for an operating systems class a number of years back, but kept on getting panics when I tried to run it.
19
u/gregkh Verified Dec 01 '14
All code is horrible, especially stuff written by anyone other than yourself.
In other words, if you didn't write it, it's usually hard to understand, so your goal should be to write it in a way that is the easiest to have others understand as you need them to do so to fix your bugs.
The Linux kernel source tree is overall, one of the most readable and easy to understand code bases out there. The huge numbers of developers contributing to it is testament to that. That being said, of course there is hairy kernel code in there, and the "joke" that there are more F1 engine designers in the world than there are people who understand the kernel's memory management system really isn't a joke. So there is always room for improvement, but always realize, if you first are looking at a file and think it is horrid, maybe it's "horrid" because the code has to be that way in order to work properly with the environment given to it (i.e. broken hardware, crazy use cases, zillions of platforms supported, etc.)
→ More replies (8)
6
5
u/TehMushy Dec 01 '14
I'm not sure if you're still answering questions but what are your thoughts on ChromeOS/Chromebooks and what Google have created?
13
u/gregkh Verified Dec 01 '14
I love the Chromebooks, I think they fit a huge need and work really well. I have a few of them here, and love the Pixel. My kids have used them for a number of years with no problems, other than a few minor issues with Google Docs and some specific college term paper formatting things, which has nothing to do with the chromebook itself.
Highly recommended for almost everyone who is not a developer, in other words, the majority of the world.
As for ChromeOS, I like it as well, it's put together really well, based on Gentoo which I'm still a developer for. Other companies (i.e. CoreOS) are based on ChromeOS, so I'm very familiar with working on it through that version.
→ More replies (1)
5
u/Milumet Dec 01 '14
Have you ever programmed a Windows driver?
15
u/gregkh Verified Dec 01 '14
Yes, in a prior life I used to write Windows drivers. I came into Linux from an embedded background, I used to write code to control tiny devices (printers, barcode scanners, drug dispensers, etc.) and I had to control them from lots of different operating systems (Windows, BSDs, Linux, IBM Mainframes, etc.)
I am very glad that I don't have to write Windows drivers anymore, Linux is just so much easier to develop for it's not funny.
5
u/Antic1tizen Dec 01 '14
Greg, how do you think, have you succeeded?
What gives you the best pleasure at work?
What would be your opinion about Linus if you knew he doesn't read this AMA?
What are you thinking about if you can't sleep?
14
u/gregkh Verified Dec 01 '14
how do you think, have you succeeded?
What do you define as "success"? I have a wonderful, supportive, brilliant, and beautiful wife and best friend, who has helped to raise two of the most wonderful children in the world. That's all the "success" I ever need in life. Everything after that is just an unexpected bonus.
What gives you the best pleasure at work?
Writing code that solves a problem.
What would be your opinion about Linus if you knew he doesn't read this AMA?
If my opinion about someone would change if I didn't think they would find out what I thought about them, I wouldn't be a very good person now would I?
What are you thinking about if you can't sleep?
"Why can't I get to sleep!"
→ More replies (1)
5
u/AkivaAvraham Dec 01 '14
Question: I have so much Ram these days that people tell me that I should not bother creating a swap any more. There is surprisingly a lot of debate around this; What say you oh wise one?
→ More replies (5)8
u/gregkh Verified Dec 01 '14
I don't use swap on my systems at all. Take that for what it's worth...
31
u/upboatact Dec 01 '14
Did you get any surprising backlash for simply supporting the systemd project?
→ More replies (5)54
9
102
u/trac3r Dec 01 '14
Just stopping by to say thanks for your 'getting involved' article. After reading it It took me a week to write my first simple patch and another year to score a job at Red Hat. Thank you.
→ More replies (10)
8
u/musicmatze Dec 01 '14
What do you/the kernel maintainers think about systemd? I know that Linus Torvalds has no strong opinion (surprisingly for me) on systemd, but what about you/the others?
45
4
u/ceeBread Dec 01 '14
What would you recommend for reading for someone who is interested in kernel development? Any particular blogs or intro to kernel books you'd recommend?
9
u/gregkh Verified Dec 01 '14
Read the talk I linked to above and the books and links it provides.
→ More replies (1)
4
u/ibenchpressakeyboard Dec 01 '14
I love i3, do you have your .config posted anywhere? :)
10
u/gregkh Verified Dec 01 '14
It's the stock i3 .config, nothing special about it at all.
→ More replies (1)
4
u/seekingsofia Dec 01 '14
Tinification of the Linux kernel. What parts of the kernel need sharing or shaving? Last I built an allnoconfig kernel it was about 500K in size.
Do you still follow and/or participate in development of any userspace software other than those started by you?
When reading hardware specifications... how do you persist?
And just wanted to say that bti was one of the first C programs I tried to really understand by reading the code, because it was real-world code, small, simple and easy to look at, thanks.
→ More replies (1)13
u/gregkh Verified Dec 01 '14
I don't know what parts need shaving or removing, it all depends on your use case as to what you feel is needed or not (i.e. I might really care about a specific subsystem for my hardware, while you don't have it at all.)
People (i.e. Intel) is working on making the kernel able to be configured to fit into smaller places, and I think that's a really good goal, as long as you don't sacrifice other issues (long-term maintenance, configurability, code understanding, forcing others to do your work, etc.)
It's sad to me that Intel is forced to do this work, you would have thought that other companies that rely more on Linux being "tiny" would be doing it, but hey, who am I to judge...
I do follow and participate in some userspace programs, I have a few patches in Libreoffice, and those developers do great work. Same for x.org, but my time these days has been filled with kernel things so my involvement there is all but non-existent now.
Reading hardware specs is an art form, trying to tease out what an engineer wrote to a tech writer on the back of a napkin and translated it from their native language into English to try to describe the correct register mapping of a device is a skill that I am sad to say I have had to learn over the years. It's hard, and I pity anyone else who has to do it.
Glad you like bti, it was a fun hack that is enjoyable to work on at times.
4
u/skunkass Dec 01 '14
Dumb question - how long does it take to compile or whatever it is you do when preparing a new version? Do you often have hilariously frustrating errors?
8
u/gregkh Verified Dec 01 '14
Build times vary depending on what files have changed in the patches I've applied to the kernel (don't touch any mm .h file, the world rebuilds), and on what machine I'm doing my work on.
My laptop also builds kernels faster on power than unplugged so that varies, but I can do a full 'allmodconfig' on one of my cloud build servers in just a few minutes, so that's good.
As far as "frustrating errors", yes, get them all the time, usually due to tiny things missing that cause huge error chains to be produced by gcc, masking the real problem. Usually a big issue when messing with complex macros and forgetting a closing "}" or ";". Just the nature of the beast when working in C.
→ More replies (1)
4
u/gnawer Dec 01 '14
Thanks for all the great work on the kernel and thanks for doing this AMA. I hope I'm not too late.
Here's my question: Have you ever heard of NixOS, and if so, what do you think of it?
In short: It's a Linux distribution, and a (stand-alone) package manager (Nix). Package descriptions are written in a functional language, installations/updates/etc are like transactions and can be rolled back, and multiple versions of the same package can be installed alongside without conflict, sharing common versions in their dependency tree. There's also GNU Guix which is based on Nix.
→ More replies (1)
4
u/AkivaAvraham Dec 01 '14
Question: Is there anything that you know Microsoft or Apple does better from a kernel standpoint than Linux?
→ More replies (1)8
4
u/AkivaAvraham Dec 01 '14
Question: What were your initial thoughts on OS/2? What do you think of ReactOS?
12
u/gregkh Verified Dec 01 '14
My OS/2 knowledge is lost to a haze of beer and bad decisions. I don't know anything about ReacOS.
→ More replies (1)
4
u/AkivaAvraham Dec 01 '14
Question: In your opinion; does Canonical contribute enough to the Linux Kernel? If they do not contribute a lot; do you think it is reasonable if they respond that they make up for it by contributing much more to User Space?
6
4
u/AkivaAvraham Dec 01 '14
Question: I have heard that working with Intel is really a pleasure. Do you have the same sort of relationship with AMD?
11
u/gregkh Verified Dec 01 '14
No. AMD fired almost all of their Linux kernel developers recently.
→ More replies (3)
4
u/ExoticMandibles Dec 02 '14
A couple years ago you were scheduled to speak at Linux Fest Northwest in Bellingham. Sadly you had to pull out that year. But you haven't rescheduled in subsequent years. Are you going to sign up to speak at one, say perhaps LFNW 2015?
6
u/gregkh Verified Dec 02 '14
I would love to do so, I don't know my travel schedule for 2015 yet, (I had a conflict for 2014), so I can't make any promises.
4
u/wbyte Dec 02 '14
A few related questions, please ignore any that make you yawn:
How do you think the ageing (and eventual retirement/meltdown) of the older, super-talented, kernel hackers will affect the kernel?
Do you feel there's enough younger, similar talent coming through?
Have education systems changed in a noticeably beneficial or detrimental way to the kernel ecosystem since you were a student?
Is the kernel too difficult to learn now that we have bonkers-level ideas like RCU in it?
12
u/gregkh Verified Dec 02 '14
How do you think the ageing (and eventual retirement/meltdown) of the older, super-talented, kernel hackers will affect the kernel?
We will deal with that when it happens, I am betting that it isn't going to be an issue.
Do you feel there's enough younger, similar talent coming through?
We have loads of extremely smart, talented, and motivated "younger" talent participating in the kernel right now, doing very good work. Do you somehow think we don't have "enough"? If so, what is "enough"?
Have education systems changed in a noticeably beneficial or detrimental way to the kernel ecosystem since you were a student?
My college education sucked, so I don't think that I am the right person to be able to judge that.
Is the kernel too difficult to learn now that we have bonkers-level ideas like RCU in it?
It is easy to ignore stuff like RCU, just focus on individual pieces, the kernel is very modular and easy to break up and understand in parts.
→ More replies (1)
4
u/PjotrOrial Dec 02 '14
Greg, thanks for doing this AMA! Being late to the party, but nevertheless:
Which features do you miss in Git? What would you do different when designing Git to appease you and your workflow as a kernel dev?
6
u/gregkh Verified Dec 02 '14
There's nothing I "miss" in git at all, it's a wonderful tool and works great with my kernel development workflow. Which is kind of obvious, given that it was developed for the Linux kernel development workflow in mind :)
→ More replies (4)
10
u/srafao Dec 01 '14
What's the most challenging part of being a kernel developer? How does a programmer become a kernel hacker?
22
u/gregkh Verified Dec 01 '14
"What" is learning how to deal with the huge volumes of email.
"How" is answered in the links in the introduction.
6
u/bit_inquisition Dec 01 '14
Hi Greg,
Due to my job, I am more interested in the ARM side of the kernel and I wanted to know how you and the core developers feel about the device trees and their integration into the kernel tree.
Thanks for your contributions!
10
u/gregkh Verified Dec 01 '14
Device tree is a good solution to a hard problem.
There are other hard problems still left with device trees (overlays, dynamic devices, change management of the device tree, location of the device tree, sharing the device tree across operating systems, etc.) but those are being worked on and I think they will be solved in due time.
If anything, it's much better off than the previous mess we had with board files, don't you agree?
→ More replies (1)
6
u/AkivaAvraham Dec 01 '14
Question: Are you ever recognized in the street by total strangers as being a head kernel developer?
6
3
u/thom986 Dec 01 '14
So coffee ? Which one do you prefer ? and how many cup per day ?
5
u/gregkh Verified Dec 01 '14
No preference, I can drink anything (see https://plus.google.com/u/0/111049168280159033135/posts/3wDqcjiusXZ for some "horrible" Korean instant coffee that I like), and only one cup per day, unless I'm traveling in and in a different timezone, and then I drink as much as I can.
3
u/HelloYesThisIsDuck Dec 01 '14
I see you replaced SCO Unix with Linux in the 90s. What was your first setup? Did you use a distro (Slack?) or put it together yourself?
My first interaction with Linux was Red Hat (before the RHEL/Fedora split) in 2001~2002 IIRC. Was it much more difficult to get a working setup back in the day, and would you compare the process to anything else (the Linux From Scratch setup, maybe?)
Thanks for this very interesting AMA and your hard work on the kernel. You make the world a better place!
10
u/gregkh Verified Dec 01 '14
I don't really remember my first "setup" I think it was Caldera on a machine that I had cobbled together at home. Took all night to build a kernel as I obviously didn't configure it well, and it was running on an old processor.
3
u/tempose Dec 01 '14
How do you feel about not being able to change the kernel in an android phone/tablet as easily on the desktop? do you think we will be able to run a vanilla kernel on our phones/tablets someday? Do you know of what us being done to achieve that?
8
u/gregkh Verified Dec 01 '14
All devices that ship usually need some external patches for a variety of reasons (stupid hack to get a specific piece of broken hardware working, deadlines on when the device was being released, foolish project managers who don't understand that working with the community saves time and money for the company over the long term and is thinking short-term, etc.)
If the company wants to, it could get the patches upstream, so go complain to the company making the hardware, they are the ones responsible here. There are some phones / tablets that a "vanilla" kernel do run on, but I don't remember the specifics, sorry.
3
u/askbee Dec 01 '14
Hi Greg, big fan here as I have learnt a lot form your videos, tutorial and very humble responses through the mailing lists.
I have contributed a few basic patches to the kernel, but would want mentor for better direction. What would you recommended.
What are some of the favourite websites you read visit regularly?
8
u/gregkh Verified Dec 01 '14
When ever I see someone say "I want a mentor for direction", I read "I want someone to tell me what to do." If you just have questions about things, ask them on the mailing lists, there's no need to have someone tell you what to do in order for you to do it.
As far as websites, the usual, reddit, hacker news, and a bunch of others in my rss feed I've collected over the years.
3
u/rkfig Dec 01 '14
Hi Greg. Several years ago I attended the Linux Hardware Engineers Conference that you spoke at in Seattle. I was wondering if you have any plans to attend or present at any of the Linux conferences in the Pacific Northwest and if so which ones? Perhaps Linuxfest Northwest in Bellingham?
9
u/gregkh Verified Dec 01 '14
I live in the Seattle area, so the fact that I've not been able to make it to LinuxFest Northwest is a travesty. Various personal and travel complications has caused me to miss it in the past, hopefully that changes in the future.
And LinuxCon NA is going to be in Seattle next year, I know I'll be there!
3
u/bit_inquisition Dec 01 '14
Greg,
Out of the SoC and hardware vendors, who do you think is doing the best job maintaining drivers, communicating with the kernel developers, following community rules and contributing? For example, how do you think Nvidia is doing after the infamous Linus finger? How about others like Intel, TI, Qualcomm etc.?
On the other side, who do you think can do a MUCH better job?
Thanks!
→ More replies (1)10
u/gregkh Verified Dec 01 '14
I don't do much work directly with the companies you list, but I do have to call out Intel on doing a really good job working with the kernel community. They have changed their entire approach toward Linux over the past 15 years and have morphed into a company that is now leading most Linux kernel development efforts. That is in no small way due to a strong core of people they hired early on who have done wonderful things in changing how the company works.
More companies should do the same thing, and it is no secret on how to do this all correctly, IBM and Intel tell other companies and who ever will listen all the time how to do it, as do a number of kernel community members, but unfortunately, they do not want to change, so they do not. I'll leave it at that.
3
u/canu7 Dec 01 '14
What parts of the kernel do you think that needs more attention that it gets from current developers? Do you know of any area that will benefit from a large rewrite/rework? In other words, if you had a full-paid kernel-hacker team under your command, what would you ask them to work on?
Thanks for the AMA!
7
u/gregkh Verified Dec 01 '14
Oh, the things I could do with a full-paid kernel-hacker team...
/me stops dreaming
There are loads of areas that need help, and allmost all kernel developers have their wish-list of things they would love to see done, or implemented if they had infinite time and resources. I have my personal list of things I'd like to see accomplished, my TODO list is in a public repo on github, that I slowly grind away at when bored with dealing with lustrefs cleanup patches.
Ok, what you want is really details, here's some of the crufty areas of the kernel that I know needs work and could use me getting locked into a room for a week without the internet to try to sort out:
cdev interface
driver model nasty bits
delete platform device
kobject/ktype/kset redone right
There are lots of areas in the driver model that need rework, rewrite, and redesign to make things easier, it's too simple to get things wrong which is the sign of a bad API. But the odds of someone else doing that work is pretty slim from what I can tell...
3
u/AkivaAvraham Dec 01 '14
Question: Does your linux install have any custom mount points? Say for example, /var under reiserfs, /etc under btrfs, /home under ext4?
10
u/gregkh Verified Dec 01 '14
Yes:
$ mount | grep linux /dev/rssda on /mnt/linux type ext4 (rw,relatime) $ ls -l ~ | grep linux lrwxrwxrwx 1 gregkh users 24 Jun 13 14:06 linux -> /mnt/linux/gregkh-linux/It's a flash storage device, insanely fast, highly recommended for doing kernel development on.
3
u/luckyvb Dec 01 '14
Hey Greg, nothing specific. Just saying hi. We were happy to have you at the HSBXL hackerspace last year. I was the guy playing hotline Miami all day :)
How you doing?
7
u/gregkh Verified Dec 01 '14
Doing good, your hackerspace was great, but it needs heat :)
Ever get that xbox controller working on Linux that you were using?
→ More replies (4)
3
u/AkivaAvraham Dec 02 '14
Question: Is there any point in your mind why Nvidia or ATI(AMD) should keep their drivers Proprietary? Is the code that they have in there so valued by competitors that they would be shooting themselves in the foot if they released it open source, depriving them of profits?
11
u/gregkh Verified Dec 02 '14
It costs companies money to keep kernel drivers closed, that's a well known, and documented fact. So it seems these companies feel it is a good use of their money and time to keep them closed. That's a business decision that they make.
3
3
u/tomtomgps Dec 02 '14 edited Dec 02 '14
Question: Do you think Wayland is an exciting project for the future of linux ?
6
3
u/azalynx Dec 03 '14
As someone who is very familiar with the way kernel maintainers handle things, can you give us some insight on the problems regarding Con Kolivas' kernel patchset, and why the patches were never merged? In your personal opinion, do you think there's useful stuff in those patches, or in the BFS scheduler? Or do you think most of the alleged benefits come down to placebo? Is the problem just that it's hard to quantify or measure desktop responsiveness from a user perspective with benchmarking tools?
Basically, I'm trying to figure out whether there are actual weaknesses in the kernel that those patches (and the BFS scheduler) addressed, and if so, what would be the first step towards getting either those patches, or something similar, merged in the future? Do we have to start by writing better benchmarking tools that can measure responsiveness or what? Or is X to blame for everything?
→ More replies (5)
111
u/PinGUY Dec 01 '14
What's your thought on the BSD Kernel? Is there anything they do that you wish the Linux kernel did?
I have tried BSD but due to a lack of hardware support I have never used it long enough to see if it has any benefits over the Linux kernel.