1.__bitwise

https://blog.csdn.net/luvzhan/article/details/41314571

https://stackoverflow.com/questions/9680399/what-does-typedef-u16-bitwise-le16-mean-in-linux-kernel/9680463

2.GCCgcc编译时,链接器安排的【虚拟地址】是如何计算出来的?

https://ee.ofweek.com/2022-02/ART-11000-2818-30551376.html

3.块预分配机制

4.EXT2文件系统的节点信息结构

5.DAX Persistent Memory Emulate on DRAMw

Blog for STEP of EMULATE PMEM
Intel Pmem emulate OFFICIAL

GRUB configuration for PMEM

  1. # vi /etc/default/grub
  2. GRUB_CMDLINE_LINUX="memmap=nn[KMG]!ss[KMG]"

例如,memmap=4G!12G 在第 12 和 16 GB 之间保留 4 GB 内存。下面的例子展示了如何在 CentOS 7.0 BIOS 或基于 EFI 的机器上编辑 GRUB 文件和构建配置
reboot and type dmesg to look for the pmem
image.png

dmesg

https://www.runoob.com/linux/linux-comm-dmesg.html

Install filesystem with DAX

1.mkdir /mnt/mem
2.sudo mkfs.ext2 /dev/pmem0
Screenshot from 2022-05-11 19-57-25.png3.sudo mount -o dax /dev/pmem0 /mnt/mem

6.YCSB database benchmark(For LevelDB)

STEP

YCSB 测试 LevelDB 数据库

What is the benchmark

wikipedia - YCSB(Yahoo! Cloud Serving Benchmark))

middleware(simplehttp&&simpleleveldb)

YCSB 是一种测试数据库的benchmark
它的使用原理是:
A. 目标数据库(待测试的数据库)作为服务端运行起来,
并提供数据库操作相关的restful api,比如

  1. http://localhost:8080/put
  2. http://localhost:8080/get
  3. http://localhost:8080/del

B. YCSB Client 作为客户端,通过restful api调用数据库,
从而测试数据库的性能。
YCSB 测试 LevelDB 数据库

problem during middleware

1.less of mvn —————->apt install maven
2./usr/bin/env: ‘python’: No such file or directory———->stackoverflow
3.ycsb-leveldb: mvn’ s sourece mirror reset ———>change maven source(CSDN)

7.leveldb compile()

step

CSDN-levelDB(一):源码编译安装

Problem

1.can’t isntall build-essiensials
How to Resolve Unmet Dependencies in Ubuntu
2.less of CMakelists.txt in leveldb/cmake/build
zhihu-leveldb compile

8.data

  1. ------------------------------ext2-dax-------------------------------------
  2. env:
  3. LTS ubuntu 22.04
  4. Kernel:5.15.0-30-generic
  5. emulate Pmem:40 Gb
  6. insert
  7. ./ycsb -load -db leveldb -P workloads/workloada -P leveldb/leveldb.properties -s
  8. 2022-05-16 20:59:04 0 sec: 0 operations;
  9. 2022-05-16 20:59:04 0 sec: 100000 operations; [INSERT: Count=100000 Max=1291.40 Min=2.56 Avg=4.21]
  10. Load runtime(sec): 0.839719
  11. Load operations(ops): 100000
  12. Load throughput(ops/sec): 119087
  13. read
  14. ./ycsb -run -db leveldb -P workloads/workloada -P leveldb/leveldb.properties -s
  15. 2022-05-16 20:59:42 0 sec: 0 operations;
  16. 2022-05-16 20:59:42 0 sec: 100000 operations; [READ: Count=49862 Max=107.85 Min=1.04 Avg=3.66] [UPDATE: Count=50138 Max=2314.21 Min=4.01 Avg=7.80]
  17. Run runtime(sec): 0.846695
  18. Run operations(ops): 100000
  19. Run throughput(ops/sec): 118106

9.shell脚本

10.内核读文件过程

系统调用原型?

asmlinkage?

https://blog.csdn.net/liujiaoyage/article/details/31781289
https://blog.csdn.net/qq84395064/article/details/86593469

强制锁?

https://shareinto.github.io/2016/12/07/linux-lockfile/
https://blog.csdn.net/qq_37414405/article/details/83689965

Sturct绑定函数指针

https://blog.csdn.net/m0_46577050/article/details/122315511