成为 Kernel Hacker 之路

2014-01-05 14:49:55 +08:00
 Livid
http://jvns.ca/blog/2014/01/04/4-paths-to-being-a-kernel-hacker/
5082 次点击
所在节点    程序员
8 条回复
rockpine
2014-01-05 14:58:00 +08:00
每次看到你得头像,都会想起日本电影《死亡笔记》中的L
moroumo
2014-01-05 14:59:02 +08:00
这个的确是我以前的梦想
efi
2014-01-05 14:59:45 +08:00
The kernel community has never really had to worry about attracting new developers, but new kernel developers may become harder to find in 2014. Kernel development is getting harder to get into, and the level of contributions from unpaid developers has been falling for years. An environment where an understanding of Documentation/memory-barriers.txt is increasingly necessary is going to be off-putting for a lot of potential developers, who may just decide to focus on JavaScript applications instead.

http://lwn.net/Articles/578124/
Tonn
2014-01-05 15:13:11 +08:00
学过的简单,没学过的觉得难,虽然许多时候用不着,但memory barrier以及相关的原子操作问题确实可以搞死一批人。

最近在看kernel网站的perfbook很不错:
https://www.kernel.org/pub/linux/kernel/people/paulmck/perfbook/perfbook.html
efi
2014-01-05 17:05:20 +08:00
@Tonn 学时简单,用时出bug 最近的例子 http://lwn.net/Articles/577545/ http://lwn.net/Articles/575835/ 还都是职业内核开发
Tonn
2014-01-05 17:36:40 +08:00
@efi 对,要想得很仔细才行,尤其是在实现并行lock-free的东西,人的思维是顺序的,世界却是并行的。
chengzi
2014-01-06 00:18:11 +08:00
@efi 这英语读着好顺畅
cyfdecyf
2014-01-06 11:21:02 +08:00
@Tonn @efi 这东西学起来也不简单。想要弄清楚 reorder 如何发生得了解 CPU store buffer, invalidate queue, cache coherence protocol 之类的概念。仅仅知道怎样用 memory barrier 阻止 reorder 也不会知道 barrier 指令最好应该放在哪里,我有过一个程序因为插入 barrier 指令位置的差别有 5% 的性能差异。

好在写用户态程序多数时候也不用关心这个,除非是实现 ad hoc 的同步机制和提供并发数据结构,用别人实现好的同步机制一般已经把这些问题隐藏掉了。

当然坑依然存在,开始学 Go 的时候觉得并发编程终于简单了很多,但看过 Go Memory Model 之后发现有了语言抽象之后只不过把这种坑发生的层次提高到语言级别,一不小心还是会踩到。

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/95731

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX