← Documents Documentation/ABI/stable/sysfs-bus-vmbus GitHub 원문 ↗

Linux 6.18.37 · ABI / stable

Hyper-V VMBus stable sysfs ABI

VM hibernation 지원, VMBus device GUID·relid·NUMA와 channel CPU affinity, interrupt mask, monitor page, ring buffer 상태·counter를 설명합니다.

Source pathDocumentation/ABI/stable/sysfs-bus-vmbus
Source versionLinux v6.18.37
TranslationDUJINLABS 전문 번역 + 해설

요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.

1. 요약·해설

원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.

VMBus와 device identity

sysfs-bus-vmbus:1-57

Host hibernation capability와 device의 primary channel, interface GUID, vendor·device ID, NUMA node를 제공합니다.

Channel 정보와 monitor page

sysfs-bus-vmbus:59-154

Channel relid별 VCPU affinity, 양방향 interrupt mask, latency·pending·monitor bit, ring 가용 byte와 event·interrupt 수를 제공합니다.

Ring buffer pressure counter

sysfs-bus-vmbus:156-187

Inbound full 해제, outbound empty 해제와 outbound full write의 최초·전체 횟수를 기록합니다.

2. 영어 원문 전체

번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.

원문 전체 펼치기
1 What: /sys/bus/vmbus/hibernation
2 Date: Jan 2021
3 KernelVersion: 5.12
4 Contact: Dexuan Cui <[email protected]>
5 Description: Whether the host supports hibernation for the VM.
6 Users: Daemon that sets up swap partition/file for hibernation.
7
8 What: /sys/bus/vmbus/devices/<UUID>/id
9 Date: Jul 2009
10 KernelVersion: 2.6.31
11 Contact: K. Y. Srinivasan <[email protected]>
12 Description: The VMBus child_relid of the device's primary channel
13 Users: tools/hv/lsvmbus
14
15 What: /sys/bus/vmbus/devices/<UUID>/class_id
16 Date: Jul 2009
17 KernelVersion: 2.6.31
18 Contact: K. Y. Srinivasan <[email protected]>
19 Description: The VMBus interface type GUID of the device
20 Users: tools/hv/lsvmbus
21
22 What: /sys/bus/vmbus/devices/<UUID>/device_id
23 Date: Jul 2009
24 KernelVersion: 2.6.31
25 Contact: K. Y. Srinivasan <[email protected]>
26 Description: The VMBus interface instance GUID of the device
27 Users: tools/hv/lsvmbus
28
29 What: /sys/bus/vmbus/devices/<UUID>/channel_vp_mapping
30 Date: Jul 2015
31 KernelVersion: 4.2.0
32 Contact: K. Y. Srinivasan <[email protected]>
33 Description: The mapping of which primary/sub channels are bound to which
34 Virtual Processors.
35 Format: <channel's child_relid:the bound cpu's number>
36 Users: tools/hv/lsvmbus
37
38 What: /sys/bus/vmbus/devices/<UUID>/device
39 Date: Dec. 2015
40 KernelVersion: 4.5
41 Contact: K. Y. Srinivasan <[email protected]>
42 Description: The 16 bit device ID of the device
43 Users: tools/hv/lsvmbus and user level RDMA libraries
44
45 What: /sys/bus/vmbus/devices/<UUID>/vendor
46 Date: Dec. 2015
47 KernelVersion: 4.5
48 Contact: K. Y. Srinivasan <[email protected]>
49 Description: The 16 bit vendor ID of the device
50 Users: tools/hv/lsvmbus and user level RDMA libraries
51
52 What: /sys/bus/vmbus/devices/<UUID>/numa_node
53 Date: Jul 2018
54 KernelVersion: 4.19
55 Contact: Stephen Hemminger <[email protected]>
56 Description: This NUMA node to which the VMBUS device is
57 attached, or -1 if the node is unknown.
58
59 What: /sys/bus/vmbus/devices/<UUID>/channels/<N>
60 Date: September. 2017
61 KernelVersion: 4.14
62 Contact: Stephen Hemminger <[email protected]>
63 Description: Directory for per-channel information
64 NN is the VMBUS relid associated with the channel.
65
66 What: /sys/bus/vmbus/devices/<UUID>/channels/<N>/cpu
67 Date: September. 2017
68 KernelVersion: 4.14
69 Contact: Stephen Hemminger <[email protected]>
70 Description: VCPU (sub)channel is affinitized to
71 Users: tools/hv/lsvmbus and other debugging tools
72
73 What: /sys/bus/vmbus/devices/<UUID>/channels/<N>/in_mask
74 Date: September. 2017
75 KernelVersion: 4.14
76 Contact: Stephen Hemminger <[email protected]>
77 Description: Host to guest channel interrupt mask
78 Users: Debugging tools
79
80 What: /sys/bus/vmbus/devices/<UUID>/channels/<N>/latency
81 Date: September. 2017
82 KernelVersion: 4.14
83 Contact: Stephen Hemminger <[email protected]>
84 Description: Channel signaling latency. This file is available only for
85 performance critical channels (storage, network, etc.) that use
86 the monitor page mechanism.
87 Users: Debugging tools
88
89 What: /sys/bus/vmbus/devices/<UUID>/channels/<N>/out_mask
90 Date: September. 2017
91 KernelVersion: 4.14
92 Contact: Stephen Hemminger <[email protected]>
93 Description: Guest to host channel interrupt mask
94 Users: Debugging tools
95
96 What: /sys/bus/vmbus/devices/<UUID>/channels/<N>/pending
97 Date: September. 2017
98 KernelVersion: 4.14
99 Contact: Stephen Hemminger <[email protected]>
100 Description: Channel interrupt pending state. This file is available only for
101 performance critical channels (storage, network, etc.) that use
102 the monitor page mechanism.
103 Users: Debugging tools
104
105 What: /sys/bus/vmbus/devices/<UUID>/channels/<N>/read_avail
106 Date: September. 2017
107 KernelVersion: 4.14
108 Contact: Stephen Hemminger <[email protected]>
109 Description: Bytes available to read
110 Users: Debugging tools
111
112 What: /sys/bus/vmbus/devices/<UUID>/channels/<N>/write_avail
113 Date: September. 2017
114 KernelVersion: 4.14
115 Contact: Stephen Hemminger <[email protected]>
116 Description: Bytes available to write
117 Users: Debugging tools
118
119 What: /sys/bus/vmbus/devices/<UUID>/channels/<N>/events
120 Date: September. 2017
121 KernelVersion: 4.14
122 Contact: Stephen Hemminger <[email protected]>
123 Description: Number of times we have signaled the host
124 Users: Debugging tools
125
126 What: /sys/bus/vmbus/devices/<UUID>/channels/<N>/interrupts
127 Date: September. 2017
128 KernelVersion: 4.14
129 Contact: Stephen Hemminger <[email protected]>
130 Description: Number of times we have taken an interrupt (incoming)
131 Users: Debugging tools
132
133 What: /sys/bus/vmbus/devices/<UUID>/channels/<N>/subchannel_id
134 Date: January. 2018
135 KernelVersion: 4.16
136 Contact: Stephen Hemminger <[email protected]>
137 Description: Subchannel ID associated with VMBUS channel
138 Users: Debugging tools and userspace drivers
139
140 What: /sys/bus/vmbus/devices/<UUID>/channels/<N>/monitor_id
141 Date: January. 2018
142 KernelVersion: 4.16
143 Contact: Stephen Hemminger <[email protected]>
144 Description: Monitor bit associated with channel. This file is available only
145 for performance critical channels (storage, network, etc.) that
146 use the monitor page mechanism.
147 Users: Debugging tools and userspace drivers
148
149 What: /sys/bus/vmbus/devices/<UUID>/channels/<N>/ring
150 Date: January. 2018
151 KernelVersion: 4.16
152 Contact: Stephen Hemminger <[email protected]>
153 Description: Binary file created by uio_hv_generic for ring buffer
154 Users: Userspace drivers
155
156 What: /sys/bus/vmbus/devices/<UUID>/channels/<N>/intr_in_full
157 Date: February 2019
158 KernelVersion: 5.0
159 Contact: Michael Kelley <[email protected]>
160 Description: Number of guest to host interrupts caused by the inbound ring
161 buffer transitioning from full to not full while a packet is
162 waiting for buffer space to become available
163 Users: Debugging tools
164
165 What: /sys/bus/vmbus/devices/<UUID>/channels/<N>/intr_out_empty
166 Date: February 2019
167 KernelVersion: 5.0
168 Contact: Michael Kelley <[email protected]>
169 Description: Number of guest to host interrupts caused by the outbound ring
170 buffer transitioning from empty to not empty
171 Users: Debugging tools
172
173 What: /sys/bus/vmbus/devices/<UUID>/channels/<N>/out_full_first
174 Date: February 2019
175 KernelVersion: 5.0
176 Contact: Michael Kelley <[email protected]>
177 Description: Number of write operations that were the first to encounter an
178 outbound ring buffer full condition
179 Users: Debugging tools
180
181 What: /sys/bus/vmbus/devices/<UUID>/channels/<N>/out_full_total
182 Date: February 2019
183 KernelVersion: 5.0
184 Contact: Michael Kelley <[email protected]>
185 Description: Total number of write operations that encountered an outbound
186 ring buffer full condition
187 Users: Debugging tools
188

