今日重点:💬 地道表达——今天 linux-mm 上有两场真实的讨论教学: Virtualized Swap 线程里,Gregory Price 用一句 'simple' is doing a lot of work here 礼貌地戳破了「这事儿很简单」的说法;mglru v5 评审里,Kairui Song 示范了 开口先致谢、再提「小挑剔」的标准动作。这些话背下来,明天就能用在你自己的评审里。
📖 原文现场(真实邮件,逐字引用)
/ sectionIt may be good to talk about this in terms of discrete workflows and interfaces, rather than in the abstract. Just describing effects creates a confusing situation without including the cause. Isn't this as simple as having something like: echo 1 > /sys/kernel/mm/swap/drop_cache ('simple' is doing a lot of work here)
出处:Gregory Price (Meta),Re: Path forward for Virtualized Swap?,linux-mm, 〔10-25 04:48 北京〕。背景:Kairui 希望有一种办法能彻底关掉虚拟化交换层(vswap)、连元数据也释放掉; Rik van Riel 解释 swap cache 是 VM 的核心、拿不掉,但 swapoff 可以把数据清空。 Gregory 这时插话:别在抽象层面打转了,落到一个具体接口上。 原文
💬 逐句拆:六处地道说法
/ column 'simple' is doing a lot of work here 全场最佳。字面是「simple 这个词在这里承担了太多工作」——真正的意思是:你说它简单,是把所有复杂性都塞进了这个词里。用拟人化(一个词在「干活」)代替直接说 you're oversimplifying,既点了问题又不伤人。括号一裹,像是随口的自嘲兼提醒。下次有人说 just do X,你就可以回:just is doing a lot of work here。
talk about this in terms of X, rather than in the abstract in terms of=「从…的角度谈」;in the abstract=「空谈、停留在抽象层面」。整句是评审里把讨论拉回地面的标准句式:别谈效果,谈工作流和接口。后半句 Just describing effects creates a confusing situation without including the cause 给出理由:只描述效果、不说原因,只会越说越糊涂。
OK, so you are looking for a way to ... Rik 的开场(〔10-25 02:17 北京〕):先复述一遍对方的需求,再回答。OK, so you are looking for a way to totally depopulate the swap cache——用 so 引出「我理解的是」,既确认自己没会错意,也让对方有机会纠正。长线程里这句话能省三轮往返。原文
keeping the current ... around Rik:I think we can accomplish that by simply keeping the current swapoff code around。keep ... around=「把现有的…留着别动」,口语里 keep it around 是「先别扔」。内核语境里它同时表态「不删旧代码、不加新机制」——是「复用现有方案」最轻描淡写的说法。
Does that meet the needs of your use case? 还是 Rik。给完方案后的收尾问句:这满足你的使用场景吗?内核评审里需求方和方案方常不是同一个人,这句话把球踢回给提需求的人确认,避免「我觉得行」式自嗨。meet the needs of 比 satisfy your needs 正式半档,刚好适合邮件列表。
Thanks for pushing this series forward / One nit pick so far is ... Kairui 的 mglru v5 评审开场(〔10-25 00:10 北京〕):先 Thanks for pushing this series forward!(push forward=推进),再 One nit pick so far is the test data seems redundant...,maybe we can just keep one of them。nit pick(挑小刺)=不阻塞合并的小意见,配上 maybe we can just... 的建议口吻——这是「我认真看了,但只有小意见」的标准表达方式,维护者看到 nit 就知道不用紧张。原文
✨ 辅助彩蛋:术语卡
/ column★ swapoff(交换关闭)
原文定义 keeping the current swapoff code around, which scans through the virtual memory of all processes and brings the memory out of swap
中文解释 swapoff 是「关掉交换设备」的系统调用,它的现有实现会扫遍所有进程的虚拟内存,把还在交换区里的数据搬回内存。所以 Rik 说:想清空 swap cache,把这套现成代码留着用就行,不用造新轮子。
记忆钩子 swap + off——不是「删掉交换」,而是「把交换区腾空再摘下」。今天这场讨论的核心分歧就是:vswap 这一层能不能像 rmmod 一样整个卸掉(不能——swap cache 长在 VM 核心里),但 swapoff 至少能把数据清空。
和你相关 和你相关:做内存或虚拟化方向时,swapoff 的「腾空再摘下」语义是所有 swap 相关设计的下限——任何新层都得回答「swapoff 时你怎么办」。
🔗 原文
✍️ 今日练习
/ column✍️ 场景写作(英文,两三句):有同事在评审里说「这很简单,加个开关就行」(It's simple, just add a knob)。你不同意——这个开关背后藏着不少复杂性。请礼貌地戳破:① 用上 X is doing a lot of work here;② 用 in terms of ... rather than in the abstract 把讨论拉回具体;③ 结尾用 Does that meet the needs of your use case? 或同类确认句收尾。
💡 显示答案
参考(仿写示范,非原文):I see the appeal, but I think 'simple' is doing a lot of work here — the knob hides the question of who owns the state after teardown. It may be good to talk about this in terms of the exact sysfs interface and the cleanup path, rather than in the abstract. If we spell those out, does that meet the needs of your use case?
📖 原文:It may be good to talk about this in terms of discrete workflows and interfaces, rather than in the abstract. Just describing effects creates a confusing situation without including the cause. Isn't this as simple as having something like: echo 1 > /sys/kernel/mm/swap/drop_cache ('simple' is doing a lot of work here)
📎 原文引用 每日一句:When someone says it's simple, ask which word is doing all the work.
素材:lore.kernel.org linux-mm(Virtualized Swap 线程 · mglru v5 评审)· 北京时间