IPADS Paper1

This commit is contained in:
ridethepig 2023-05-06 00:20:59 +08:00
parent 3af49699a4
commit e2bf7ce7bb
7 changed files with 868 additions and 11 deletions

View File

@ -966,5 +966,640 @@
:height 1478.3999999999999}), :height 1478.3999999999999}),
:page 7}, :page 7},
:content {:text "the file system crashes after a reference to a block of data has been removed (when this block of memory has not yet been freed)"}, :content {:text "the file system crashes after a reference to a block of data has been removed (when this block of memory has not yet been freed)"},
:properties {:color "red"}}], :properties {:color "red"}}
:extra {:page 7}} {:id #uuid "645385d6-70be-41ba-8697-f6bf49608834",
:page 7,
:position {:bounding {:x1 0,
:y1 676.34375,
:x2 630.10595703125,
:y2 1440.96875,
:width 1305.6,
:height 1689.6},
:rects ({:x1 0,
:y1 676.34375,
:x2 0,
:y2 700.34375,
:width 1305.6,
:height 1689.6}
{:x1 0,
:y1 692.9375,
:x2 0,
:y2 716.9375,
:width 1305.6,
:height 1689.6}
{:x1 0,
:y1 709.53125,
:x2 0,
:y2 733.53125,
:width 1305.6,
:height 1689.6}
{:x1 536.8580322265625,
:y1 1336.453125,
:x2 627.4594116210938,
:y2 1364.453125,
:width 1305.6,
:height 1689.6}
{:x1 115.1875,
:y1 1361.96875,
:x2 630.10595703125,
:y2 1389.96875,
:width 1305.6,
:height 1689.6}
{:x1 115.1875,
:y1 1365.96875,
:x2 630.10595703125,
:y2 1387.21875,
:width 1305.6,
:height 1689.6}
{:x1 115.1875,
:y1 1387.46875,
:x2 627.4485473632812,
:y2 1415.46875,
:width 1305.6,
:height 1689.6}
{:x1 115.1875,
:y1 1391.46875,
:x2 627.4485473632812,
:y2 1412.71875,
:width 1305.6,
:height 1689.6}
{:x1 115.1875,
:y1 1412.96875,
:x2 244.2285614013672,
:y2 1440.96875,
:width 1305.6,
:height 1689.6}),
:page 7},
:content {:text "record the sequence numbers of the directory entries (dentry) it visits, and validate these sequence numbers in the same RTM with the data writes"},
:properties {:color "yellow"}}
{:id #uuid "6453916b-6fc1-4e3a-8e54-5d6c3767cf45",
:page 8,
:position {:bounding {:x1 0,
:y1 576.78125,
:x2 631.001953125,
:y2 1234.109375,
:width 1305.6,
:height 1689.6},
:rects ({:x1 0,
:y1 576.78125,
:x2 0,
:y2 600.78125,
:width 1305.6,
:height 1689.6}
{:x1 0,
:y1 593.375,
:x2 0,
:y2 617.375,
:width 1305.6,
:height 1689.6}
{:x1 0,
:y1 609.96875,
:x2 0,
:y2 633.96875,
:width 1305.6,
:height 1689.6}
{:x1 294.7756652832031,
:y1 1129.59375,
:x2 627.4403686523438,
:y2 1157.59375,
:width 1305.6,
:height 1689.6}
{:x1 115.1875,
:y1 1155.09375,
:x2 631.001953125,
:y2 1183.09375,
:width 1305.6,
:height 1689.6}
{:x1 115.1875,
:y1 1159.09375,
:x2 631.001953125,
:y2 1180.34375,
:width 1305.6,
:height 1689.6}
{:x1 115.1875,
:y1 1180.59375,
:x2 627.4323120117188,
:y2 1208.59375,
:width 1305.6,
:height 1689.6}
{:x1 115.1875,
:y1 1184.59375,
:x2 627.4323120117188,
:y2 1205.84375,
:width 1305.6,
:height 1689.6}
{:x1 115.1875,
:y1 1206.109375,
:x2 192.5352783203125,
:y2 1234.109375,
:width 1305.6,
:height 1689.6}
{:x1 115.1875,
:y1 1210.109375,
:x2 192.5352783203125,
:y2 1231.359375,
:width 1305.6,
:height 1689.6}),
:page 8},
:content {:text " Here we observe that placing accesses and modifications to critical variables at the end of a transaction significantly reduces the probability of an abort due to conflicts."},
:properties {:color "yellow"}}
{:id #uuid "64539829-6f23-49fe-a860-ffa78b301acd",
:page 9,
:position {:bounding {:x1 115.1875,
:y1 905.828125,
:x2 258.0049133300781,
:y2 939.828125,
:width 1305.6,
:height 1689.6},
:rects ({:x1 115.1875,
:y1 905.828125,
:x2 258.0049133300781,
:y2 939.828125,
:width 1305.6,
:height 1689.6}
{:x1 147.078125,
:y1 910.828125,
:x2 172.58750915527344,
:y2 936.328125,
:width 1305.6,
:height 1689.6}),
:page 9},
:content {:text "4.1 KernFS"},
:properties {:color "yellow"}}
{:id #uuid "6453982f-f915-40ae-a87b-f94a89af4369",
:page 9,
:position {:bounding {:x1 115.1875,
:y1 1473.03125,
:x2 240.62522888183594,
:y2 1507.03125,
:width 1305.6,
:height 1689.6},
:rects ({:x1 115.1875,
:y1 1473.03125,
:x2 240.62522888183594,
:y2 1507.03125,
:width 1305.6,
:height 1689.6}
{:x1 147.078125,
:y1 1478.03125,
:x2 172.58750915527344,
:y2 1503.53125,
:width 1305.6,
:height 1689.6}),
:page 9},
:content {:text "4.2 LibFS"},
:properties {:color "yellow"}}
{:id #uuid "64539833-3b3c-451b-b550-6d33dd8ac106",
:page 9,
:position {:bounding {:x1 678.140625,
:y1 910.15625,
:x2 950.144287109375,
:y2 944.15625,
:width 1305.6,
:height 1689.6},
:rects ({:x1 678.140625,
:y1 910.15625,
:x2 950.144287109375,
:y2 944.15625,
:width 1305.6,
:height 1689.6}
{:x1 710.015625,
:y1 915.15625,
:x2 735.5250244140625,
:y2 940.65625,
:width 1305.6,
:height 1689.6}),
:page 9},
:content {:text "4.3 Prevent RTM abort"},
:properties {:color "yellow"}}
{:id #uuid "6453a07f-ca96-4a02-9cc3-1c4cb460ebee",
:page 9,
:position {:bounding {:x1 676.71875,
:y1 463.9375,
:x2 808.8411254882812,
:y2 491.9375,
:width 1305.6,
:height 1689.6},
:rects ({:x1 676.71875,
:y1 463.9375,
:x2 808.8411254882812,
:y2 491.9375,
:width 1305.6,
:height 1689.6}
{:x1 802.765625,
:y1 467.9375,
:x2 808.8411254882812,
:y2 489.1875,
:width 1305.6,
:height 1689.6}),
:page 9},
:content {:text "Fallback path. "},
:properties {:color "yellow"}}
{:id #uuid "64551435-bee3-456a-93f1-8fce14cd5771",
:page 10,
:position {:bounding {:x1 115.1875,
:y1 214.34375,
:x2 272.2582702636719,
:y2 248.34375,
:width 1305.6,
:height 1689.6},
:rects ({:x1 115.1875,
:y1 214.34375,
:x2 272.2582702636719,
:y2 248.34375,
:width 1305.6,
:height 1689.6}
{:x1 127.9375,
:y1 219.34375,
:x2 153.44688415527344,
:y2 244.84375,
:width 1305.6,
:height 1689.6}),
:page 10},
:content {:text "5 Evaluation"},
:properties {:color "yellow"}}
{:id #uuid "64551575-289f-4811-9a35-863dbe0a0eb7",
:page 10,
:position {:bounding {:x1 115.1875,
:y1 1016.34375,
:x2 381.7994079589844,
:y2 1050.34375,
:width 1305.6,
:height 1689.6},
:rects ({:x1 115.1875,
:y1 1016.34375,
:x2 381.7994079589844,
:y2 1050.34375,
:width 1305.6,
:height 1689.6}
{:x1 147.078125,
:y1 1021.34375,
:x2 172.58750915527344,
:y2 1046.84375,
:width 1305.6,
:height 1689.6}),
:page 10},
:content {:text "5.2 Micro-benchmarks"},
:properties {:color "yellow"}}
{:id #uuid "64551608-5fe1-4f1b-adfc-6d13f0226c41",
:page 12,
:position {:bounding {:x1 115.1875,
:y1 1290.90625,
:x2 387.46466064453125,
:y2 1324.90625,
:width 1305.6,
:height 1689.6},
:rects ({:x1 115.1875,
:y1 1290.90625,
:x2 387.46466064453125,
:y2 1324.90625,
:width 1305.6,
:height 1689.6}
{:x1 147.078125,
:y1 1295.90625,
:x2 172.58750915527344,
:y2 1321.40625,
:width 1305.6,
:height 1689.6}),
:page 12},
:content {:text "5.3 Macro-benchmarks"},
:properties {:color "yellow"}}
{:id #uuid "6455164b-8ba7-4bef-b5d8-bb59aca3db00",
:page 12,
:position {:bounding {:x1 678.140625,
:y1 492.078125,
:x2 1075.0595703125,
:y2 526.078125,
:width 1305.6,
:height 1689.6},
:rects ({:x1 678.140625,
:y1 492.078125,
:x2 1075.0595703125,
:y2 526.078125,
:width 1305.6,
:height 1689.6}
{:x1 710.015625,
:y1 497.078125,
:x2 735.5250244140625,
:y2 522.578125,
:width 1305.6,
:height 1689.6}),
:page 12},
:content {:text "5.4 Crash Consistency Correctness"},
:properties {:color "yellow"}}
{:id #uuid "64551652-fb9f-4e40-863f-96e5e3b40ef7",
:page 12,
:position {:bounding {:x1 678.140625,
:y1 1445.65625,
:x2 1006.250732421875,
:y2 1479.65625,
:width 1305.6,
:height 1689.6},
:rects ({:x1 678.140625,
:y1 1445.65625,
:x2 1006.250732421875,
:y2 1479.65625,
:width 1305.6,
:height 1689.6}
{:x1 710.015625,
:y1 1450.65625,
:x2 735.5250244140625,
:y2 1476.15625,
:width 1305.6,
:height 1689.6}),
:page 12},
:content {:text "5.5 Application Benchmarks"},
:properties {:color "yellow"}}
{:id #uuid "6455165b-d35d-4532-beeb-320e353e49ce",
:page 13,
:position {:bounding {:x1 678.140625,
:y1 1245.078125,
:x2 831.1962890625,
:y2 1279.078125,
:width 1305.6,
:height 1689.6},
:rects ({:x1 678.140625,
:y1 1245.078125,
:x2 831.1962890625,
:y2 1279.078125,
:width 1305.6,
:height 1689.6}
{:x1 690.890625,
:y1 1250.078125,
:x2 716.4000244140625,
:y2 1275.578125,
:width 1305.6,
:height 1689.6}),
:page 13},
:content {:text "6 Discussion"},
:properties {:color "yellow"}}
{:id #uuid "645516e6-8343-4d4e-9f2c-f6c13d13687d",
:page 14,
:position {:bounding {:x1 115.1875,
:y1 763.28125,
:x2 305.2663269042969,
:y2 797.28125,
:width 1305.6,
:height 1689.6},
:rects ({:x1 115.1875,
:y1 763.28125,
:x2 305.2663269042969,
:y2 797.28125,
:width 1305.6,
:height 1689.6}
{:x1 127.9375,
:y1 768.28125,
:x2 153.44688415527344,
:y2 793.78125,
:width 1305.6,
:height 1689.6}),
:page 14},
:content {:text "7 Related Work"},
:properties {:color "yellow"}}
{:id #uuid "64551b25-e4a7-401d-b143-3d4857c4e294",
:page 10,
:position {:bounding {:x1 0,
:y1 795.21875,
:x2 1190.397705078125,
:y2 1281.125,
:width 1305.6,
:height 1689.6},
:rects ({:x1 1092.034912109375,
:y1 795.21875,
:x2 1190.397705078125,
:y2 823.21875,
:width 1305.6,
:height 1689.6}
{:x1 678.140625,
:y1 820.71875,
:x2 809.5262451171875,
:y2 848.71875,
:width 1305.6,
:height 1689.6}
{:x1 0,
:y1 1257.125,
:x2 0,
:y2 1281.125,
:width 1305.6,
:height 1689.6}),
:page 10},
:content {:text "most writes miss the cache"},
:properties {:color "yellow"}}
{:id #uuid "64551cee-971e-4759-be45-8f96ebe50a4e",
:page 10,
:position {:bounding {:x1 0,
:y1 1052.140625,
:x2 1190.395263671875,
:y2 1447.0625,
:width 1305.6,
:height 1689.6},
:rects ({:x1 1169.70849609375,
:y1 1052.140625,
:x2 1190.395263671875,
:y2 1080.140625,
:width 1305.6,
:height 1689.6}
{:x1 678.140625,
:y1 1077.65625,
:x2 963.6591186523438,
:y2 1105.65625,
:width 1305.6,
:height 1689.6}
{:x1 0,
:y1 1423.0625,
:x2 0,
:y2 1447.0625,
:width 1305.6,
:height 1689.6}),
:page 10},
:content {:text "all file systems scale nearly linearly. "},
:properties {:color "yellow"}}
{:id #uuid "64551ead-5c0e-4978-99f6-f9156e8ed99e",
:page 11,
:position {:bounding {:x1 113.765625,
:y1 1514.984375,
:x2 207.30987548828125,
:y2 1542.984375,
:width 1305.6,
:height 1689.6},
:rects ({:x1 113.765625,
:y1 1514.984375,
:x2 207.30987548828125,
:y2 1542.984375,
:width 1305.6,
:height 1689.6}),
:page 11},
:content {:text "Abort rate."},
:properties {:color "yellow"}}
{:id #uuid "64551ef9-fa99-4c2d-8dd5-e0343042aeb6",
:page 11,
:position {:bounding {:x1 676.84375,
:y1 1387.46875,
:x2 959.4585571289062,
:y2 1415.46875,
:width 1305.6,
:height 1689.6},
:rects ({:x1 676.84375,
:y1 1387.46875,
:x2 959.4585571289062,
:y2 1415.46875,
:width 1305.6,
:height 1689.6}),
:page 11},
:content {:text "The latency of the fallback path."},
:properties {:color "yellow"}}
{:id #uuid "645522ec-84b5-4c1e-b029-90cb01e58587",
:page 12,
:position {:bounding {:x1 113.890625,
:y1 1047.796875,
:x2 464.3536682128906,
:y2 1075.796875,
:width 1305.6,
:height 1689.6},
:rects ({:x1 113.890625,
:y1 1047.796875,
:x2 464.3536682128906,
:y2 1075.796875,
:width 1305.6,
:height 1689.6}),
:page 12},
:content {:text "The performance under high abort rate."},
:properties {:color "yellow"}}
{:id #uuid "64552664-0fc7-426a-bfea-94d9833ef8a8",
:page 13,
:position {:bounding {:x1 678.140625,
:y1 1285.234375,
:x2 1032.6226806640625,
:y2 1319.234375,
:width 1305.6,
:height 1689.6},
:rects ({:x1 678.140625,
:y1 1285.234375,
:x2 717.5625,
:y2 1319.234375,
:width 1305.6,
:height 1689.6}
{:x1 735.515625,
:y1 1285.234375,
:x2 1032.6226806640625,
:y2 1319.234375,
:width 1305.6,
:height 1689.6}
{:x1 710.015625,
:y1 1290.234375,
:x2 717.5625,
:y2 1315.734375,
:width 1305.6,
:height 1689.6}),
:page 13},
:content {:text "6.1 Other File System Features"},
:properties {:color "yellow"}}
{:id #uuid "645526bd-e94d-4728-8180-2fcdacffc711",
:page 14,
:position {:bounding {:x1 115.1875,
:y1 558.96875,
:x2 448.9729919433594,
:y2 592.96875,
:width 1305.6,
:height 1689.6},
:rects ({:x1 115.1875,
:y1 558.96875,
:x2 448.9729919433594,
:y2 592.96875,
:width 1305.6,
:height 1689.6}
{:x1 147.078125,
:y1 563.96875,
:x2 172.58750915527344,
:y2 589.46875,
:width 1305.6,
:height 1689.6}),
:page 14},
:content {:text "6.2 HOP in Key-Value Stores"},
:properties {:color "yellow"}}
{:id #uuid "64552acd-0001-4ec1-8fc5-59187f8cfc3d",
:page 14,
:position {:bounding {:x1 115.1875,
:y1 1412.96875,
:x2 505.5840148925781,
:y2 1440.96875,
:width 1305.6,
:height 1689.6},
:rects ({:x1 115.1875,
:y1 1412.96875,
:x2 505.5840148925781,
:y2 1440.96875,
:width 1305.6,
:height 1689.6}),
:page 14},
:content {:text "System Transactions and Transactional FS."},
:properties {:color "yellow"}}
{:id #uuid "64552b13-6de1-4f6c-9513-8dccdbe11371",
:page 14,
:position {:bounding {:x1 678.140625,
:y1 500.015625,
:x2 860.0288696289062,
:y2 528.015625,
:width 1305.6,
:height 1689.6},
:rects ({:x1 678.140625,
:y1 500.015625,
:x2 860.0288696289062,
:y2 528.015625,
:width 1305.6,
:height 1689.6}),
:page 14},
:content {:text "HTM-assisted OCC"},
:properties {:color "yellow"}}
{:id #uuid "64552b5a-d18e-443e-b77c-9b4700aedfea",
:page 14,
:position {:bounding {:x1 678.140625,
:y1 895.6875,
:x2 860.5531616210938,
:y2 923.6875,
:width 1305.6,
:height 1689.6},
:rects ({:x1 678.140625,
:y1 895.6875,
:x2 860.5531616210938,
:y2 923.6875,
:width 1305.6,
:height 1689.6}),
:page 14},
:content {:text "Page fault in RTM."},
:properties {:color "yellow"}}
{:id #uuid "64552bd5-b559-4a64-b2e5-053111a4ebdd",
:page 14,
:position {:bounding {:x1 115.1875,
:y1 891.21875,
:x2 332.4095458984375,
:y2 919.21875,
:width 1305.6,
:height 1689.6},
:rects ({:x1 115.1875,
:y1 891.21875,
:x2 332.4095458984375,
:y2 919.21875,
:width 1305.6,
:height 1689.6}),
:page 14},
:content {:text "Persistent Transactions."},
:properties {:color "yellow"}}
{:id #uuid "64552bf8-10f4-43e8-a07b-b5a2525d1428",
:page 14,
:position {:bounding {:x1 230.6304931640625,
:y1 1018.734375,
:x2 495.06378173828125,
:y2 1046.734375,
:width 1305.6,
:height 1689.6},
:rects ({:x1 230.6304931640625,
:y1 1018.734375,
:x2 495.06378173828125,
:y2 1046.734375,
:width 1305.6,
:height 1689.6}),
:page 14},
:content {:text " transaction semantics on PM"},
:properties {:color "yellow"}}],
:extra {:page 14}}

