요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.
1. 요약·해설
원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.
Channel 정보와 monitor page
sysfs-bus-vmbus:59-154Channel relid별 VCPU affinity, 양방향 interrupt mask, latency·pending·monitor bit, ring 가용 byte와 event·interrupt 수를 제공합니다.
Ring buffer pressure counter
sysfs-bus-vmbus:156-187Inbound full 해제, outbound empty 해제와 outbound full write의 최초·전체 횟수를 기록합니다.
2. 영어 원문 전체
번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.
원문 전체 펼치기
What: /sys/bus/vmbus/hibernation
Date: Jan 2021
KernelVersion: 5.12
Contact: Dexuan Cui <[email protected]>
Description: Whether the host supports hibernation for the VM.
Users: Daemon that sets up swap partition/file for hibernation.
What: /sys/bus/vmbus/devices/<UUID>/id
Date: Jul 2009
KernelVersion: 2.6.31
Contact: K. Y. Srinivasan <[email protected]>
Description: The VMBus child_relid of the device's primary channel
Users: tools/hv/lsvmbus
What: /sys/bus/vmbus/devices/<UUID>/class_id
Date: Jul 2009
KernelVersion: 2.6.31
Contact: K. Y. Srinivasan <[email protected]>
Description: The VMBus interface type GUID of the device
Users: tools/hv/lsvmbus
What: /sys/bus/vmbus/devices/<UUID>/device_id
Date: Jul 2009
KernelVersion: 2.6.31
Contact: K. Y. Srinivasan <[email protected]>
Description: The VMBus interface instance GUID of the device
Users: tools/hv/lsvmbus
What: /sys/bus/vmbus/devices/<UUID>/channel_vp_mapping
Date: Jul 2015
KernelVersion: 4.2.0
Contact: K. Y. Srinivasan <[email protected]>
Description: The mapping of which primary/sub channels are bound to which
Virtual Processors.
Format: <channel's child_relid:the bound cpu's number>
Users: tools/hv/lsvmbus
What: /sys/bus/vmbus/devices/<UUID>/device
Date: Dec. 2015
KernelVersion: 4.5
Contact: K. Y. Srinivasan <[email protected]>
Description: The 16 bit device ID of the device
Users: tools/hv/lsvmbus and user level RDMA libraries
What: /sys/bus/vmbus/devices/<UUID>/vendor
Date: Dec. 2015
KernelVersion: 4.5
Contact: K. Y. Srinivasan <[email protected]>
Description: The 16 bit vendor ID of the device
Users: tools/hv/lsvmbus and user level RDMA libraries
What: /sys/bus/vmbus/devices/<UUID>/numa_node
Date: Jul 2018
KernelVersion: 4.19
Contact: Stephen Hemminger <[email protected]>
Description: This NUMA node to which the VMBUS device is
attached, or -1 if the node is unknown.
What: /sys/bus/vmbus/devices/<UUID>/channels/<N>
Date: September. 2017
KernelVersion: 4.14
Contact: Stephen Hemminger <[email protected]>
Description: Directory for per-channel information
NN is the VMBUS relid associated with the channel.
What: /sys/bus/vmbus/devices/<UUID>/channels/<N>/cpu
Date: September. 2017
KernelVersion: 4.14
Contact: Stephen Hemminger <[email protected]>
Description: VCPU (sub)channel is affinitized to
Users: tools/hv/lsvmbus and other debugging tools
What: /sys/bus/vmbus/devices/<UUID>/channels/<N>/in_mask
Date: September. 2017
KernelVersion: 4.14
Contact: Stephen Hemminger <[email protected]>
Description: Host to guest channel interrupt mask
Users: Debugging tools
What: /sys/bus/vmbus/devices/<UUID>/channels/<N>/latency
Date: September. 2017
KernelVersion: 4.14
Contact: Stephen Hemminger <[email protected]>
Description: Channel signaling latency. This file is available only for
performance critical channels (storage, network, etc.) that use
the monitor page mechanism.
Users: Debugging tools
What: /sys/bus/vmbus/devices/<UUID>/channels/<N>/out_mask
Date: September. 2017
KernelVersion: 4.14
Contact: Stephen Hemminger <[email protected]>
Description: Guest to host channel interrupt mask
Users: Debugging tools
What: /sys/bus/vmbus/devices/<UUID>/channels/<N>/pending
Date: September. 2017
KernelVersion: 4.14
Contact: Stephen Hemminger <[email protected]>
Description: Channel interrupt pending state. This file is available only for
performance critical channels (storage, network, etc.) that use
the monitor page mechanism.
Users: Debugging tools
What: /sys/bus/vmbus/devices/<UUID>/channels/<N>/read_avail
Date: September. 2017
KernelVersion: 4.14
Contact: Stephen Hemminger <[email protected]>
Description: Bytes available to read
Users: Debugging tools
What: /sys/bus/vmbus/devices/<UUID>/channels/<N>/write_avail
Date: September. 2017
KernelVersion: 4.14
Contact: Stephen Hemminger <[email protected]>
Description: Bytes available to write
Users: Debugging tools
What: /sys/bus/vmbus/devices/<UUID>/channels/<N>/events
Date: September. 2017
KernelVersion: 4.14
Contact: Stephen Hemminger <[email protected]>
Description: Number of times we have signaled the host
Users: Debugging tools
What: /sys/bus/vmbus/devices/<UUID>/channels/<N>/interrupts
Date: September. 2017
KernelVersion: 4.14
Contact: Stephen Hemminger <[email protected]>
Description: Number of times we have taken an interrupt (incoming)
Users: Debugging tools
What: /sys/bus/vmbus/devices/<UUID>/channels/<N>/subchannel_id
Date: January. 2018
KernelVersion: 4.16
Contact: Stephen Hemminger <[email protected]>
Description: Subchannel ID associated with VMBUS channel
Users: Debugging tools and userspace drivers
What: /sys/bus/vmbus/devices/<UUID>/channels/<N>/monitor_id
Date: January. 2018
KernelVersion: 4.16
Contact: Stephen Hemminger <[email protected]>
Description: Monitor bit associated with channel. This file is available only
for performance critical channels (storage, network, etc.) that
use the monitor page mechanism.
Users: Debugging tools and userspace drivers
What: /sys/bus/vmbus/devices/<UUID>/channels/<N>/ring
Date: January. 2018
KernelVersion: 4.16
Contact: Stephen Hemminger <[email protected]>
Description: Binary file created by uio_hv_generic for ring buffer
Users: Userspace drivers
What: /sys/bus/vmbus/devices/<UUID>/channels/<N>/intr_in_full
Date: February 2019
KernelVersion: 5.0
Contact: Michael Kelley <[email protected]>
Description: Number of guest to host interrupts caused by the inbound ring
buffer transitioning from full to not full while a packet is
waiting for buffer space to become available
Users: Debugging tools
What: /sys/bus/vmbus/devices/<UUID>/channels/<N>/intr_out_empty
Date: February 2019
KernelVersion: 5.0
Contact: Michael Kelley <[email protected]>
Description: Number of guest to host interrupts caused by the outbound ring
buffer transitioning from empty to not empty
Users: Debugging tools
What: /sys/bus/vmbus/devices/<UUID>/channels/<N>/out_full_first
Date: February 2019
KernelVersion: 5.0
Contact: Michael Kelley <[email protected]>
Description: Number of write operations that were the first to encounter an
outbound ring buffer full condition
Users: Debugging tools
What: /sys/bus/vmbus/devices/<UUID>/channels/<N>/out_full_total
Date: February 2019
KernelVersion: 5.0
Contact: Michael Kelley <[email protected]>
Description: Total number of write operations that encountered an outbound
ring buffer full condition
Users: Debugging tools
3. 한국어 전문 번역
영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.
VMBus와 device identity
1-57| 경로 | 도입·담당 | 의미·사용자 |
|---|---|---|
| /sys/bus/vmbus/hibernation | 2021년 1월 · kernel 5.12 · Dexuan Cui | Host가 VM hibernation을 지원하는지 나타낸다. Hibernation용 swap partition/file을 설정하는 daemon이 사용한다. |
| /sys/bus/vmbus/devices/<UUID>/id | 2009년 7월 · kernel 2.6.31 · K. Y. Srinivasan | Device primary channel의 VMBus child_relid다. tools/hv/lsvmbus가 사용한다. |
| /sys/bus/vmbus/devices/<UUID>/class_id | 2009년 7월 · kernel 2.6.31 · K. Y. Srinivasan | Device의 VMBus interface type GUID다. tools/hv/lsvmbus가 사용한다. |
| /sys/bus/vmbus/devices/<UUID>/device_id | 2009년 7월 · kernel 2.6.31 · K. Y. Srinivasan | Device의 VMBus interface instance GUID다. tools/hv/lsvmbus가 사용한다. |
| /sys/bus/vmbus/devices/<UUID>/channel_vp_mapping | 2015년 7월 · kernel 4.2.0 · K. Y. Srinivasan | Primary·subchannel이 어느 Virtual Processor에 bind됐는지 <channel child_relid:bound CPU number> 형식으로 표시한다. tools/hv/lsvmbus가 사용한다. |
| /sys/bus/vmbus/devices/<UUID>/device | 2015년 12월 · kernel 4.5 · K. Y. Srinivasan | 16-bit device ID다. tools/hv/lsvmbus와 user-level RDMA library가 사용한다. |
| /sys/bus/vmbus/devices/<UUID>/vendor | 2015년 12월 · kernel 4.5 · K. Y. Srinivasan | 16-bit vendor ID다. tools/hv/lsvmbus와 user-level RDMA library가 사용한다. |
| /sys/bus/vmbus/devices/<UUID>/numa_node | 2018년 7월 · kernel 4.19 · Stephen Hemminger | VMBus 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를 가진 VCPU | tools/hv/lsvmbus와 debugging tool |
| in_mask | Host에서 guest로 향하는 channel interrupt mask | debugging tool |
| latency | Channel signaling latency. Monitor page mechanism을 쓰는 storage·network 등의 performance-critical channel에만 있다. | debugging tool |
| out_mask | Guest에서 host로 향하는 channel interrupt mask | debugging tool |
| pending | Channel interrupt pending 상태. Monitor page mechanism을 쓰는 performance-critical channel에만 있다. | debugging tool |
| read_avail | 읽을 수 있는 byte 수 | debugging tool |
| write_avail | 쓸 수 있는 byte 수 | debugging tool |
| events | Guest가 host에 signal한 횟수 | debugging tool |
| interrupts | Guest가 받은 incoming interrupt 횟수 | debugging tool |
| subchannel_id | VMBus 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_id | 2018년 1월 · kernel 4.16 · Stephen Hemminger | Channel에 연결된 monitor bit다. Monitor page mechanism을 쓰는 performance-critical channel에만 있다. Debugging tool과 user space driver가 사용한다. |
| /sys/bus/vmbus/devices/<UUID>/channels/<N>/ring | 2018년 1월 · kernel 4.16 · Stephen Hemminger | uio_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_full | Packet이 buffer space를 기다리는 동안 inbound ring buffer가 full에서 not-full로 바뀌어 발생한 guest-to-host interrupt 수 |
| intr_out_empty | Outbound ring buffer가 empty에서 not-empty로 바뀌어 발생한 guest-to-host interrupt 수 |
| out_full_first | Outbound ring buffer full 상태를 처음 마주친 write operation 수 |
| out_full_total | Outbound ring buffer full 상태를 마주친 전체 write operation 수 |
VMBus와 device identity
sysfs-bus-vmbus:1-57Host hibernation capability와 device의 primary channel, interface GUID, vendor·device ID, NUMA node를 제공합니다.