avatar

Life of a Programmer

`Simplicity is prerequisite for reliability.’ - EWD

Linux AIO

对 Linux 的 AIO 一直是一些碎片化的知识,没有好好总结。我们知道,AIO 的推荐使用场景是访问块设备、结合 O_DIRECT 一起使用。比如,CephBlockDevic

Readings 23Q3

自从用上 BOOX Note X2 后,看书的时间变多了,尤其文史书籍看起来特别快。如果书城里(用的“得到”)电子书的笔记能在本地自动保存一份,方便复习,何其快哉

`O_DIRECT' undeclared

用 gcc 编译代码时报错:'O_DIRECT' undeclared. 看操作历史,之前一直用的 g++ 没报错。感觉有点奇怪。加上参数 -E 导出预处理过程对比了一下: 处理的文件都一

A Little C++

好久没用 C++ 了,当项目里重度使用现代 C++(c++11 以及后续标准) 的新特性时,就有点力不从心 – 书到用时方恨少。 template <typename... A> void set(A&&... a) noexcept { assert(_u.st == state::future); new (this) future_state(ready_future_marker(), std::forward<A>(a)...);

(Old) Seastar and C++17

在 CentOS Stream 8 上编译老版本 Seastar 时碰到两个问题,记录一下。 cannot deduce template arguments for ‘tuple’ from () 🔗编译 sharded.hh 报错,用最新的代码也还是错,于是手动修改如下: --- include/seastar/core/sharded.hh.orig 2023-11-01 15:22:58.800059019 +0800