View File

@ -15,4 +15,4 @@
:page 1}, :page 1},
:content {:text "ABSTRACT"}, :content {:text "ABSTRACT"},
:properties {:color "yellow"}}], :properties {:color "yellow"}}],
:extra {:page 1}} :extra {:page 12}}

View File

@ -1,3 +1,3 @@
- TODO Paper1-HTMFS Implementation 看完 - DONE Paper1-HTMFS Implementation 看完
- TODO 模式识别作业提交 - DONE 模式识别作业提交
- TODO 写一会编译器 - DONE 写一会编译器

3
journals/2023_05_05.md Normal file
View File

@ -0,0 +1,3 @@
- 写了一天编译器前端终于看到写完的希望了只要把数组支持整完就可以开始写SSA和IR生成了
- C++的智障类型系统浪费了我至少两个小时,调了好久的类型系统结构
- Paper1 基本上看完了但是IPADS那边也没个准信

3
journals/2023_05_06.md Normal file
View File

@ -0,0 +1,3 @@
- TODO 总结回顾Paper1
- TODO 读 Papaer2-Design
- TODO 编译器数组支持

View File

@ -317,13 +317,13 @@ mark {
font-size: inherit; font-size: inherit;
text-decoration-style: solid; text-decoration-style: solid;
text-decoration: underline; text-decoration: underline;
text-decoration-color: rgba(0, 0, 0, 0.5); text-decoration-color: rgba(255,198,0,0.7);
text-decoration-thickness: 4px; text-decoration-thickness: 4px;
text-underline-offset: -1px; text-underline-offset: -1px;
text-decoration-skip-ink: none; text-decoration-skip-ink: none;
} }
html[data-theme="dark"] mark { html[data-theme="dark"] mark {
text-decoration-color: rgba(233, 233, 233, 0.5); text-decoration-color: rgba(255,198,0,0.7);
} }
/* fix color page-reference when mark text */ /* fix color page-reference when mark text */
mark .page-ref, mark .page-ref,