3. 한국어 전문 번역

영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.

VMBus와 device identity

1-57
경로도입·담당의미·사용자
/sys/bus/vmbus/hibernation2021년 1월 · kernel 5.12 · Dexuan CuiHost가 VM hibernation을 지원하는지 나타낸다. Hibernation용 swap partition/file을 설정하는 daemon이 사용한다.
/sys/bus/vmbus/devices/<UUID>/id2009년 7월 · kernel 2.6.31 · K. Y. SrinivasanDevice primary channel의 VMBus child_relid다. tools/hv/lsvmbus가 사용한다.
/sys/bus/vmbus/devices/<UUID>/class_id2009년 7월 · kernel 2.6.31 · K. Y. SrinivasanDevice의 VMBus interface type GUID다. tools/hv/lsvmbus가 사용한다.
/sys/bus/vmbus/devices/<UUID>/device_id2009년 7월 · kernel 2.6.31 · K. Y. SrinivasanDevice의 VMBus interface instance GUID다. tools/hv/lsvmbus가 사용한다.
/sys/bus/vmbus/devices/<UUID>/channel_vp_mapping2015년 7월 · kernel 4.2.0 · K. Y. SrinivasanPrimary·subchannel이 어느 Virtual Processor에 bind됐는지 <channel child_relid:bound CPU number> 형식으로 표시한다. tools/hv/lsvmbus가 사용한다.
/sys/bus/vmbus/devices/<UUID>/device2015년 12월 · kernel 4.5 · K. Y. Srinivasan16-bit device ID다. tools/hv/lsvmbus와 user-level RDMA library가 사용한다.
/sys/bus/vmbus/devices/<UUID>/vendor2015년 12월 · kernel 4.5 · K. Y. Srinivasan16-bit vendor ID다. tools/hv/lsvmbus와 user-level RDMA library가 사용한다.
/sys/bus/vmbus/devices/<UUID>/numa_node2018년 7월 · kernel 4.19 · Stephen HemmingerVMBus device가 연결된 NUMA node이며 알 수 없으면 -1이다.

