avatar

Life of a Programmer

`Simplicity is prerequisite for reliability.’ - EWD

What Is a PDU

以前在 Ceph 上跑虚拟机的时候,偶尔看到 libvirt 报错: qemu unexpectedly closed the monitor: sending req data... pdu length 134, total length 142 the received hdr shows the err 0, the pdu length 198 ... 当时不知道这个 pdu 是啥意思。搜了一圈 libvirt, Qemu, Ceph

Texas Sharpshooter Fallacy

Steven Pinker 在《理性》一书中讲到一则德克萨斯神枪手谬误: 有个德州人朝着自己的谷仓射了许多子弹,在弹孔最密集的地方画一个圈,然后自称是神枪手。1 “先射

Interpreting Kernel Call Trace

假设有 Call Trace 如下: [89580.077835] task:kworker/u195:0 state:D stack: 0 pid:9848 ppid: 2 flags:0x80004080 [89580.077840] Workqueue: events_unbound async_run_entry_fn [89580.077845] Call Trace: [89580.077847] __schedule+0x2d1/0x860 [89580.077852] ? scan_shadow_nodes+0x30/0x30 [89580.077856] schedule+0x35/0xa0 [89580.077857] io_schedule+0x12/0x40 [89580.077859] do_read_cache_page+0x4eb/0x740 上面这段日志是由 kernel/sched/core.c 中的 sched_show_task() 函数打印的。 任务信息 🔗task:kworker

Readings 2023 WW52

2023年的最后一周,看完了刘勃老师的天下英雄谁敌手。 书的主角就两位:曹操和刘备。 后来的桓温在很大程度上和曹操很像,而刘备的战斗力在《三国演

SATA Hotplug

SATA/SAS 规范中要求支持热插拔,因此 SATA/SAS 平台在热插拔上应该问题较少 – 当然也还是有一些坑。kernel.org有篇Wiki讲述了 SATA Hotplug 的硬件要求。有点意思