New website: https://rhythm16.github.io
在2011年7月以前,linux版本號有三個數字,例如2.6.39
其中
2011/7/21,核心版本3.0釋出,Linus為了整齊把版本號換成兩個。
現在的開發流程,新核心版本會從一個為期兩週的"merge window"開始,Linus在這期間會接受各方面新功能的patch,把他們merge到核心中。Merge window過了之後,穩定化階段開始,持續的測試並debug新的核心,每週會發布一個"release candidate",表示方法是在版本號之後加上-rc#
,第幾個rc, '#'就代入那個數字,舉例現在最新的核心5.9-rc2
就是第二個5.9
版的release candidate。目前每個新核心大概會有8個rc,之後就會正式釋出,下一個版本的merge window重新開始。
上述的核心版本是最新的,版本號走在最前面的,叫做mainline kernel,由Linux原作者Linus Torvalds維護。
Mainline核心正式釋出之後,會轉移到stable分支上,這個分支由Greg Kroah-Hartman維護,這裡的核心會持續受到維護、debug等等,並在版本號上加上第三個數字表示修訂的版本。
通常,stable分支只會維護到最新開發循環的前一到兩個版本,例如現在是mainline 5.9
的rc2
階段,5.8
和5.7
就在stable中維護,5.6
就不再受到更新。
除此之外,有些核心版本被挑選為longterm,會受到持續的測試與維護,約一兩年。每年至少有一個版本會被選為longterm,滿足對於穩定核心的需求。
這樣看下來點進https://www.kernel.org就應該看得懂那些版本號的意思了!
參考: Chris Simmonds. (2017). Mastering Embedded Linux Programming Second Edition. Packt Publishing
New website: https://rhythm16.github.io 一路的故事是滿意外的,有天跟同學吃飯聊到了我讀的32bit x86架構的memory reference,又再一次提醒了我我對於64bit一無所知的事實。回家手癢google了"x86_64 memory reference",前幾個搜尋結果是linux kernel的documentation,瀏覽了一下竟然發現有句話讀起來怪怪的: "16M TB" might look weird at first sight, but it's an easier to visualize size notation than "16 EB", which..(後省略) "easier"後面少了一個"way"啊! 這在平常可能不算什麼,就少個字,也不至於影響閱讀,但我馬上想到了jserv教授之前在facebook發文提到了一個四歲小孩在爸爸工作時看到了kernel排版少了一個'=',爸爸就幫忙發了一個patch,也被接受了,說明這種重要的大專案連排版這種小錯也是要修正的。
Oct 26, 2022New website: https://rhythm16.github.io I have always wondered how the linux kernel translates addresses to symbol names. This mechanism (called kallsyms) is used in multiple places in the kernel, for example in the panic() call the kernel prints out the call trace with function names and offsets with no problem at all, also the ftrace system is able to show the user all function names that the kernel has run, similarly, using kallsyms. This article written in Chinese explains the translation mechanism pretty well, and is worth a read if one is interested in knowing how it is done. However when discussing this topic with a professor, he asked me how I can find the raw bytes of the symbols used by kallsyms which are explained in the linked article above e.g. kallsyms_addresses and kallsyms_num_syms, etc. So, I set to find out where they are. It is unlikely for me and you to use the exact same kernel image, so the offsets and symbols won't be the same. Moreover, I'm using an ARMv8 image of linux version 5.4. From the article linked above we know that the kallsyms symbols are in the .rodata section, lets see where it is:
Oct 26, 2022New website: https://rhythm16.github.io I think most people (even some computer science people, including me) only think of cryptocurrencies anytime when "blockchain" is mentioned. However I recently learned a bit about how git works internally and was very surprised by how similar it is to some of the bitcoin/blockchain concepts introductions that I have studied. So as a note and sharing of this interesting finding, in this article, I'm going to try to explain how git provides its fundamental functionalities, and hopefully if the reader is somewhat familiar with the basic blockchain concepts, can easily see what I claim in the title of the post. Blockchain knowledge is not required to understand this article, though. I'll be mostly talking about the git internals. Only basic git knowledge is assumed. Toy repo setup I'll setup a simple git repository for demonstration purposes, all commands in this article will be issued in the repo. Setup: # be sure to not be in a repository!
Oct 26, 2022New website: https://rhythm16.github.io 本篇內容來自Paul E. McKenney的perfbook Appendix C "Why Memory Barriers"以及蜗窝科技網誌上的翻譯,快速地讀完一次之後覺得基本的原理了解了,不過說到細節還是有很多需要釐清的部分,所以想用自己的方式寫下來。內容會比原文少非常多,要完整的學習的話建議閱讀原文。 Ascii art generated by asciiflow. Stores 有時候很慢 這是對一個SMP系統的簡略想像: ┌───────┐ ┌───────┐ │ CPU 0 │ │ CPU 1 │
Oct 26, 2022or
By clicking below, you agree to our terms of service.
New to HackMD? Sign up