<feed xmlns="http://www.w3.org/2005/Atom"> <id>https://jianyue.tech//</id><title>简 悦</title><subtitle>A personal blog of a PhD student in computer architecture.</subtitle> <updated>2024-09-24T15:11:24+08:00</updated> <author> <name>张丘洋</name> <uri>https://jianyue.tech//</uri> </author><link rel="self" type="application/atom+xml" href="https://jianyue.tech//feed.xml"/><link rel="alternate" type="text/html" hreflang="zh-CN" href="https://jianyue.tech//"/> <generator uri="https://jekyllrb.com/" version="4.3.4">Jekyll</generator> <rights> © 2024 张丘洋 </rights> <icon>/assets/img/favicons/favicon.ico</icon> <logo>/assets/img/favicons/favicon-96x96.png</logo> <entry><title>使用 io_uring 进行 NVMe 命令的异步透传</title><link href="https://jianyue.tech//posts/io_uring-passthrough/" rel="alternate" type="text/html" title="使用 io_uring 进行 NVMe 命令的异步透传" /><published>2023-08-16T20:22:00+08:00</published> <updated>2024-03-27T16:15:10+08:00</updated> <id>https://jianyue.tech//posts/io_uring-passthrough/</id> <content src="https://jianyue.tech//posts/io_uring-passthrough/" /> <author> <name>张丘洋</name> </author> <category term="SSD" /> <summary>2024/03/27 更新：USENIX FAST’24 上的论文 I/O Passthru: Upstreaming a flexible and efficient I/O Path in Linux 详细介绍了 NVMe 驱动的 passthru。 Linux 5.19 开始加入了 IORING_OP_URING_CMD 的支持，该 io_uring 命令可以理解为异步的 ioctl，可以将对应的子命令交给对应的驱动异步执行。其中 NVMe 驱动加入了 NVME_URING_CMD_IO 这一子命令，该命令和原来 NVMe 驱动中的 NVME_IOCTL_IO_CMD ioctl 命令类似，能够支持 NVMe 命令的透传（passthrough），使用户直接提交 NVMe 命令对应的 SQE，并获取对应的 CQE（一般情况下程序是通过内核的 bio、vfs 等层次间接的与 ...</summary> </entry> <entry><title>FEMU 代码分析</title><link href="https://jianyue.tech//posts/femu/" rel="alternate" type="text/html" title="FEMU 代码分析" /><published>2023-07-02T19:36:00+08:00</published> <updated>2023-08-16T20:21:19+08:00</updated> <id>https://jianyue.tech//posts/femu/</id> <content src="https://jianyue.tech//posts/femu/" /> <author> <name>张丘洋</name> </author> <category term="SSD" /> <category term="Simulator" /> <summary>FEMU 是 FAST’18 上的一篇 SSD 模拟器论文（The CASE of FEMU: Cheap, Accurate, Scalable and Extensible Flash Emulator），在 QEMU 模拟器上实现。FEMU 使用内存模拟后端存储。时延的模拟是通过等待真实的时间流逝到期望的时延。FEMU 代码开源，源码仓库为：GitHub - vtess/FEMU，位于 hw/femu/ 目录下。本文对 FEMU 的代码进行分析学习。 编译和运行 在较新的 Linux 内核版本中 NVMe 初始化逻辑与之前不太相同，FEMU 无法正确完成初始化，会报以下错误。在最新的 FEMU 代码中已纠正，见 Fix 5.19 Kernel NVMe CC issue by nicktehrany · Pull Request #96 · vtess/FEMU · Git...</summary> </entry> <entry><title>Ceph 块存储 RBD 在 RDMA 网络下的部署</title><link href="https://jianyue.tech//posts/devops-ceph-rdma/" rel="alternate" type="text/html" title="Ceph 块存储 RBD 在 RDMA 网络下的部署" /><published>2023-02-10T18:55:01+08:00</published> <updated>2023-02-10T18:55:01+08:00</updated> <id>https://jianyue.tech//posts/devops-ceph-rdma/</id> <content src="https://jianyue.tech//posts/devops-ceph-rdma/" /> <author> <name>张丘洋</name> </author> <category term="DevOps" /> <category term="Block" /> <summary>这里记录一下 Ceph 的块存储 RBD 使用 RDMA 网络（RoCE v2）的配置过程。主要参考的是 Ceph 的官方文档（然而并没有 RDMA 配置部分）以及 Bring Up Ceph RDMA。 集群配置 刚开始尝试使用 cephadm bootstrap 命令配置，但可能是因为 RDMA 网卡没有暴露给 docker 容器的原因，这种方式没有配置成功。于是选择了手动配置。 手动编译 Ceph 出了各种问题，于是选择了直接使用官方提供的 https://download.ceph.com/ apt 源，Ubuntu 20.04 默认的 Ceph 版本似乎不行。见 Get Packages — Apt。 为了方便这里把认证都关闭了，所以下面没有运行生成 keyring 的过程。 首先是 monitor map 的创建，见 Manual Deployment： mo...</summary> </entry> <entry><title>Obsidian 笔记自动转换为 Jekyll 博客</title><link href="https://jianyue.tech//posts/obsidian-to-jekyll/" rel="alternate" type="text/html" title="Obsidian 笔记自动转换为 Jekyll 博客" /><published>2023-01-07T10:31:46+08:00</published> <updated>2023-01-14T00:04:17+08:00</updated> <id>https://jianyue.tech//posts/obsidian-to-jekyll/</id> <content src="https://jianyue.tech//posts/obsidian-to-jekyll/" /> <author> <name>张丘洋</name> </author> <category term="DevOps" /> <summary>前言 之前一直想搭一个博客，搭了几次但一篇文章没写过🙃，最近在使用了 Obsidian 作为自己的个人笔记后感觉一些笔记内容可以直接写到博客里，但是直接把 Obsidian 中的 md 文件作为 Jekyll 博客的博文还是会有一些问题，所以就想着写一个脚本能够自动地转换 md 文件并且能够自动部署。折腾了半天最终可以实现一键转换和部署，其执行流程如下： 在 Obsidian 笔记中用 md 写笔记 挑选哪些笔记是可以作为博文的，将其添加进 Posts 笔记中 运行 python 脚本，将对应的笔记转换成 Jekyll 博文并保存在本地的 Jekyll 仓库中 Python 脚本会将本地的 Jekyll 仓库推送到 github/gitee Github/Gitee 中收到 push 后会访问 webhook URL 服务器 nginx 收到 webho...</summary> </entry> <entry><title>Linux 硬盘恢复</title><link href="https://jianyue.tech//posts/disk-recovery/" rel="alternate" type="text/html" title="Linux 硬盘恢复" /><published>2023-01-04T15:54:38+08:00</published> <updated>2023-01-06T17:32:04+08:00</updated> <id>https://jianyue.tech//posts/disk-recovery/</id> <content src="https://jianyue.tech//posts/disk-recovery/" /> <author> <name>张丘洋</name> </author> <category term="DevOps" /> <summary>2023 年 1 月 4 日记录一下硬盘分区表损坏以及文件系统损坏的恢复过程（虽然没有成功恢复 ）。 起因是因为某同学切换内核不知道是怎么操作的导致服务器不能连接。去机房发现对应的机器卡在了启动界面，进入 BIOS 发现无法识别到 NVMe SSD 盘。引导进入 U 盘的 Ubuntu Server Live，在 Help 中进入终端，发现系统能够识别到 NVMe SSD 盘 /dev/nvme0n1，通过 fdisk -l 发现没有分区表。搜索后发现可以通过 testdisk 来恢复分区表。Ubuntu Server Live 本身没有 testdisk，需要通过 apt 安装。先退出终端，将安装过程中的配置网络那一步运行完，之后再次进入终端安装 testdisk。运行 testdisk 尝试分析硬盘的分区表。testdisk 发现了两个分区，如下图所示的两个 Linux fil...</summary> </entry> </feed>
