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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

Global Kernel Locks in APFS

141 点作者 indygreg2超过 6 年前

5 条评论

kiwijamo超过 6 年前
I wonder if this is why recent versions of macOS performs so poorly on old HDD-based MacBooks. The difference between my work's 2012 MacBook (HDD) and my personal 2015 (SSD) MacBook is like night and day. Most apps open in a second on my SSD MacBook yet take up to a minute to open on my employer's HDD MacBook. It's not just this MacBook, I also see the same on a work iMac as well. Such a shame as these older machines previously didn't run so slowly.
评论 #18334182 未加载
评论 #18334180 未加载
评论 #18335913 未加载
chmaynard超过 6 年前
The author worked very hard to determine the root cause of the problem but he was stymied because the APFS source code is not available. Why not? Apple has open-sourced the Swift compiler with great success, but there seems to be no movement within Apple to open up other system software components.
评论 #18332978 未加载
评论 #18333445 未加载
评论 #18332711 未加载
评论 #18332793 未加载
twotwotwo超过 6 年前
I&#x27;m too late to the thread, but wonder if locking might have to do with updating access times on the dirs on read--that would help justify a read-only workload taking some sort of exclusive lock. The &quot;fix&quot; there would be something like relatime to get atimes set infrequently.<p>There&#x27;re def a ton of other possibilities. Some locking could be overbroad, like an exclusive lock where a reader lock would be enough. I don&#x27;t see super-strong evidence that any locks involved are actually <i>global</i>, just that they&#x27;re under contention here. And I can understand shipping a product with somewhat excessive locking because perf issues with specific workloads are a better problem to have with your shiny new FS rollout than data loss.<p>Anyway it&#x27;s mostly shooting in the dark for us here (though cool some folks disassembled the functions), but there are some shots in the dark that look different from what I could find in the comments already here :)
lelf超过 6 年前
Absolutely <i>nothing</i> there indicates the presence of global kernel locks. <i>readdir</i> (obviously!!!) needs to hold a lock, it’s not global, it’s per-DIR.
georgn超过 6 年前
As someone who used to work on BitKeeper, I&#x27;m tickled to see a more popular SCM&#x27;s test suite as a kind of de facto filesystem benchmark -- confirming what we had been observing ourselves forever.