108 lines
8.9 KiB
XML
108 lines
8.9 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<svg xmlns="http://www.w3.org/2000/svg" width="680" height="2501" viewBox="0 0 680 2501" role="img" aria-labelledby="diagram-title diagram-description">
|
|
<title id="diagram-title">게스트의 write() 가 virtqueue 에 실리기까지</title>
|
|
<desc id="diagram-description">위에서 아래로 읽는다. 맨 위 Guest Userspace 구역에 PostgreSQL / Keycloak 이 있고 write() 가 게스트 커널로 내려간다. Guest Kernel 구역 안에서 VFS 가 먼저 받고, ext4 / XFS 가 파일을 block 공간에 배치하고, Guest Page Cache 가 그 내용을 dirty page 로 받아 두었다가 writeback 으로 Guest Block Layer 에 내려보낸다. Guest Block Layer 는 그것을 WRITE 나 FLUSH 요청으로 바꿔 /dev/vda 에 걸고, virtio-blk Frontend 가 그 요청을 virtqueue 에 게시한다. virtqueue 아래의 VM Boundary 부터는 QEMU 와 호스트 계층이라 이 그림에서 잘랐다. 완료가 같은 virtqueue 로 되돌아오는 역방향은 SSOT 의 다른 절이 대는 사실이라 이 그림에 넣지 않았고 본문 문단이 맡는다.</desc>
|
|
<metadata>{"techviz":{"spec_version":"1.1","id":"guest-block-io-to-virtqueue","profile":"component-flow"},"source_context":{"document":"docs/virtualization/final/document.md","document_sha256":"8c4ecc64c8cea9a4450ed7131fdd9cb2048dc092b66cd969f6346ed77887c210","anchor":{"kind":"heading","value":"128. 전체 구조","line":5817}},"evidence_policy":"Each factual element cites source lines or is marked assumption.","diagram_only":true}</metadata>
|
|
<defs>
|
|
<marker id="arrow" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto-start-reverse">
|
|
<path d="M 0 0 L 10 5 L 0 10 z" />
|
|
</marker>
|
|
<style>
|
|
:root { color-scheme: light; }
|
|
text { font-family: Inter, Pretendard, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; fill: #111827; }
|
|
.canvas { fill: #ffffff; }
|
|
.group-box { fill: #ffffff; stroke: #9ca3af; stroke-width: 1.4; stroke-dasharray: 7 5; }
|
|
.group-label-bg { fill: #ffffff; }
|
|
.group-label { font-size: 13px; font-weight: 650; fill: #374151; }
|
|
.edge { fill: none; stroke: #374151; stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round; marker-end: url(#arrow); }
|
|
.edge.style-dashed, .edge.semantic-dashed, .edge.assumption { stroke-dasharray: 7 5; }
|
|
.edge.style-dotted { stroke-dasharray: 2 5; }
|
|
.edge.emphasis-primary { stroke: #2563eb; stroke-width: 2.2; }
|
|
.edge.emphasis-muted { stroke: #9ca3af; }
|
|
.edge.emphasis-warning, .edge.kind-failure, .edge.kind-error { stroke: #dc2626; stroke-width: 2.2; }
|
|
.edge-label-bg { fill: #ffffff; }
|
|
.edge-label { font-size: 12px; font-weight: 560; text-anchor: middle; }
|
|
.node-shape { fill: #ffffff; stroke: #4b5563; stroke-width: 1.7; }
|
|
.node-shape.emphasis-primary { stroke: #2563eb; stroke-width: 2.2; }
|
|
.node-shape.emphasis-muted { stroke: #9ca3af; fill: #f9fafb; }
|
|
.node-shape.emphasis-warning { stroke: #d97706; stroke-width: 2; fill: #fffdf5; }
|
|
.node-shape.kind-database, .node-shape.kind-datastore, .node-shape.kind-storage { fill: #f8fafc; }
|
|
.node-shape.kind-queue, .node-shape.kind-event, .node-shape.kind-topic { fill: #fafafa; }
|
|
.node-shape.assumption { stroke-dasharray: 4 4; }
|
|
.storage-bottom, .controller-divider { fill: none; stroke: #4b5563; stroke-width: 1.4; }
|
|
.controller-led { fill: #4b5563; }
|
|
.actor-symbol { fill: none; stroke: #4b5563; stroke-width: 1.8; stroke-linecap: round; }
|
|
.actor-symbol.emphasis-primary { stroke: #2563eb; stroke-width: 2.2; }
|
|
.node-label { font-size: 14px; font-weight: 650; text-anchor: middle; }
|
|
.node-role { font-size: 10px; letter-spacing: 0.04em; text-anchor: middle; fill: #6b7280; }
|
|
.node-detail-divider { stroke: #d1d5db; stroke-width: 1; }
|
|
.node-detail { font-size: 11px; fill: #374151; }
|
|
.assumption-badge { font-size: 9px; font-weight: 700; fill: #92400e; }
|
|
.failure-mark { stroke: #dc2626; stroke-width: 4; stroke-linecap: round; }
|
|
.lifeline { stroke: #9ca3af; stroke-width: 1.2; stroke-dasharray: 5 5; }
|
|
.timeline-axis { stroke: #374151; stroke-width: 1.8; marker-end: url(#arrow); }
|
|
.timeline-stem { stroke: #6b7280; stroke-width: 1.3; }
|
|
.timeline-marker { fill: #ffffff; stroke: #374151; stroke-width: 1.7; }
|
|
.timeline-marker.primary { fill: #2563eb; stroke: #2563eb; }
|
|
.timeline-marker.warning { fill: #dc2626; stroke: #dc2626; }
|
|
.timeline-label { font-size: 13px; font-weight: 650; text-anchor: middle; }
|
|
.timeline-detail { font-size: 11px; fill: #4b5563; text-anchor: middle; }
|
|
</style>
|
|
</defs>
|
|
<rect class="canvas" width="680" height="2501" />
|
|
<rect class="group-box" x="35.0" y="99.0" width="241.0" height="160.0" rx="8" />
|
|
<rect class="group-label-bg" x="49.0" y="89.0" width="127.0" height="22" />
|
|
<text class="group-label" x="59.0" y="104.0">Guest Userspace</text>
|
|
<rect class="group-box" x="47.0" y="440.0" width="227.0" height="2016.0" rx="8" />
|
|
<rect class="group-label-bg" x="61.0" y="430.0" width="106.0" height="22" />
|
|
<text class="group-label" x="71.0" y="445.0">Guest Kernel</text>
|
|
<polyline class="edge kind-data style-solid emphasis-normal" points="155.5,233.0 155.5,359.5 152.0,359.5 152.0,486.0" data-evidence="5824-5826,5903-5903" />
|
|
<polyline class="edge kind-data style-solid emphasis-normal" points="152.0,550.0 152.0,673.0 152.0,673.0 152.0,796.0" data-evidence="5830-5832" />
|
|
<polyline class="edge kind-data style-solid emphasis-normal" points="152.0,860.0 152.0,983.0 152.0,983.0 152.0,1106.0" data-evidence="5832-5834" />
|
|
<polyline class="edge kind-data style-solid emphasis-normal" points="152.0,1170.0 152.0,1293.0 153.5,1293.0 153.5,1416.0" data-evidence="5836-5838" />
|
|
<rect class="edge-label-bg" x="113.6" y="1251.0" width="78.3" height="22" rx="3" />
|
|
<text class="edge-label" x="152.8" y="1266.0">writeback</text>
|
|
<polyline class="edge kind-data style-solid emphasis-normal" points="153.5,1480.0 153.5,1604.5 152.0,1604.5 152.0,1729.0" data-evidence="5840-5842" />
|
|
<rect class="edge-label-bg" x="100.2" y="1562.5" width="105.1" height="22" rx="3" />
|
|
<text class="edge-label" x="152.8" y="1577.5">WRITE / FLUSH</text>
|
|
<polyline class="edge kind-data style-solid emphasis-normal" points="152.0,1793.0 152.0,1916.0 160.5,1916.0 160.5,2039.0" data-evidence="5842-5844" />
|
|
<polyline class="edge kind-data style-solid emphasis-normal" points="160.5,2103.0 160.5,2234.5 152.0,2234.5 152.0,2366.0" data-evidence="5844-5846" />
|
|
<rect class="edge-label-bg" x="80.2" y="2192.5" width="152.0" height="22" rx="3" />
|
|
<text class="edge-label" x="156.2" y="2207.5">Virtio block request</text>
|
|
<g id="node-app">
|
|
<rect class="node-shape kind-service emphasis-normal role-source" data-evidence="5820-5822,5898-5898,5824-5826" x="65.0" y="145.0" width="181.0" height="88.0" rx="7" />
|
|
<text class="node-label" x="155.5" y="172.0">PostgreSQL / Keycloak</text>
|
|
<line class="node-detail-divider" x1="79.0" y1="193.0" x2="232.0" y2="193.0" />
|
|
<text class="node-detail" x="81.0" y="210.0">read / write</text>
|
|
<text class="node-detail" x="81.0" y="226.0">fsync / sync</text>
|
|
</g>
|
|
<g id="node-vfs">
|
|
<rect class="node-shape kind-service emphasis-normal role-service" data-evidence="5828-5830,5918-5918" x="77.0" y="486.0" width="150.0" height="64.0" rx="7" />
|
|
<text class="node-label" x="152.0" y="516.0">VFS</text>
|
|
</g>
|
|
<g id="node-fs">
|
|
<rect class="node-shape kind-service emphasis-normal role-service" data-evidence="5832-5832" x="77.0" y="796.0" width="150.0" height="64.0" rx="7" />
|
|
<text class="node-label" x="152.0" y="826.0">ext4 / XFS</text>
|
|
</g>
|
|
<g id="node-page-cache">
|
|
<rect class="node-shape kind-store emphasis-normal role-store" data-evidence="5834-5834" x="77.0" y="1106.0" width="150.0" height="64.0" rx="7" />
|
|
<text class="node-label" x="152.0" y="1136.0">Guest Page Cache</text>
|
|
</g>
|
|
<g id="node-block-layer">
|
|
<rect class="node-shape kind-service emphasis-normal role-service" data-evidence="5838-5838" x="77.0" y="1416.0" width="153.0" height="64.0" rx="7" />
|
|
<text class="node-label" x="153.5" y="1446.0">Guest Block Layer</text>
|
|
</g>
|
|
<g id="node-vda">
|
|
<rect class="node-shape kind-device emphasis-normal role-service" data-evidence="5842-5842,5892-5892" x="77.0" y="1729.0" width="150.0" height="64.0" rx="7" />
|
|
<text class="node-label" x="152.0" y="1759.0">/dev/vda</text>
|
|
</g>
|
|
<g id="node-virtio-blk">
|
|
<rect class="node-shape kind-service emphasis-normal role-service" data-evidence="5844-5844,5802-5802" x="77.0" y="2039.0" width="167.0" height="64.0" rx="7" />
|
|
<text class="node-label" x="160.5" y="2069.0">virtio-blk Frontend</text>
|
|
</g>
|
|
<g id="node-virtqueue">
|
|
<rect class="node-shape kind-queue emphasis-primary role-queue" data-evidence="5846-5848" x="77.0" y="2366.0" width="150.0" height="64.0" rx="7" />
|
|
<text class="node-label" x="152.0" y="2396.0">virtqueue</text>
|
|
</g>
|
|
</svg>
|