-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
189 lines (171 loc) · 28 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
<!DOCTYPE html>
<html itemscope itemtype="http://schema.org/WebPage" lang="en">
<head>
<meta name="generator" content="Hugo 0.119.0">
<meta name="theme" content='FixIt v0.2.18'>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=2">
<meta name="robots" content="noodp" />
<meta name="google-site-verification" content="BgUHgNcBMb7gYvy2sM6W6KrWgBuDk4YU9eooUbig5oM" />
<title>Coding Panda's Blog</title><meta name="author" content="Zhiwei Zhang">
<meta name="author-link" content="https://github.com/zhiwayzhang">
<meta name="description" content="" /><meta name="keywords" content='Hugo, FixIt' /><meta itemprop="name" content="Coding Panda's Blog">
<meta itemprop="description" content=""><meta property="og:title" content="Coding Panda's Blog" />
<meta property="og:description" content="" />
<meta property="og:type" content="website" />
<meta property="og:url" content="https://zhiwayzhang.github.io/" />
<meta name="twitter:card" content="summary"/>
<meta name="twitter:title" content="Coding Panda's Blog"/>
<meta name="twitter:description" content=""/>
<meta name="application-name" content="FixIt">
<meta name="apple-mobile-web-app-title" content="FixIt"><meta name="theme-color" data-light="#f8f8f8" data-dark="#252627" content="#f8f8f8"><meta name="msapplication-TileColor" content="#da532c"><link rel="shortcut icon" type="image/x-icon" href="/favicon.ico" />
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png"><link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png"><link rel="mask-icon" href="/safari-pinned-tab.svg" color="#5bbad5"><link rel="canonical" href="https://zhiwayzhang.github.io/" /><link rel="alternate" href="/index.xml" type="application/rss+xml" title="Coding Panda's Blog">
<link rel="feed" href="/index.xml" type="application/rss+xml" title="Coding Panda's Blog"><link rel="stylesheet" href="/css/style.min.css"><link rel="stylesheet" href="/lib/fontawesome-free/all.min.css"><link rel="stylesheet" href="/lib/animate/animate.min.css"><script type="application/ld+json">
{
"@context": "http://schema.org",
"@type": "WebSite",
"url": "https:\/\/zhiwayzhang.github.io\/","inLanguage": "en","author": {
"@type": "Person",
"name": "Zhiwei Zhang"
},"name": "Coding Panda's Blog"
}
</script></head>
<body data-header-desktop="sticky" data-header-mobile="auto"><script>(window.localStorage?.getItem('theme') ? localStorage.getItem('theme') === 'dark' : ('auto' === 'auto' ? window.matchMedia('(prefers-color-scheme: dark)').matches : 'auto' === 'dark')) && document.body.setAttribute('data-theme', 'dark');</script><div class="wrapper" data-page-style="normal"><header class="desktop animate__faster" id="header-desktop">
<div class="header-wrapper">
<div class="header-title">
<a href="/" title="Coding Panda's Blog"><img loading="lazy" src="/img/kaifanle.gif" srcset="/img/kaifanle.gif, /img/kaifanle.gif 1.5x, /img/kaifanle.gif 2x" sizes="auto" data-title="Coding Panda's Blog" data-alt="Coding Panda's Blog" class="logo" style="background: url(/svg/loading.min.svg) no-repeat center;" onload="this.title=this.dataset.title;this.alt=this.dataset.alt;for(const a of ['style','data-title','data-alt','onerror','onload']){this.removeAttribute(a);}this.dataset.lazyloaded='';" onerror="this.title=this.dataset.title;this.alt=this.dataset.alt;for(const a of ['style','data-title','data-alt','onerror','onload']){this.removeAttribute(a);}"/><span class="header-title-text">Coding Panda's Blog</span></a><span class="header-subtitle"></span></div>
<nav>
<ul class="menu"><li class="menu-item active">
<a
class="menu-link"
href="/"
><i class="fa fa-home fa-fw fa-sm" aria-hidden="true"></i> Home</a></li><li class="menu-item">
<a
class="menu-link"
href="/posts/"
><i class="fa-solid fa-archive fa-fw fa-sm" aria-hidden="true"></i> Archives</a></li><li class="menu-item">
<a
class="menu-link"
href="/categories/"
><i class="fa-solid fa-th fa-fw fa-sm" aria-hidden="true"></i> Categories</a></li><li class="menu-item">
<a
class="menu-link"
href="/tags/"
><i class="fa-solid fa-tags fa-fw fa-sm" aria-hidden="true"></i> Tags</a></li><li class="menu-item delimiter"></li><li class="menu-item theme-switch" title="Switch Theme">
<i class="fa-solid fa-adjust fa-fw" aria-hidden="true"></i>
</li></ul>
</nav>
</div>
</header><header class="mobile animate__faster" id="header-mobile">
<div class="header-container">
<div class="header-wrapper">
<div class="header-title">
<a href="/" title="Coding Panda's Blog"><img loading="lazy" src="/img/kaifanle.gif" srcset="/img/kaifanle.gif, /img/kaifanle.gif 1.5x, /img/kaifanle.gif 2x" sizes="auto" data-title="/img/kaifanle.gif" data-alt="/img/kaifanle.gif" class="logo" style="background: url(/svg/loading.min.svg) no-repeat center;" onload="this.title=this.dataset.title;this.alt=this.dataset.alt;for(const a of ['style','data-title','data-alt','onerror','onload']){this.removeAttribute(a);}this.dataset.lazyloaded='';" onerror="this.title=this.dataset.title;this.alt=this.dataset.alt;for(const a of ['style','data-title','data-alt','onerror','onload']){this.removeAttribute(a);}"/><span class="header-title-text">Coding Panda's Blog</span></a><span class="header-subtitle"></span></div>
<div class="menu-toggle" id="menu-toggle-mobile">
<span></span><span></span><span></span>
</div>
</div>
<nav>
<ul class="menu" id="menu-mobile"><li
class="menu-item active"
><a
class="menu-link"
href="/"
><i class="fa fa-home fa-fw fa-sm" aria-hidden="true"></i> Home</a></li><li
class="menu-item"
><a
class="menu-link"
href="/posts/"
><i class="fa-solid fa-archive fa-fw fa-sm" aria-hidden="true"></i> Archives</a></li><li
class="menu-item"
><a
class="menu-link"
href="/categories/"
><i class="fa-solid fa-th fa-fw fa-sm" aria-hidden="true"></i> Categories</a></li><li
class="menu-item"
><a
class="menu-link"
href="/tags/"
><i class="fa-solid fa-tags fa-fw fa-sm" aria-hidden="true"></i> Tags</a></li><li class="menu-item menu-system">
<span class="menu-system-item theme-switch" title="Switch Theme"><i class="fa-solid fa-adjust fa-fw" aria-hidden="true"></i></span></li>
</ul>
</nav>
</div>
</header><main class="container container-reverse"><div class="page home posts"><div class="home-profile"><div class="home-avatar"><a href="/" title="Home"><img loading="lazy" src="/img/avatar.png" srcset="/img/avatar.png, /img/avatar.png 1.5x, /img/avatar.png 2x" sizes="auto" data-title="Zhiwei Zhang" data-alt="Zhiwei Zhang" style="background: url(/svg/loading.min.svg) no-repeat center;" onload="this.title=this.dataset.title;this.alt=this.dataset.alt;for(const a of ['style','data-title','data-alt','onerror','onload']){this.removeAttribute(a);}this.dataset.lazyloaded='';" onerror="this.title=this.dataset.title;this.alt=this.dataset.alt;for(const a of ['style','data-title','data-alt','onerror','onload']){this.removeAttribute(a);}"/></a></div></div>
<article class="single summary" itemscope itemtype="http://schema.org/Article"><h1 class="single-title" itemprop="name headline">
<a href="/posts/filebench/">使用Filebench测试ZNS+F2FS</a>
</h1><div class="post-meta"><span class="post-author"><a href="https://github.com/zhiwayzhang" title="Author"target="_blank" rel="external nofollow noopener noreferrer author" class="author"><img loading="lazy" src="/img/avatar.png" srcset="/img/avatar.png, /img/avatar.png 1.5x, /img/avatar.png 2x" sizes="auto" data-title="Zhiwei Zhang" data-alt="Zhiwei Zhang" class="avatar" style="background: url(/svg/loading.min.svg) no-repeat center;" onload="this.title=this.dataset.title;this.alt=this.dataset.alt;for(const a of ['style','data-title','data-alt','onerror','onload']){this.removeAttribute(a);}this.dataset.lazyloaded='';" onerror="this.title=this.dataset.title;this.alt=this.dataset.alt;for(const a of ['style','data-title','data-alt','onerror','onload']){this.removeAttribute(a);}"/> Zhiwei Zhang</a></span> <span class="post-publish" title='2023-12-14 21:48:26'>published on <time datetime="2023-12-14">2023-12-14</time></span> <span class="post-category">included in <a href="/categories/tech/"><i class="fa-regular fa-folder fa-fw" aria-hidden="true"></i> Tech</a> <a href="/categories/notes/"><i class="fa-regular fa-folder fa-fw" aria-hidden="true"></i> Notes</a></span></div><div class="content"><p>本文的内容主要参考了filebench在<code>USENIX ;login:'16</code>上的文章(正值filebench 1.5发布)和官方仓库的wiki,filebench从2005年开源到今天已经过去了18年了,github最后一次commit截止在了3年前,之后也没有维护过了,不过filebench目前已经比较完善了,也得到了学术界比较广泛的认可,到今天依然还能拿来跑一些benchmark。本篇文章主要目的是解释一些filebench中的参数,几个预定义工作负载,最后来介绍如何使用filebench来测试ZNS的性能。</p></div><div class="post-footer">
<a href="/posts/filebench/">Read More</a><div class="post-tags"><i class="fa-solid fa-tags fa-fw me-1" aria-hidden="true"></i><a href='/tags/filebench/' class="post-tag">Filebench</a><a href='/tags/benchmark/' class="post-tag">Benchmark</a><a href='/tags/file-system/' class="post-tag">File System</a><a href='/tags/f2fs/' class="post-tag">F2FS</a><a href='/tags/zns/' class="post-tag">ZNS</a></div></div>
</article>
<article class="single summary" itemscope itemtype="http://schema.org/Article"><h1 class="single-title" itemprop="name headline">
<a href="/posts/bourbon/">[OSDI'20] From WiscKey to Bourbon: A Learned Index for Log-Structured Merge Trees</a>
</h1><div class="post-meta"><span class="post-author"><a href="https://github.com/zhiwayzhang" title="Author"target="_blank" rel="external nofollow noopener noreferrer author" class="author"><img loading="lazy" src="/img/avatar.png" srcset="/img/avatar.png, /img/avatar.png 1.5x, /img/avatar.png 2x" sizes="auto" data-title="Zhiwei Zhang" data-alt="Zhiwei Zhang" class="avatar" style="background: url(/svg/loading.min.svg) no-repeat center;" onload="this.title=this.dataset.title;this.alt=this.dataset.alt;for(const a of ['style','data-title','data-alt','onerror','onload']){this.removeAttribute(a);}this.dataset.lazyloaded='';" onerror="this.title=this.dataset.title;this.alt=this.dataset.alt;for(const a of ['style','data-title','data-alt','onerror','onload']){this.removeAttribute(a);}"/> Zhiwei Zhang</a></span> <span class="post-publish" title='2023-12-10 16:56:03'>published on <time datetime="2023-12-10">2023-12-10</time></span> <span class="post-category">included in <a href="/categories/storage/"><i class="fa-regular fa-folder fa-fw" aria-hidden="true"></i> Storage</a> <a href="/categories/notes/"><i class="fa-regular fa-folder fa-fw" aria-hidden="true"></i> Notes</a></span></div><div class="content"><p>本文首次将学习索引应用到了LSM-tree之中,基于Whiskey Key-Value分离存储的开创性工作,使得对LSM-tree建立学习索引成为可能(定长SSTable entry)。文章通过详细的实验分析说明了学习索引加速LSM-tree Lookup的性能提升,并指出在未来高性能SSD/存储设备上学习索引能带来更大的收益。</p></div><div class="post-footer">
<a href="/posts/bourbon/">Read More</a><div class="post-tags"><i class="fa-solid fa-tags fa-fw me-1" aria-hidden="true"></i><a href='/tags/paper/' class="post-tag">Paper</a><a href='/tags/osdi/' class="post-tag">OSDI</a><a href='/tags/lsm-tree/' class="post-tag">LSM-tree</a><a href='/tags/learned-index/' class="post-tag">Learned-Index</a></div></div>
</article>
<article class="single summary" itemscope itemtype="http://schema.org/Article"><h1 class="single-title" itemprop="name headline">
<a href="/posts/ezns/">[OSDI'23] eZNS: An Elastic Zoned Namespace for Commodity ZNS SSDs</a>
</h1><div class="post-meta"><span class="post-author"><a href="https://github.com/zhiwayzhang" title="Author"target="_blank" rel="external nofollow noopener noreferrer author" class="author"><img loading="lazy" src="/img/avatar.png" srcset="/img/avatar.png, /img/avatar.png 1.5x, /img/avatar.png 2x" sizes="auto" data-title="Zhiwei Zhang" data-alt="Zhiwei Zhang" class="avatar" style="background: url(/svg/loading.min.svg) no-repeat center;" onload="this.title=this.dataset.title;this.alt=this.dataset.alt;for(const a of ['style','data-title','data-alt','onerror','onload']){this.removeAttribute(a);}this.dataset.lazyloaded='';" onerror="this.title=this.dataset.title;this.alt=this.dataset.alt;for(const a of ['style','data-title','data-alt','onerror','onload']){this.removeAttribute(a);}"/> Zhiwei Zhang</a></span> <span class="post-publish" title='2023-11-27 21:39:01'>published on <time datetime="2023-11-27">2023-11-27</time></span> <span class="post-category">included in <a href="/categories/storage/"><i class="fa-regular fa-folder fa-fw" aria-hidden="true"></i> Storage</a> <a href="/categories/notes/"><i class="fa-regular fa-folder fa-fw" aria-hidden="true"></i> Notes</a></span></div><div class="content"><p>这篇文章写作很多地方没有说清楚,motivation部分描述实验负载时不够清楚,第三个实验/observation看了很久才看出来是想表达什么问题。文章的三个主要设计都围绕motivation中的三个问题,整体的设计思想有点类似于将应用和固态盘namespace绑定,按照调度应用I/O的思想来管理ZNS中Zone的资源。</p></div><div class="post-footer">
<a href="/posts/ezns/">Read More</a><div class="post-tags"><i class="fa-solid fa-tags fa-fw me-1" aria-hidden="true"></i><a href='/tags/paper/' class="post-tag">Paper</a><a href='/tags/osdi/' class="post-tag">OSDI</a><a href='/tags/zns/' class="post-tag">ZNS</a><a href='/tags/multi-tenant/' class="post-tag">Multi-tenant</a><a href='/tags/isolation/' class="post-tag">Isolation</a><a href='/tags/io-scheduler/' class="post-tag">IO Scheduler</a></div></div>
</article>
<article class="single summary" itemscope itemtype="http://schema.org/Article"><h1 class="single-title" itemprop="name headline">
<a href="/posts/cgroups/">Using Cgroups v2 to limit system I/O resources</a>
</h1><div class="post-meta"><span class="post-author"><a href="https://github.com/zhiwayzhang" title="Author"target="_blank" rel="external nofollow noopener noreferrer author" class="author"><img loading="lazy" src="/img/avatar.png" srcset="/img/avatar.png, /img/avatar.png 1.5x, /img/avatar.png 2x" sizes="auto" data-title="Zhiwei Zhang" data-alt="Zhiwei Zhang" class="avatar" style="background: url(/svg/loading.min.svg) no-repeat center;" onload="this.title=this.dataset.title;this.alt=this.dataset.alt;for(const a of ['style','data-title','data-alt','onerror','onload']){this.removeAttribute(a);}this.dataset.lazyloaded='';" onerror="this.title=this.dataset.title;this.alt=this.dataset.alt;for(const a of ['style','data-title','data-alt','onerror','onload']){this.removeAttribute(a);}"/> Zhiwei Zhang</a></span> <span class="post-publish" title='2023-04-07 19:51:41'>published on <time datetime="2023-04-07">2023-04-07</time></span> <span class="post-category">included in <a href="/categories/tech/"><i class="fa-regular fa-folder fa-fw" aria-hidden="true"></i> Tech</a></span></div><div class="content">Introduction to Cgroups Cgroups, which called control group in Linux to limit system resources for specify process group, is comonly used in many container tech, such as Docker, Kubernetes, iSulad etc.
The cgroup architecture is comprised of two main components:
the cgroup core: which contains a pseudo-filesystem cgroupfs, the subsystem controllers: thresholds for system resources, such as memory, CPU, I/O, PIDS, RDMA, etc. The hierarchy of Cgroups In Cgroups v1, per-resource (memory, cpu, blkio) have it’s own hierarchy, where each resource hierarchy contains cgroups for that resource.</div><div class="post-footer">
<a href="/posts/cgroups/">Read More</a><div class="post-tags"><i class="fa-solid fa-tags fa-fw me-1" aria-hidden="true"></i><a href='/tags/i/o/' class="post-tag">I/O</a><a href='/tags/linux/' class="post-tag">Linux</a><a href='/tags/cgroups/' class="post-tag">Cgroups</a></div></div>
</article>
<article class="single summary" itemscope itemtype="http://schema.org/Article"><h1 class="single-title" itemprop="name headline">
<a href="/posts/hadafs/">[FAST'23] HadaFS: A File System Bridging the Local and Shared Burst Buffer for Exascale Supercomputers</a>
</h1><div class="post-meta"><span class="post-author"><a href="https://github.com/zhiwayzhang" title="Author"target="_blank" rel="external nofollow noopener noreferrer author" class="author"><img loading="lazy" src="/img/avatar.png" srcset="/img/avatar.png, /img/avatar.png 1.5x, /img/avatar.png 2x" sizes="auto" data-title="Zhiwei Zhang" data-alt="Zhiwei Zhang" class="avatar" style="background: url(/svg/loading.min.svg) no-repeat center;" onload="this.title=this.dataset.title;this.alt=this.dataset.alt;for(const a of ['style','data-title','data-alt','onerror','onload']){this.removeAttribute(a);}this.dataset.lazyloaded='';" onerror="this.title=this.dataset.title;this.alt=this.dataset.alt;for(const a of ['style','data-title','data-alt','onerror','onload']){this.removeAttribute(a);}"/> Zhiwei Zhang</a></span> <span class="post-publish" title='2023-03-17 23:30:48'>published on <time datetime="2023-03-17">2023-03-17</time></span> <span class="post-category">included in <a href="/categories/storage/"><i class="fa-regular fa-folder fa-fw" aria-hidden="true"></i> Storage</a> <a href="/categories/notes/"><i class="fa-regular fa-folder fa-fw" aria-hidden="true"></i> Notes</a></span></div><div class="content">HadaFS,一个为超算提供本地和共享Burst Buffer的文件系统
0x00 Intro 现代的超算通过SSD来实现Burst Buffer(BB)layer。
根据部署位置,BB可以分为两种:
Local BB,作为本地硬盘部署在每个计算节点上,有高伸缩性和性能 Shared BB,部署在专用节点上,可以被多个计算节点访问,可以共享数据,部署成本低 HadaFS已经部署在了神威新一代超算(Sunway New- generation Supercomputer,SNS)中。支持最大600000用户,最大I/O带宽3.1TB/s。
Burst Buffer作为数据加速层,一般使用SSD。自2016年起,越来越多的超算开始使用Burst Buffer。
对于local BB,有一些局限性:
由于难以进行数据共享,Local BB不适用于所有场景,例如N-1 I/O mode,所有进程共享一个文件、workflow 由于超算程序之间的I/O负载差异较大,而数据密集型应用的比例较低,造成了大量的资源浪费 随着超算规模的扩大,local BB的部署成本未来会急剧升高 相比于Local BB,Share BB便于数据共享,部署成本低,但是在超算上部署也面临许多问题。LPCC将SSD集成到Lustre FS Client,提高read/write性能的一种缓存技术,LPCC存储在Lustre client SSD中的数据必须先刷新到Lustre server才能进行共享。BeeOND类似于LPCC,继承了BeeGFS的可伸缩性和缓存共享限制。
超算的发展使得并行I/O需求增加,BB架构相较于传统GFS有着同样的高性能,但是容量较小,因此BB要与GFS进行整合。目前的BB架构数据迁移的效率很低,浪费了很多计算资源,因此高伸缩性的BB数据管理和迁移也是目前要解决的问题。
为了解决这个问题,作者提出了BB File System–HadaFS。
基于share BB,结合了local BB的伸缩性、性能优势和share BB的数据共享、部署成本低的优点。
HadaFS提供Localized Triage Architecture(LTA)局部分类架构,解决了shared BB伸缩性不足的问题,实现了超大规模的扩展和数据共享,LTA将所有HadaFS server构建为一个共享存储池,可以在client和server之间灵活的控制并发问题,来保证数据共享。 HadaFS提出了一个运行时的user-level接口,来保证来自client的I/O请求可以被最近的server处理,类似local BB。 为了解决由POSIX接口强一致性导致的性能问题,HadaFS提出了一种包含三种元数据同步机制的全路径索引方法,来解决传统文件系统在复杂元数据的管理上的问题,以及文件系统和应用I/O行为不匹配的问题。使用KV的方法来代替传统的目录树结构。 HadaFS集成了数据管理工具,帮助用户管理BB中的数据,完成BB和GFS之间的高效数据迁移。 提出Hadash,在BB中提供高效的数据查询,加速BB和传统超算存储的数据迁移。 0x01 Motivation && Bg Motivation BB可伸缩性和应用行为的矛盾 随着超算百亿亿次计算记录的打破,尖端超算中的I/O并行可以达到数十万,加大了BB在伸缩性上的压力。
目前的一些顶尖超算:
Frontier使用独立的硬件来分别构造local BB和shared BB,需要使用大量的SSD和高昂的建设维护成本。 Fugaku使用shared BB,使用软件来提供存储服务,local BB和shared BB使用不同的name space。这种方式是静态的,很难控制在高并发情况下的I/O竞态问题。 Summit部署local BB,支持数据在应用之间的共享,基于GFS,效率较低。 由于shared BB既可以用于计算节点,也可以用于数据转发节点,作者相信shared BB更适合超级计算机。</div><div class="post-footer">
<a href="/posts/hadafs/">Read More</a><div class="post-tags"><i class="fa-solid fa-tags fa-fw me-1" aria-hidden="true"></i><a href='/tags/paper/' class="post-tag">Paper</a><a href='/tags/fast/' class="post-tag">FAST</a><a href='/tags/gfs/' class="post-tag">GFS</a><a href='/tags/sns/' class="post-tag">SNS</a><a href='/tags/burst-buffer/' class="post-tag">Burst Buffer</a><a href='/tags/supercomputer/' class="post-tag">Supercomputer</a></div></div>
</article>
<article class="single summary" itemscope itemtype="http://schema.org/Article"><h1 class="single-title" itemprop="name headline">
<a href="/posts/femu-bbssd/">[FEMU] FEMU Blackbox SSD源码阅读</a>
</h1><div class="post-meta"><span class="post-author"><a href="https://github.com/zhiwayzhang" title="Author"target="_blank" rel="external nofollow noopener noreferrer author" class="author"><img loading="lazy" src="/img/avatar.png" srcset="/img/avatar.png, /img/avatar.png 1.5x, /img/avatar.png 2x" sizes="auto" data-title="Zhiwei Zhang" data-alt="Zhiwei Zhang" class="avatar" style="background: url(/svg/loading.min.svg) no-repeat center;" onload="this.title=this.dataset.title;this.alt=this.dataset.alt;for(const a of ['style','data-title','data-alt','onerror','onload']){this.removeAttribute(a);}this.dataset.lazyloaded='';" onerror="this.title=this.dataset.title;this.alt=this.dataset.alt;for(const a of ['style','data-title','data-alt','onerror','onload']){this.removeAttribute(a);}"/> Zhiwei Zhang</a></span> <span class="post-publish" title='2023-03-12 12:36:08'>published on <time datetime="2023-03-12">2023-03-12</time></span> <span class="post-category">included in <a href="/categories/notes/"><i class="fa-regular fa-folder fa-fw" aria-hidden="true"></i> Notes</a></span></div><div class="content">本文记录FEMU blackbox ssd(ssd对主机透明)的源码阅读。
bb.c 用于注册bbssd,在hw/femu/femu.c>nvme_register_extesions()中执行
1 2 3 4 5 6 7 8 9 10 11 12 static int nvme_register_extensions(FemuCtrl *n) { if (OCSSD(n)) { ... } ... } else if (BBSSD(n)) { nvme_register_bbssd(n); } ... return 0; } 这个FemuCtrl *n结构包含了很多内容,本质上是一个用于线程之间同步/传值的结构
1 2 3 4 5 6 7 8 9 10 11 12 13 14 int nvme_register_bbssd(FemuCtrl *n) { n->ext_ops = (FemuExtCtrlOps) { .state = NULL, .init = bb_init, .exit = NULL, .</div><div class="post-footer">
<a href="/posts/femu-bbssd/">Read More</a><div class="post-tags"><i class="fa-solid fa-tags fa-fw me-1" aria-hidden="true"></i><a href='/tags/femu/' class="post-tag">FEMU</a><a href='/tags/qemu/' class="post-tag">QEMU</a></div></div>
</article>
<ul class="pagination"><li class="page-item active">
<span class="page-link">
<a href="/">1</a>
</span>
</li><li class="page-item">
<span class="page-link">
<a href="/page/2/">2</a>
</span>
</li><li class="page-item">
<span class="page-link">
<a href="/page/3/">3</a>
</span>
</li><li class="page-item">
<span class="page-link" aria-hidden="true">…</span>
</li><li class="page-item">
<span class="page-link">
<a href="/page/12/">12</a>
</span>
</li></ul></div></main><footer class="footer">
<div class="footer-container"><div class="footer-line powered">Powered by <a href="https://gohugo.io/" target="_blank" rel="external nofollow noopener noreferrer" title="Hugo 0.119.0">Hugo</a> | Theme - <a href="https://github.com/hugo-fixit/FixIt" target="_blank" rel="external" title="FixIt %!v(MISSING)">FixIt</a>
</div><div class="footer-line copyright" itemscope itemtype="http://schema.org/CreativeWork"><i class="fa-regular fa-copyright fa-fw" aria-hidden="true"></i>
<span itemprop="copyrightYear">2019 - 2023</span><span class="author" itemprop="copyrightHolder">
<a href="https://github.com/zhiwayzhang"target="_blank" rel="external nofollow noopener noreferrer">Zhiwei Zhang</a></span></div><div class="footer-line statistics"></div></div>
</footer></div><div class="widgets"><div class="fixed-buttons animate__faster d-none"><div class="fixed-button back-to-top" role="button" aria-label="Back to Top"><i class="fa-solid fa-arrow-up fa-fw" aria-hidden="true"></i><span class="variant-numeric d-none">0%</span>
</div></div><div id="mask"></div><noscript>
<div class="noscript-warning">Theme FixIt works best with JavaScript enabled.</div>
</noscript>
</div><link rel="stylesheet" href="/lib/katex/katex.min.css"><link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/highlightjs/[email protected]/build/styles/github-dark.min.css"><script src="/lib/sharer/sharer.min.js" async defer></script><script src="/lib/katex/katex.min.js" defer></script><script src="/lib/katex/auto-render.min.js" defer></script><script src="/lib/katex/copy-tex.min.js" defer></script><script src="/lib/katex/mhchem.min.js" defer></script><script src="https://cdn.jsdelivr.net/gh/highlightjs/[email protected]/build/highlight.min.js" defer></script><script>window.config={"code":{"copyTitle":"Copy to clipboard","maxShownLines":100},"math":{"delimiters":[{"display":true,"left":"$$","right":"$$"},{"display":true,"left":"\\[","right":"\\]"},{"display":true,"left":"\\begin{equation}","right":"\\end{equation}"},{"display":true,"left":"\\begin{equation*}","right":"\\end{equation*}"},{"display":true,"left":"\\begin{align}","right":"\\end{align}"},{"display":true,"left":"\\begin{align*}","right":"\\end{align*}"},{"display":true,"left":"\\begin{alignat}","right":"\\end{alignat}"},{"display":true,"left":"\\begin{alignat*}","right":"\\end{alignat*}"},{"display":true,"left":"\\begin{gather}","right":"\\end{gather}"},{"display":true,"left":"\\begin{CD}","right":"\\end{CD}"},{"display":false,"left":"$","right":"$"},{"display":false,"left":"\\(","right":"\\)"}],"strict":false}};</script><script src="/js/theme.min.js" defer></script></body>
</html>