View File

@ -149,13 +149,13 @@ file-path:: ../assets/HTMFS_Strong_Consistency_Comes_for_Free_with_1682647018871
- Write-Read 也就是如果在RTM里面写入并且commit之前读取会导致RTM abort - Write-Read 也就是如果在RTM里面写入并且commit之前读取会导致RTM abort
- Read-Write 的情况就比较复杂了。作者给了个图,考虑了 T1 读同时有T2写的例子 - Read-Write 的情况就比较复杂了。作者给了个图,考虑了 T1 读同时有T2写的例子
- T2 在 T1 验证之前写Valid fail 然后重新读。不过其实是有一个 overlap 的图里面的第三个B点应该也会 RTM-abort - T2 在 T1 验证之前写Valid fail 然后重新读。不过其实是有一个 overlap 的图里面的第三个B点应该也会 RTM-abort
- T2 在 T1 验证之后、RTM commit 之前写:因为读取的数据在 RTM 的 read-set 里面,所有还是会 RTM abort - T2 在 T1 验证之后、RTM commit 之前写:因为SeqCnt在 RTM 的 read-set 里面写操作会修改seqcnt,所有还是会 RTM abort
- 3.2 File Operations - 3.2 File Operations
ls-type:: annotation ls-type:: annotation
hl-page:: 6 hl-page:: 6
hl-color:: yellow hl-color:: yellow
id:: 64534050-8459-4719-866e-612b76560e00 id:: 64534050-8459-4719-866e-612b76560e00
- 其实看 Figure 3 就行了 - 其实看 Figure 3 就行了。首先分配 shadow page然后写 shadow page最后用 RTM 更新指针到 shadow 上。
- 3.2.1 Data Read - 3.2.1 Data Read
ls-type:: annotation ls-type:: annotation
hl-page:: 6 hl-page:: 6
@ -202,21 +202,30 @@ file-path:: ../assets/HTMFS_Strong_Consistency_Comes_for_Free_with_1682647018871
hl-color:: red hl-color:: red
id:: 64535f97-b733-4522-a2d1-dbfc8837799e id:: 64535f97-b733-4522-a2d1-dbfc8837799e
hl-stamp:: 1683185566331 hl-stamp:: 1683185566331
- 反正感觉讲的就挺矛盾的。。。也有可能是没理解清楚?
- 3.3 Directory Operations - 3.3 Directory Operations
ls-type:: annotation ls-type:: annotation
hl-page:: 7 hl-page:: 7
hl-color:: yellow hl-color:: yellow
id:: 64534d0c-9fe2-4817-b510-5d2da7d55dbf id:: 64534d0c-9fe2-4817-b510-5d2da7d55dbf
- Figure 5 描述了目录的形式。相较于简单的UNIX FS它在目录的inode和entry之间加了一个hash table。DirInode 指向一个 block 里面放了一个hash tab 然后每个hash tab entry指向一组dir entries里面才是每个目录的名字、inode
- 3.3.1 Path Walk - 3.3.1 Path Walk
ls-type:: annotation ls-type:: annotation
hl-page:: 7 hl-page:: 7
hl-color:: yellow hl-color:: yellow
id:: 64534d0f-1882-4633-9cd4-fce9d411aeb9 id:: 64534d0f-1882-4633-9cd4-fce9d411aeb9
- 记录每个遍历到的entry的seqcnt然后在RTM里面验证这些家伙
hl-page:: 7
ls-type:: annotation
id:: 645385d6-70be-41ba-8697-f6bf49608834
hl-color:: yellow
- 3.3.2 Directory Updates - 3.3.2 Directory Updates
ls-type:: annotation ls-type:: annotation
hl-page:: 7 hl-page:: 7
hl-color:: yellow hl-color:: yellow
id:: 64534d19-b941-4c04-a084-2d8a09d00883 id:: 64534d19-b941-4c04-a084-2d8a09d00883
- 不对目录的inode加锁。
- 插入或删除Dir Entry 的时候,更新 hash tab 的 bucket 的 Bseq这样就不会冲突了甚至还能增加一些并行性能如果hash到不同的bucket。不过好像直接用正在修改的目录的 Dseq 好像也可以?
- 3.4 Other File Types - 3.4 Other File Types
ls-type:: annotation ls-type:: annotation
hl-page:: 8 hl-page:: 8
@ -228,13 +237,220 @@ file-path:: ../assets/HTMFS_Strong_Consistency_Comes_for_Free_with_1682647018871
hl-page:: 8 hl-page:: 8
hl-color:: yellow hl-color:: yellow
id:: 64534d33-2bfe-4817-a5bd-0cc3534584d7 id:: 64534d33-2bfe-4817-a5bd-0cc3534584d7
- 三种 timestamp Access访问, Modified修改内容, Changed修改元数据
- timestamp应该和其他操作写在同一个 trx 里面
- Here we observe that placing accesses and modifications to critical variables at the end of a transaction significantly reduces the probability of an abort due to conflicts.
ls-type:: annotation
hl-page:: 8
hl-color:: yellow
id:: 6453916b-6fc1-4e3a-8e54-5d6c3767cf45
- 不知道为啥
- 3.6 The Special Case: Rename - 3.6 The Special Case: Rename
ls-type:: annotation ls-type:: annotation
hl-page:: 8 hl-page:: 8
hl-color:: yellow hl-color:: yellow
id:: 64534d37-b14f-4943-92c0-7bb4823fbd50 id:: 64534d37-b14f-4943-92c0-7bb4823fbd50
- `unlink``rmdir` 都只能删掉叶子节点,比如 rm 只能删掉空目录,所以比较简单
- `rename` 操作没有限制会涉及到两条路径要删一个entry再加一条entry
- 可能的死锁问题两个并发的rename操作涉及相同的两个目录然后互相锁了一个。可以通过比较 lock 变量地址的方法来决定上锁顺序以避免这个问题
- 目录环问题。paper里面的例子讲的很清楚只锁两个父目录没用虽然不会出现一致性问题但是会出环。所以一般会用个全局锁
- 不过 HOP 不会有这个问题。因为它的目录依赖都被记录了,只要有任何一级目录被修改,都会 validation fail 然后重来。在RTM里面会进行validate、 removing 和 adding 三个操作
- 4 Implementation - 4 Implementation
ls-type:: annotation ls-type:: annotation
hl-page:: 9 hl-page:: 9
hl-color:: yellow hl-color:: yellow
id:: 64534d45-e498-427d-b4ef-74eaf56f7aae id:: 64534d45-e498-427d-b4ef-74eaf56f7aae
- 基于 ZoFS 实现,不过我也不知道它是个啥。它分成两部分,内核里面一部分,还有用户空间的 Library。
- 坏家伙ZoFS 是也是这帮人自己写的
- 根据权限不同,把整个 FS tree 分成不同的 zone
- Figure 7 HTMFS 分为 KernFS (大概是直接白嫖了 ZoFS 的)和自己写的 LibFS。两者通过接口 `Coffer_enlarge/shrink` 进行交互,好像 KernFS 就是个分配管理器。。。。
- 4.1 KernFS
ls-type:: annotation
hl-page:: 9
hl-color:: yellow
id:: 64539829-6f23-49fe-a860-ffa78b301acd
- 维护整个 FS 所有 zone 的信息,以及 PM 页面的属性
- 每个 zone 有一个 root page 存元数据
- 用一个 persistent 哈希表存所有的 zone ,映射 zone 的路径前缀 -> zone 的 root page 的相对地址
- User space 的请求发过来是路径,然后 KernFS 通过这个表获得 zone
- 两级分配:把很多的 pages 分给 zone然后每个 zone 在细分管理这些 page。
- KernFS 会管理这些页面的分配状态。用两个全局的红黑树来管理 free 和 allocated 的空间,这两颗 RBT 在DRAM里面 crash 之后需要重建
- 4.2 LibFS
ls-type:: annotation
hl-page:: 9
hl-color:: yellow
id:: 6453982f-f915-40ae-a87b-f94a89af4369
- 维护每个 zone 内部的 data metadata比如文件、目录
- 前面的 Design 都是在这里实现的
- KernFS 用 free list 管理分配,如果某个 zone 打 syscall 请求空间, KernFS 返回一个 free list 。为了不修改 kernel side LibFS 要转换这个 list 使得能够被 HTMFS 识别
- Fallback path :先 retry 再上锁(+ RTM 更新)最后 journaling
hl-page:: 9
ls-type:: annotation
id:: 6453a07f-ca96-4a02-9cc3-1c4cb460ebee
hl-color:: yellow
- 因为有这个 fallback ,所以在 RTM 里面要先检查是不是别的进程给 lock 了,如果 lock 了就直接中止 RTM 转而去抢 lock 。
- 总结一个 RTM trick :如果要检查什么东西,放进 RTM 里面检查,因为会加进 read-set ,这样别人改了的话就会 abort
- 4.3 Prevent RTM abort
ls-type:: annotation
hl-page:: 9
hl-color:: yellow
id:: 64539833-3b3c-451b-b550-6d33dd8ac106
- 主要原因是 page fault ,但是没法搞,所以事先 access 一下,然后再进 RTM这样就不太容易在 RTM 里面炸了
- 偶然的 abort直接 retry ;如果次数太多,那么就 fallback
- fallback 策略:先上锁,把 conflict abort 的可能性消除,然后再执行 HOP 或者说是RTM就是前面的机制这里只是不让他们冲突了来保证崩溃一致性
- 其他原因,什么指令问题,不过那个链接挂了
- 5 Evaluation
ls-type:: annotation
hl-page:: 10
hl-color:: yellow
id:: 64551435-bee3-456a-93f1-8fce14cd5771
- Performance comparison with weak consistency FS
- Application performance
- How HTM improve FS
- 5.2 Micro-benchmarks
ls-type:: annotation
hl-page:: 10
hl-color:: yellow
id:: 64551575-289f-4811-9a35-863dbe0a0eb7
- Data overwrite, low contention, first 4K of ==Different files==
- `rep-mov``sse-mov` 之间的性能差距导致 HTMFS 比 ZoFS 要慢
- 在这种情况下cache hit rate 很高。而 `rep-mov` 的性能在这种情况下 `sse2-mov` 要好。其他的没有这种问题因为hit
- Data overwrite, medium contention. ==Shared file, different blocks==
- lock-free 让 HTMFS 在这种情况下显著领先而其他的FS会随着并发数上升而性能下降
- Scalability
- Data append, low contention
- most writes miss the cache
ls-type:: annotation
hl-page:: 10
hl-color:: yellow
id:: 64551b25-e4a7-401d-b143-3d4857c4e294
- NOVA 用了 non-temporal write 和 per-core allocator绕过 cache 直接写 PM
- HTMFS 正常先写 cache 然后再同步到 PMmiss 的时候要先读再写(占两倍带宽),导致 PM 的带宽不够了
- 如果给 HTMFS 换上 NT write ,性能会好很多
- 好像后面还是会寄掉,说是撞到了 bandwidth 上限
- Data read, low contention. Different file, a block
- all file systems scale nearly linearly 虽然HTMFS更高
hl-page:: 10
ls-type:: annotation
id:: 64551cee-971e-4759-be45-8f96ebe50a4e
hl-color:: yellow
- medium, high contention 的情况 (shared file/shared block) 差不多
- Metadata create. Create files in different directories
- 到后面不 scale 了,写入带宽不够
- NOVA 在低带宽的情况下比 HTMFS 好,因为 ZoFS 用 0 表示不存在的页面因此在创建的时候要大量写0而 ZoFS 没有很好的 crash consistency如果仅用文件大小表示页面存在性可能会导致 index 和 size 不一致
- 如果 HTMFS 删掉这个步骤(有一致性保证)变成 NZ 版本会变快跟NOVA差不多
- Metadata create, medium. Create files in same directory.
- HTMFS scales best. 因为用的锁策略是 hash bucket
- NZ 效果前期会更好,因为消除了一些 memset
- Metadata rename, low. Rename in different dirs
- All scale linearly, HTMFS best
- Metadata rename, medium. Move to shared dir
- HTMFS much better, fine-grained OCC
- Abort rate.
ls-type:: annotation
hl-page:: 11
hl-color:: yellow
id:: 64551ead-5c0e-4978-99f6-f9156e8ed99e
- 基本上没什么,到 Fall back 的就更少了
- The latency of the fallback path.
ls-type:: annotation
hl-page:: 11
hl-color:: yellow
id:: 64551ef9-fa99-4c2d-8dd5-e0343042aeb6
- 3 paths, HTM, fallback, journal
- Data write 的延迟fallback 略高于 HTM但是 journal 远高于 两倍的HTM
- 这是因为 HTM 不是直接写 PM 的,而是写 cache (然后由 eADR 保证断电后 cache 的东西会存进 PM。如果用直接写 PM 的方法,那么 journal 差不多是两倍
- Metadata write 的延迟几种差不多
- The performance under high abort rate. Write same file same block
ls-type:: annotation
hl-page:: 12
hl-color:: yellow
id:: 645522ec-84b5-4c1e-b029-90cb01e58587
- 测试的是 fallback 的性能,如果不是由于 memcpy 指令HTMFS 的性能最好
- 5.3 Macro-benchmarks
ls-type:: annotation
hl-page:: 12
hl-color:: yellow
id:: 64551608-5fe1-4f1b-adfc-6d13f0226c41
- 用了两个综合测试。都是小文件读写
- Webproxy 是读为主几种好像都差不多HTMFS和ZoFS稍微高一点
- Varmail 是读写差不多metadata操作多HTMFS比较好
- 5.4 Crash Consistency Correctness
ls-type:: annotation
hl-page:: 12
hl-color:: yellow
id:: 6455164b-8ba7-4bef-b5d8-bb59aca3db00
- 论文里面写了一个例子。给一个 4KB 的 全a文件写8KB的b字符。
- 先分配一个4K空页
- fill 0-4l
- fill 4k-8k
- 把4K页更新进file index
- 更新文件大小和修改时间
- 参考状态是 all-or-nothing也就是要么4K的a要么8K的b同时修改时间更新、freelist减少
- 在表里面展示了1之后crash、2之后crash、5中间crash三种 crash injection
- 5.5 Application Benchmarks
ls-type:: annotation
hl-page:: 12
hl-color:: yellow
id:: 64551652-fb9f-4e40-863f-96e5e3b40ef7
- SQLite + TPC-C
- 测吞吐量
- HTMFS/ZoFS(相当于是HTMFS的弱一致版本)性能最好而且HTMFS相对于ZoFS的性能损失较小
- NOVA的强一致和弱一致版本之间的差距较大
- LevelDB
- 测延时
- NOVA的写延时要比HTMFS好而读要差一些
- HTMFS和ZoFS性能几乎一致而NOVA的弱一致版本则在写性能上有较大差距说明一致性代价较大
- 6 Discussion
ls-type:: annotation
hl-page:: 13
hl-color:: yellow
id:: 6455165b-d35d-4532-beeb-320e353e49ce
- 6.1 Other File System Features
ls-type:: annotation
hl-page:: 13
hl-color:: yellow
id:: 64552664-0fc7-426a-bfea-94d9833ef8a8
- Compression, Deduplication, Checksum
- 这些操作基本上都没有对基本的FS操作提出特殊的要求
- 6.2 HOP in Key-Value Stores
ls-type:: annotation
hl-page:: 14
hl-color:: yellow
id:: 645526bd-e94d-4728-8180-2fcdacffc711
- HOP 机制可以迁移到 KV 数据库上
- 7 Related Work
ls-type:: annotation
hl-page:: 14
hl-color:: yellow
id:: 645516e6-8343-4d4e-9f2c-f6c13d13687d
- Persistent Transactions.
ls-type:: annotation
hl-page:: 14
hl-color:: yellow
id:: 64552bd5-b559-4a64-b2e5-053111a4ebdd
- transaction semantics on PM, software programming, user-space
hl-page:: 14
ls-type:: annotation
id:: 64552bf8-10f4-43e8-a07b-b5a2525d1428
hl-color:: yellow
- 也有HTM硬件设计的东西在eADR之前
- System Transactions and Transactional FS.
ls-type:: annotation
hl-page:: 14
hl-color:: yellow
id:: 64552acd-0001-4ec1-8fc5-59187f8cfc3d
- 在OS里面用使用 HTM trx
- FS 提供 事务 接口而HTMFS只是用事务来实现POSIX而已
- HTM-assisted OCC
ls-type:: annotation
hl-page:: 14
hl-color:: yellow
id:: 64552b13-6de1-4f6c-9513-8dccdbe11371
- 在数据库上用HTM来提供并发性能也有用切片的方法适应长程操作的研究
- Page fault in RTM.
ls-type:: annotation
hl-page:: 14
hl-color:: yellow
id:: 64552b5a-d18e-443e-b77c-9b4700aedfea
- 前期的工作解决了该问题通过修改RTM硬件来识别PF