- 博客(53)
- 收藏
- 关注
原创 NUMA暗示错误(NUMA Hinting Fault)详解
NUMA暗示错误是指,当进程访问某个内存页面时,内核利用页面错误机制“暗示”(hint)自己该页面的使用情况。这种错误不同于传统页面错误(例如页面未分配或被换出到磁盘),仅用于统计和优化,不中断进程执行。
2025-03-06 10:50:41
554
原创 页面压入zpool详解
当系统检测到内存压力(例如swappiness设定较高或kswapd触发内存回收)时,zswap可能会主动压缩部分页面并存入zpoolswapoutzswapfrontswapzpool。
2025-03-05 15:39:55
386
原创 内核的LRU机制
Linux 采用 Active/Inactive LRU 近似策略,而非严格 LRU。避免频繁调整 LRU 结构,通过批量扫描、访问阈值、参考位等优化 LRU 操作的性能。结合 NUMA 和 cgroup 机制,减少跨节点和跨进程组的干扰,提高 LRU 运行效率。你是想深入研究 LRU 的代码实现,还是想了解 LRU 在你的 CXL 服务器上的具体表现?
2025-03-05 15:31:28
794
原创 Page Fault 的开销分析
Page Fault(页错误)是指 CPU 访问的虚拟地址未映射到物理内存,导致异常处理流程。Page Fault 的开销取决于多种因素,包括硬件和操作系统的处理方式。
2025-03-05 15:24:11
317
原创 zswap 数据结构维护解析
zswap通过zswap_tree和zswap_pool维护压缩数据的存储与查询,结合zpool高效管理物理内存。其核心流程依赖于红黑树进行索引,加解压过程由和执行。
2025-02-25 17:03:03
422
原创 《Tiered Memory Management: Access Latency is the Key!》
的“1 Introduction”(引言)部分的第三段,作者详细阐述了Colloid的核心设计理念——平衡访问延迟的原则(principle of balancing access latencies),并解释了这一原则如何为分层内存管理提供了一种统一的方法。》的“1 Introduction”(引言)部分,第一段主要介绍了现代内存密集型应用对内存需求的背景,以及传统内存架构面临的挑战,从而引出了分层内存架构(tiered memory architectures)的兴起和内存管理的重要性。
2025-02-24 11:37:22
764
原创 【无标题】
本节探讨了传统DDR内存系统的带宽瓶颈以及CXL(Compute Express Link)如何通过其高带宽特性解决这些问题,为COAXIAL服务器设计提供了理论基础。DDR瓶颈:引脚限制和高排队延迟限制了带宽扩展。CXL潜力:通过PCIe提供4倍于DDR的每引脚带宽,延迟开销可控。研究转向:作者主张CXL不仅用于扩展,还可完全取代DDR,成为服务器内存系统的核心。
2025-02-21 15:52:48
789
原创 【无标题】
本文系统探讨了 CXL 在数据库管理系统中的应用潜力,详细分析了 CXL 在不同数据库组件中的挑战与优化方向。未来,解决这些挑战将有助于提高数据库系统的效率、可靠性,并降低总拥有成本(TCO)。
2025-02-19 17:43:29
878
原创 acwing 291
#include <bits/stdc++.h>#define IOS ios_base::sync_with_stdio(0),cin.tie(0),cout.tie(0)#define _zero(a) memset(a, 0, sizeof(a))#define _far(a) memset(a, 0x3f,sizeof (a))#define __far(a) memset(a, -0x3f,sizeof (a))#define far 0x3f3f3f3f#define .
2022-03-10 21:22:17
321
原创 每日一题 摘桃子
#include <bits/stdc++.h>#define IOS ios_base::sync_with_stdio(0),cin.tie(0),cout.tie(0)#define _zero(a) memset(a, 0, sizeof(a))#define _far(a) memset(a, 0x3f,sizeof (a))#define __far(a) memset(a, -0x3f,sizeof (a))#define far 0x3f3f3f3f#define .
2022-03-07 21:55:54
529
原创 每日一题 Minimum Or Spanning Tree
#include <bits/stdc++.h>#define IOS ios_base::sync_with_stdio(0),cin.tie(0),cout.tie(0)#define _zero(a) memset(a, 0, sizeof(a))#define _far(a) memset(a, 0x3f,sizeof (a))#define __far(a) memset(a, -0x3f,sizeof (a))#define far 0x3f3f3f3f#define .
2022-03-07 21:55:00
355
原创 acwing 242
#include <bits/stdc++.h>#define IOS ios_base::sync_with_stdio(0),cin.tie(0),cout.tie(0)#define _zero(a) memset(a, 0, sizeof(a))#define _far(a) memset(a, 0x3f,sizeof (a))#define __far(a) memset(a, -0x3f,sizeof (a))#define far 0x3f3f3f3f#define .
2022-02-21 21:48:06
556
原创 acwing 241
#include <bits/stdc++.h>#define IOS ios_base::sync_with_stdio(0),cin.tie(0),cout.tie(0)#define _zero(a) memset(a, 0, sizeof(a))#define _far(a) memset(a, 0x3f,sizeof (a))#define __far(a) memset(a, -0x3f,sizeof (a))#define far 0x3f3f3f3f#define .
2022-02-20 22:24:26
473
原创 acwing 285
#include <bits/stdc++.h>using namespace std;const int N = 6100;bool v[N];int head[N], e[N], ver[N], tot;int n;int f[N][2];int h[N];void add(int x, int y){ ++ tot; ver[tot] = y; e[tot] = head[x]; head[x] = tot;}void dp(.
2022-02-12 21:46:42
336
原创 acwing 349
#include <bits/stdc++.h>#define int long long#define PII pair<int, int >using namespace std;const int N = 1100;const int mod = (1 << 31) - 1;int a[N][N];int n, m;int d[N];bool v[N];int cnt[N];void read(){ cin >>.
2022-02-11 22:02:07
336
原创 acwing 347
#include <bits/stdc++.h>using namespace std;const int N = 30;int n, s;int a[N][N], d[N], tree[N][N];int conn[N];bool v[N];int ans, deg, cnt;void read(){ cin >> n; map<string, int> mp; mp["Park"] = 1; string s1.
2022-02-10 18:43:21
315
原创 acwing 346
#include <bits/stdc++.h>#define int long longusing namespace std;const int N = 6100;int n;struct rec {int x, y, z;} e[6100];int fa[6100], s[6100];int ans;bool operator <(rec a, rec b){ return a.z < b.z;}int get(int x){ .
2022-02-08 18:00:20
400
原创 acwing 341
#include <bits/stdc++.h>using namespace std;const int N = 1e5 + 100, M = 5e5 + 100;int head1[N], ver1[M], e1[M], tot1;int head2[N], ver2[M], e2[M], tot2;int d1[N], d2[N];bool v1[N], v2[N];int price[N];int n, m;void add1(int x, int y){.
2022-02-07 02:17:37
137
原创 acwing 340
#include <bits/stdc++.h>#define PII pair<int, int>using namespace std;const int N = 1100, M = 21000, L = 1000000;int head[N], ver[M], w[M], e[M], tot;int f[N][N];bool v[N][N];queue<PII> q;int n, m, k;void add(int x, int y, in.
2022-02-06 18:08:51
453
原创 acwing 851
#include <bits/stdc++.h>using namespace std;const int N = 1e5 + 100, M = 1e5 + 100;int n, m;int head[N], ver[M], w[M], e[M], tot;int d[N];int v[N];queue<int> q;void add(int x, int y, int z){ ++ tot; ver[tot] = y; w[tot]...
2022-02-05 16:14:49
282
原创 acwing 850
#include <bits/stdc++.h>#define PII pair<int, int>using namespace std;const int N = 1.5e5 + 100, M = 1.5e5 + 100;int head[N], ver[M], e[M], w[M], tot;int n, m, d[N];bool vist[N];priority_queue<PII> q;void add(int x, int y, in.
2022-02-05 02:07:35
239
原创 acwing 849
#include <bits/stdc++.h>using namespace std;const int N = 510;int n, m;int a[N][N];int dist[N];bool vist[N];int main(){ cin >> n >> m; memset(a, 0x3f3f3f3f, sizeof a); for (int i = 1; i <= m; i ++) { .
2022-02-05 01:45:47
567
原创 acwing 283
#include <bits/stdc++.h>#define int long longusing namespace std;int n;char s[60];int a[60];int f[60][60][2];signed main(){ cin >> n; for (int i = 1; i <= n; i ++) cin >> s[i] >> a[i]; vector<int&.
2022-02-03 19:52:54
87
原创 acwing 282
#include <bits/stdc++.h>using namespace std;const int maxn = 310;int n;int a[maxn];int f[maxn][maxn];int sum[maxn];int main(){ cin >> n; for (int i = 1; i <= n; i ++) cin >> a[i]; memset(sum, 0, sizeof sum); .
2022-02-03 15:04:19
6353
原创 acwing 275
#include <bits/stdc++.h>using namespace std;const int N = 60;int g[N][N];int f[N + N][N][N];int n, m;int main(){ cin >> n >> m; for (int i = 1; i <= n; i ++) for (int j = 1; j <= m; j ++) cin >> g[i].
2022-01-26 22:48:40
396
原创 acwing 274
#include <bits/stdc++.h>using namespace std;const int N = 210, M = 1010;int l, n;int c[N][N];int a[M];int f[M][N][N];signed main(){ scanf("%d%d", &l, &n); for (int i = 1; i <= l; i ++) for (int j = 1; j <=.
2022-01-25 18:25:38
432
原创 acwing 273
#include <bits/stdc++.h>#define int long longusing namespace std;const int maxn = 2010;int n;int a[maxn], b[maxn];int f[maxn][maxn];signed main (){ scanf("%lld", &n); for (int i = 1; i <= n; i ++) { cin >> a[.
2022-01-25 02:39:45
193
原创 acwing 238
#include <bits/stdc++.h>#define IOS ios_base::sync_with_stdio(0),cin.tie(0),cout.tie(0)#define _zero(a) memset(a, 0, sizeof(a))#define endl '\n'#define int long long#define mp make_pair#define PII pair<int, int>#define x first#define y.
2022-01-19 16:20:52
331
原创 acwing 237
#include <bits/stdc++.h>#define IOS ios_base::sync_with_stdio(0),cin.tie(0),cout.tie(0)#define _zero(a) memset(a, 0, sizeof(a))#define endl '\n'#define int long long#define mp make_pair#define PII pair<int, int>#define x first#define y
2022-01-19 15:38:36
63
原创 acwing 197
#include <bits/stdc++.h>#define IOS ios_base::sync_with_stdio(0),cin.tie(0),cout.tie(0)#define _zero(a) memset(a, 0, sizeof(a))#define endl '\n'#define int long long#define mp make_pair#define PII pair<int, int>#define x first#define y
2022-01-18 17:47:56
56
原创 acwing 196
#include <bits/stdc++.h>#define IOS ios_base::sync_with_stdio(0),cin.tie(0),cout.tie(0)#define _zero(a) memset(a, 0, sizeof(a))#define endl '\n'#define int long long#define mp make_pair#define PII pair<int, int>#define x first#define y
2022-01-18 17:20:34
499
原创 acwing 173
#include <bits/stdc++.h>#define IOS ios_base::sync_with_stdio(0),cin.tie(0),cout.tie(0)#define _zero(a) memset(a, 0, sizeof(a))#define endl '\n'#define int long long#define mp make_pair#define PII pair<int, int>#define x first#define y
2022-01-14 12:14:48
109
原创 acwing 170
#include <bits/stdc++.h>#define IOS ios_base::sync_with_stdio(0),cin.tie(0),cout.tie(0)#define _zero(a) memset(a, 0, sizeof(a))#define endl '\n'#define int long long#define mp make_pair#define PII pair<int, int>#define x first#define y
2022-01-12 23:57:47
234
原创 acwing 166
#include <bits/stdc++.h>#define IOS ios_base::sync_with_stdio(0),cin.tie(0),cout.tie(0)#define _zero(a) memset(a, 0, sizeof(a))#define endl '\n'#define int long long//#define mp make_pair#define PII pair<int, int>#define x first#define
2022-01-11 18:24:36
1104
原创 acwing 165
#include <bits/stdc++.h>#define IOS ios_base::sync_with_stdio(0),cin.tie(0),cout.tie(0)#define _zero(a) memset(a, 0, sizeof(a))#define endl '\n'#define int long long#define mp make_pair#define PII pair<int, int>#define x first#define y
2022-01-11 16:46:11
45
原创 acwing
#include <bits/stdc++.h>#define IOS ios_base::sync_with_stdio(0),cin.tie(0),cout.tie(0)#define _zero(a) memset(a, 0, sizeof(a))#define endl '\n'#define int long long#define mp make_pair#define PII pair<int, int>#define x first#define y
2022-01-10 12:20:51
54
原创 acwing 126
#include <bits/stdc++.h>#define IOS ios_base::sync_with_stdio(0),cin.tie(0),cout.tie(0)#define _zero(a) memset(a, 0, sizeof(a))#define endl '\n'#define int long long#define mp make_pair#define PII pair<int, int>#define x first#define y
2022-01-10 11:17:53
391
原创 acwing 125
#include <bits/stdc++.h>#define IOS ios_base::sync_with_stdio(0),cin.tie(0),cout.tie(0)#define _zero(a) memset(a, 0, sizeof(a))#define endl '\n'#define int long long#define mp make_pair#define PII pair<int, int>#define x first#define y
2022-01-09 16:20:42
150
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人