Channel directory와 기본 상태

59-138

/sys/bus/vmbus/devices/<UUID>/channels/<N>은 channel별 정보 directory다. N은 channel에 연결된 VMBus relid다. 아래에서 별도 표시하지 않은 항목은 2017년 9월 kernel 4.14에 도입됐고 담당자는 Stephen Hemminger다.

attribute의미사용자
cpu(Sub)channel이 affinity를 가진 VCPUtools/hv/lsvmbus와 debugging tool
in_maskHost에서 guest로 향하는 channel interrupt maskdebugging tool
latencyChannel signaling latency. Monitor page mechanism을 쓰는 storage·network 등의 performance-critical channel에만 있다.debugging tool
out_maskGuest에서 host로 향하는 channel interrupt maskdebugging tool
pendingChannel interrupt pending 상태. Monitor page mechanism을 쓰는 performance-critical channel에만 있다.debugging tool
read_avail읽을 수 있는 byte 수debugging tool
write_avail쓸 수 있는 byte 수debugging tool
eventsGuest가 host에 signal한 횟수debugging tool
interruptsGuest가 받은 incoming interrupt 횟수debugging tool
subchannel_idVMBus channel에 연결된 subchannel ID. 2018년 1월 kernel 4.16 도입.debugging tool과 user space driver

Monitor bit와 ring buffer

140-154
경로도입·담당의미·사용자
/sys/bus/vmbus/devices/<UUID>/channels/<N>/monitor_id2018년 1월 · kernel 4.16 · Stephen HemmingerChannel에 연결된 monitor bit다. Monitor page mechanism을 쓰는 performance-critical channel에만 있다. Debugging tool과 user space driver가 사용한다.
/sys/bus/vmbus/devices/<UUID>/channels/<N>/ring2018년 1월 · kernel 4.16 · Stephen Hemmingeruio_hv_generic이 ring buffer용으로 만드는 binary file이다. User space driver가 사용한다.

Ring buffer 전환과 full counter

156-187

아래 debugging counter는 2019년 2월 kernel 5.0에 도입됐고 담당자는 Michael Kelley <[email protected]>다.

attribute의미
intr_in_fullPacket이 buffer space를 기다리는 동안 inbound ring buffer가 full에서 not-full로 바뀌어 발생한 guest-to-host interrupt 수
intr_out_emptyOutbound ring buffer가 empty에서 not-empty로 바뀌어 발생한 guest-to-host interrupt 수
out_full_firstOutbound ring buffer full 상태를 처음 마주친 write operation 수
out_full_totalOutbound ring buffer full 상태를 마주친 전체 write operation 수