TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Evolution of the x86 context switch in Linux (2018)

192 点作者 chowyuncat超过 6 年前

9 条评论

bogomipz超过 6 年前
Can someone say why is using the TSS still mandatory with software-based task switching? Is this a requirement imposed by x86?<p>In looking at the OS dev wiki I see the following:<p>&gt;&quot;The TSS is primarily suited for hardware multitasking, where each individual process has its own TSS. In Software multitasking, one or two TSS&#x27;s are also generally used, as they allow for entering Ring 0 code after an interrupt.&quot;<p>Would you not be able to enter Ring0 after an interrupt with a TSS entry? Is this why it is still required?
评论 #18994251 未加载
dekhn超过 6 年前
I recall reading a paper comparing Linux and Solaris context switch times in ~98 and Linux was 10-100X faster. Solaris did something incredibly slow and safe.
评论 #18994260 未加载
filereaper超过 6 年前
Enjoyed this article, anybody know the significance of adding the do..while(0) loop within the macro starting Linux 1.3?<p>Was curious if it guards against some C pre-processor issues.<p><pre><code> &#x2F;** include&#x2F;asm-i386&#x2F;system.h *&#x2F; #define switch_to(tsk) do { [...] } while (0)</code></pre>
评论 #18991445 未加载
评论 #18991552 未加载
souprock超过 6 年前
An addition to &quot;Linux 2.2 (1999)&quot; is: introduced meltdown vulnerability. That was the then-unknown cost of software context switching.<p>Later, with Red Hat&#x27;s 4g4g kernels that Linus rejected, the problem would go away for people who installed Red Hat&#x27;s version of the OS on systems with many gigabytes of memory.
评论 #18993921 未加载
amluto超过 6 年前
Nice article!<p>If you want to have lots of fun, you could look at switch_mm() on a modern kernel :)
Upvoter33超过 6 年前
This is really well done, bravo.
glonq超过 6 年前
Very thorough. Nice job.
MichaelMoser123超过 6 年前
anyone knows what Ingo Molnar is doing these days?
评论 #18995299 未加载
heinrichhartman超过 6 年前
I really like how good the article looks when printed. I enjoy reading long, in-depth articles much more when I can read them in print. Unfortunately many blog posts need a lot of tweaking until I can get an acceptable print result. This one looks good enough without any trickery.<p>Thanks to the author, for caring about the paper people. : )
评论 #18993385 未加载