KR102240996B1 - Methods and apparatuses for processing input/output completion in virtualization system - Google Patents

Methods and apparatuses for processing input/output completion in virtualization system Download PDF

Info

Publication number
KR102240996B1
KR102240996B1 KR1020190127294A KR20190127294A KR102240996B1 KR 102240996 B1 KR102240996 B1 KR 102240996B1 KR 1020190127294 A KR1020190127294 A KR 1020190127294A KR 20190127294 A KR20190127294 A KR 20190127294A KR 102240996 B1 KR102240996 B1 KR 102240996B1
Authority
KR
South Korea
Prior art keywords
input
thread
request
output request
output
Prior art date
Application number
KR1020190127294A
Other languages
Korean (ko)
Inventor
엄영익
이민호
송용주
이태형
이혜지
Original Assignee
성균관대학교산학협력단
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 성균관대학교산학협력단 filed Critical 성균관대학교산학협력단
Priority to KR1020190127294A priority Critical patent/KR102240996B1/en
Application granted granted Critical
Publication of KR102240996B1 publication Critical patent/KR102240996B1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • G06F2009/45579I/O management, e.g. providing access to device drivers or storage

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)

Abstract

The present invention relates to a method and an apparatus for processing input/output completion in a virtualization system. According to one embodiment of the present invention, the method for processing input/output completion in the virtualization system comprises the steps of: transmitting, to a second thread, size information of an input/output request inputted to a first thread in a virtualization system; transmitting the inputted input/output request to a host kernel; setting the second thread in an idle state in accordance with an idle time preset for each size information of the input/output request; and confirming whether or not the input/output request is completed by operating the second thread in a polling method when the set idle time is expired. Therefore, fast response time of high-performance storage devices is utilized while maintaining low CPU utilization.

Description

가상화 시스템에서의 입출력 완료 처리 방법 및 장치{METHODS AND APPARATUSES FOR PROCESSING INPUT/OUTPUT COMPLETION IN VIRTUALIZATION SYSTEM}I/O completion processing method and device in the virtualization system {METHODS AND APPARATUSES FOR PROCESSING INPUT/OUTPUT COMPLETION IN VIRTUALIZATION SYSTEM}

본 발명은 가상화 시스템에서의 입출력 완료 처리 방법 및 장치에 관한 것이다.The present invention relates to a method and apparatus for processing input/output completion in a virtualization system.

리눅스 커널은 폴링(Polling) 방식 또는 인터럽트(Interrupt) 방식으로 입출력(I/O, Input/Output) 요청을 완료 처리한다. 폴링 방식은 주기적으로 저장장치의 I/O 완료를 확인하기 때문에 I/O 완료를 빠르게 확인할 수 있지만, CPU 사용량이 많다. 반면, 인터럽트 방식은 저장장치가 해당 I/O 요청을 전송한 프로세스에 인터럽트를 보낼 때까지 해당 프로세스가 휴면 상태로 전환된다. 따라서 CPU 사용량은 적지만, 추가적인 스케줄링 오버헤드로 인해 I/O 완료 처리가 지연된다. 리눅스 커널은 4.10 버전부터 폴링 방식과 인터럽트 방식의 장점을 모두 활용하기 위해 하이브리드 폴링 방식을 제공한다. 하이브리드 폴링 방식은 I/O 요청을 전송한 프로세스를 휴면 상태로 전환하고 특정 시간이 지난 뒤 해당 프로세스를 스케줄링하여 주기적으로 I/O 완료를 확인한다. 따라서 폴링 방식대비 적은 양의 CPU를 사용하면서 폴링 방식과 비슷한 수준의 응답 시간을 보인다. 하지만, preadv2, pwritev2 함수로 수행된 I/O 요청 중 RWF_HIPRI 플래그가 설정된 경우에만 하이브리드 폴링 방식으로 동작하기 때문에 일반 I/O 요청에 대해서는 동작하지 않는다.The Linux kernel completes and processes I/O (Input/Output) requests in a polling method or an interrupt method. Because the polling method periodically checks the completion of I/O of the storage device, you can quickly check the completion of I/O, but it consumes a lot of CPU. On the other hand, in the interrupt method, the process is converted to the dormant state until the storage device sends an interrupt to the process that sent the I/O request. Therefore, the CPU usage is small, but I/O completion processing is delayed due to additional scheduling overhead. Since version 4.10, the Linux kernel provides a hybrid polling method to take advantage of both the polling method and the interrupt method. In the hybrid polling method, the process that sent the I/O request is put into a dormant state, and after a certain period of time, the process is scheduled to periodically check for I/O completion. Therefore, it uses a smaller amount of CPU than the polling method and shows a similar level of response time as the polling method. However, since the hybrid polling method is operated only when the RWF_HIPRI flag is set among I/O requests performed by the preadv2 and pwritev2 functions, it does not operate for general I/O requests.

한편, 가상화 환경에서는 게스트와 호스트 사이의 시맨틱 갭(Sematic Gap)으로 인해 가상머신의 I/O 요청의 정보가 호스트로 전달되지 않는다. 따라서 가상머신은 호스트 커널에서 제공하는 I/O 완료 처리 방식을 활용할 수 없기 때문에 자체적인 I/O 완료 처리 방식을 이용해 호스트 커널의 I/O 완료를 확인한다. QEMU-KVM에서는 2.9 버전부터 고성능 저장장치의 빠른 응답 시간을 활용하기 위해 적응형 폴링 방식을 제공한다. 적응형 폴링 방식은 현재 I/O 요청의 응답 시간을 기반으로 다음 I/O 요청의 응답 시간을 예상하여 예상시간에 맞게 폴링 방식과 인터럽트 방식을 적절히 적용하는 방식이다. 하지만 이는 64KB 이하의 I/O 요청에 대해서는 폴링 방식으로 동작하기 때문에 거의 100%의 CPU를 사용하여 CPU 소모량이 매우 높다. 따라서 가상화 환경에서 빠른 응답 시간을 유지하면서 낮은 CPU 소모량을 가지는 새로운 I/O 완료 처리 방식이 필요하다.Meanwhile, in a virtualized environment, information on I/O requests from a virtual machine is not transmitted to the host due to a semantic gap between the guest and the host. Therefore, since the virtual machine cannot use the I/O completion processing method provided by the host kernel, it uses its own I/O completion processing method to check the I/O completion of the host kernel. Since version 2.9, QEMU-KVM provides an adaptive polling method to take advantage of the fast response time of high-performance storage devices. The adaptive polling method predicts the response time of the next I/O request based on the response time of the current I/O request, and appropriately applies the polling method and the interrupt method according to the expected time. However, since it operates in a polling method for I/O requests of less than 64KB, it uses almost 100% of the CPU, and the CPU consumption is very high. Therefore, there is a need for a new I/O completion processing method with low CPU consumption while maintaining fast response time in a virtualized environment.

본 발명의 실시예들은 CPU 사용량을 고려한 고성능 저장 장치 기반의 가상화 시스템에서 고성능 저장 장치의 빠른 응답 시간을 활용하면서 낮은 CPU 사용률을 유지할 수 있는, 가상화 시스템에서의 입출력 완료 처리 방법 및 장치를 제공하고자 한다.Embodiments of the present invention are to provide a method and apparatus for processing input/output completion in a virtualization system capable of maintaining a low CPU usage rate while utilizing a fast response time of a high-performance storage device in a virtualization system based on a high-performance storage device considering CPU usage. .

본 발명의 실시예들은 가상화 시스템에서 고성능 저장 장치의 빠른 응답 시간을 활용하기 위해 하이퍼바이저 계층에 새로운 입출력(I/O) 완료 처리 방법을 도입하여 사용자에게 빠른 응답 시간을 제공하고 효율적으로 CPU 자원을 활용할 수 있는, 가상화 시스템에서의 입출력 완료 처리 방법 및 장치를 제공하고자 한다.Embodiments of the present invention introduce a new input/output (I/O) completion processing method to the hypervisor layer in order to utilize the fast response time of a high-performance storage device in a virtualization system to provide a fast response time to users and efficiently save CPU resources. It is intended to provide a method and apparatus for processing input/output completion in a virtualization system that can be utilized.

본 발명의 실시예들은 HyPIV(Hybrid Polling and Interrupt in Virtualized Systems)로 지칭될 수 있으며, I/O 요청의 크기에 따라 적절한 I/O 완료 처리 방식을 적용하여 CPU 사용량과 응답 시간 사이의 균형을 유지할 수 있는, 가상화 시스템에서의 입출력 완료 처리 방법 및 장치를 제공하고자 한다.Embodiments of the present invention may be referred to as HyPIV (Hybrid Polling and Interrupt in Virtualized Systems), and maintain a balance between CPU usage and response time by applying an appropriate I/O completion processing method according to the size of the I/O request. It is intended to provide a method and apparatus for processing input/output completion in a virtualization system.

더블어, 높은 응답 시간을 가지지만 CPU 사용률이 높은 종래의 폴링 방식이나 낮은 CPU 사용률을 가지지만 응답 시간이 느린 인터럽트 방식과 같은 종래의 I/O 완료 처리 방식들과는 달리, 본 발명의 실시예들은 두 가지 방식을 조건에 맞게 사용하여 두 방식의 장점들을 모으고 오버헤드를 경감시킬 수 있는, 가상화 시스템에서의 입출력 완료 처리 방법 및 장치를 제공하고자 한다.In addition, unlike the conventional polling method that has a high response time but has a high CPU usage rate, or the interrupt method that has a low CPU use rate but has a slow response time, the embodiments of the present invention have two embodiments. It is intended to provide a method and apparatus for processing input/output completion in a virtualization system that can collect the advantages of the two methods and reduce the overhead by using the method according to the conditions.

본 발명의 일 실시예에 따르면, 가상화 시스템에서의 입출력 완료 처리 방법에 있어서, 가상화 시스템에서 제1 쓰레드에 입력된 입출력 요청의 크기 정보를 제2 쓰레드에 전송하는 단계; 상기 입력된 입출력 요청을 호스트 커널로 전송하는 단계; 상기 입출력 요청의 크기 정보별로 미리 설정된 휴면 시간에 따라 상기 제2 쓰레드를 휴면 상태로 설정하는 단계; 및 상기 설정된 휴면 시간이 만료되면 상기 제2 쓰레드를 폴링 방식으로 동작시켜 상기 입출력 요청의 완료 여부를 확인하는 단계를 포함하는, 가상화 시스템에서의 입출력 완료 처리 방법이 제공될 수 있다.According to an embodiment of the present invention, there is provided a method of processing input/output completion in a virtualization system, the method comprising: transmitting, in the virtualization system, size information of an input/output request input to a first thread to a second thread; Transmitting the input input/output request to a host kernel; Setting the second thread to a dormant state according to a preset dormant time for each size information of the input/output request; And checking whether the input/output request is completed by operating the second thread in a polling manner when the set dormancy time expires. A method of processing input/output completion in a virtualization system may be provided.

상기 방법은, 상기 입출력 요청이 완료된 것으로 확인되면, 상기 제2 쓰레드에 대한 폴링 방식 동작을 중단하는 단계를 더 포함할 수 있다.The method may further include stopping the polling method operation for the second thread when it is confirmed that the input/output request has been completed.

상기 제2 쓰레드를 휴면 상태로 설정하는 단계는, 상기 입출력 요청의 크기가 기설정된 요청 크기값 이하인 경우에 미리 설정된 휴면 시간에 따라 상기 제2 쓰레드를 휴면 상태로 설정할 수 있다.In the setting of the second thread to the dormant state, when the size of the input/output request is less than or equal to a preset request size value, the second thread may be set to the dormant state according to a preset dormancy time.

상기 방법은, 상기 입출력 요청의 크기가 기설정된 요청 크기값을 초과하면 상기 제2 쓰레드를 인터럽트 방식으로 동작시키는 단계를 더 포함할 수 있다.The method may further include operating the second thread in an interrupt manner when the size of the input/output request exceeds a preset request size value.

상기 입출력 요청의 완료 여부를 확인하는 단계는, 상기 호스트 커널로부터의 완료 정보가 업데이트되는 입출력 링버퍼(I/O Ring Buffer)를 주기적으로 확인하여 상기 입출력 요청의 완료 여부를 확인할 수 있다.Checking whether the input/output request has been completed may include periodically checking an I/O ring buffer in which completion information from the host kernel is updated to check whether the input/output request has been completed.

상기 호스트 커널과 연결된 저장 장치에서 상기 입출력 요청의 처리가 완료되면, 상기 호스트 커널을 통해 상기 입출력 링버퍼에 상기 입출력 요청의 완료 정보를 업데이트할 수 있다.When processing of the input/output request is completed in the storage device connected to the host kernel, completion information of the input/output request may be updated in the input/output ring buffer through the host kernel.

상기 입출력 요청은, 기설정된 일반 동기 입출력 요청 또는 비동기 입출력 요청일 수 있다.The input/output request may be a preset general synchronous input/output request or an asynchronous input/output request.

상기 제1 쓰레드 및 상기 제2 쓰레드는 상기 가상화 시스템에서 하이퍼바이저 계층에서 동작하고, 상기 호스트 커널은 상기 가상화 시스템에서 호스트 계층에서 동작할 수 있다.The first thread and the second thread may operate in a hypervisor layer in the virtualization system, and the host kernel may operate in a host layer in the virtualization system.

상기 제1 쓰레드 및 상기 제2 쓰레드는 상기 가상화 시스템에서 동작하는 QEMU-KVM(Quick Emulator Kernel-Based Virtual Machine) 하이퍼바이저에 의해 동작할 수 있다.The first thread and the second thread may be operated by a QEMU-KVM (Quick Emulator Kernel-Based Virtual Machine) hypervisor operating in the virtualization system.

한편, 본 발명의 다른 실시예에 따르면, 입출력 요청을 처리하는 저장 장치; 적어도 하나의 프로그램을 저장하는 메모리; 및 상기 저장 장치 및 상기 메모리와 연결된 프로세서를 포함하고, 상기 프로세서는, 상기 적어도 하나의 프로그램을 실행함으로써, 가상화 시스템에서 제1 쓰레드에 입력된 입출력 요청의 크기 정보를 제2 쓰레드에 전송하고, 호스트 커널과 연결된 상기 저장 장치에서 상기 입력된 입출력 요청이 처리되도록, 상기 입력된 입출력 요청을 상기 호스트 커널로 전송하고, 상기 입출력 요청의 크기 정보별로 미리 설정된 휴면 시간에 따라 상기 제2 쓰레드를 휴면 상태로 설정하고, 상기 설정된 휴면 시간이 만료되면 상기 제2 쓰레드를 폴링 방식으로 동작시켜 상기 입출력 요청의 완료 여부를 확인하는, 가상화 시스템에서의 입출력 완료 처리 장치가 제공될 수 있다.Meanwhile, according to another embodiment of the present invention, there is provided a storage device for processing an input/output request; A memory for storing at least one program; And a processor connected to the storage device and the memory, wherein the processor executes the at least one program to transmit size information of the input/output request input to the first thread in the virtualization system to the second thread, and the host To process the input I/O request in the storage device connected to the kernel, the input I/O request is transmitted to the host kernel, and the second thread is put in a dormant state according to a preset sleep time for each size information of the input/output request. A device for processing input/output completion in a virtualization system may be provided for setting and checking whether the input/output request is completed by operating the second thread in a polling method when the set dormancy time expires.

상기 프로세서는, 상기 입출력 요청이 완료된 것으로 확인되면, 상기 제2 쓰레드에 대한 폴링 방식 동작을 중단할 수 있다.When it is determined that the input/output request has been completed, the processor may stop the polling method operation for the second thread.

상기 프로세서는, 상기 입출력 요청의 크기가 기설정된 요청 크기값 이하인 경우에 미리 설정된 휴면 시간에 따라 상기 제2 쓰레드를 휴면 상태로 설정할 수 있다.When the size of the input/output request is less than or equal to a preset request size value, the processor may set the second thread to a dormant state according to a preset dormancy time.

상기 프로세서는, 상기 입출력 요청의 크기가 기설정된 요청 크기값을 초과하면 상기 제2 쓰레드를 인터럽트 방식으로 동작시킬 수 있다.When the size of the input/output request exceeds a preset request size value, the processor may operate the second thread in an interrupt manner.

상기 프로세서는, 상기 호스트 커널로부터의 완료 정보가 업데이트되는 입출력 링버퍼(I/O Ring Buffer)를 주기적으로 확인하여 상기 입출력 요청의 완료 여부를 확인할 수 있다.The processor may periodically check an I/O ring buffer in which completion information from the host kernel is updated to determine whether the input/output request has been completed.

상기 프로세서는, 상기 호스트 커널과 연결된 저장 장치에서 상기 입출력 요청의 처리가 완료되면, 상기 호스트 커널을 통해 상기 입출력 링버퍼에 상기 입출력 요청의 완료 정보를 업데이트할 수 있다.When the processing of the input/output request is completed in the storage device connected to the host kernel, the processor may update completion information of the input/output request in the input/output ring buffer through the host kernel.

상기 입출력 요청은, 기설정된 일반 동기 입출력 요청 또는 비동기 입출력 요청일 수 있다.The input/output request may be a preset general synchronous input/output request or an asynchronous input/output request.

상기 제1 쓰레드 및 상기 제2 쓰레드는 상기 가상화 시스템의 하이퍼바이저 계층에서 동작하고, 상기 호스트 커널은 상기 가상화 시스템의 호스트 계층에서 동작할 수 있다.The first thread and the second thread may operate in a hypervisor layer of the virtualization system, and the host kernel may operate in a host layer of the virtualization system.

상기 제1 쓰레드 및 상기 제2 쓰레드는 상기 가상화 시스템에서 동작하는 QEMU-KVM(Quick Emulator Kernel-Based Virtual Machine) 하이퍼바이저에 의해 동작할 수 있다.The first thread and the second thread may be operated by a QEMU-KVM (Quick Emulator Kernel-Based Virtual Machine) hypervisor operating in the virtualization system.

한편, 본 발명의 다른 실시예에 따르면, 호스트 운영체제(Host operating system)에 의해 운영되고 호스트 커널을 포함하는 호스트; 상기 호스트 커널을 통해 요청된 입출력 요청을 처리하는 저장 장치; 상기 호스트 운영체제 위에 동작하는 게스트 운영체제(Guest operating system)에 의해 운영되는 커널 기반 가상 머신; 및 상기 가상 머신과 상기 호스트 사이에 위치하고 상기 커널 기반 가상 머신을 모니터링하는 하이퍼바이저(hypervisor)를 포함하고, 상기 하이퍼바이저는 가상화 시스템에서 제1 쓰레드에 입력된 입출력 요청의 크기 정보를 제2 쓰레드에 전송하고, 상기 입력된 입출력 요청을 호스트 커널로 전송하고, 상기 입출력 요청의 크기 정보별로 미리 설정된 휴면 시간에 따라 상기 제2 쓰레드를 휴면 상태로 설정하고, 상기 설정된 휴면 시간이 만료되면 상기 제2 쓰레드를 폴링 방식으로 동작시켜 상기 입출력 요청의 완료 여부를 확인하는, 입출력 완료 처리를 위한 가상화 시스템이 제공될 수 있다.On the other hand, according to another embodiment of the present invention, a host operating by a host operating system and including a host kernel; A storage device that processes an input/output request requested through the host kernel; A kernel-based virtual machine operated by a guest operating system running on the host operating system; And a hypervisor located between the virtual machine and the host and monitoring the kernel-based virtual machine, wherein the hypervisor transmits size information of the input/output request input to the first thread in the virtualization system to the second thread. Transmits, transmits the input input/output request to the host kernel, sets the second thread to a sleep state according to a preset sleep time for each size information of the input/output request, and when the set sleep time expires, the second thread A virtualization system for processing input/output completion may be provided to check whether the input/output request is completed by operating in a polling method.

한편, 본 발명의 다른 실시예에 따르면, 프로세서에 의해 실행 가능한 적어도 하나의 프로그램을 포함하는 비일시적 컴퓨터 판독가능 저장 매체로서, 상기 적어도 하나의 프로그램은 상기 프로세서에 의해 실행될 때, 상기 프로세서로 하여금: 가상화 시스템에서 제1 쓰레드에 입력된 입출력 요청의 크기 정보를 제2 쓰레드에 전송하고, 상기 입력된 입출력 요청을 호스트 커널로 전송하고, 상기 입출력 요청의 크기 정보별로 미리 설정된 휴면 시간에 따라 상기 제2 쓰레드를 휴면 상태로 설정하고, 상기 설정된 휴면 시간이 만료되면 상기 제2 쓰레드를 폴링 방식으로 동작시켜 상기 입출력 요청의 완료 여부를 확인하게 하는 명령어들을 포함하는, 비 일시적 컴퓨터 판독 가능한 저장 매체가 제공될 수 있다.Meanwhile, according to another embodiment of the present invention, as a non-transitory computer-readable storage medium including at least one program executable by a processor, when the at least one program is executed by the processor, the processor causes: In the virtualization system, the size information of the input/output request input to the first thread is transmitted to the second thread, the input input/output request is transmitted to the host kernel, and the second idle time is set according to the size information of the input/output request. A non-transitory computer-readable storage medium including instructions for setting a thread to a dormant state and checking whether the input/output request is completed by operating the second thread in a polling method when the set dormant time expires is provided. I can.

본 발명의 실시예들은 CPU 사용량을 고려한 고성능 저장 장치 기반의 가상화 시스템에서 고성능 저장 장치의 빠른 응답 시간을 활용하면서 낮은 CPU 사용률을 유지할 수 있다.Embodiments of the present invention can maintain a low CPU usage rate while utilizing a fast response time of a high-performance storage device in a virtualization system based on a high-performance storage device in consideration of CPU usage.

본 발명의 실시예들은 가상화 시스템에서 고성능 저장 장치의 빠른 응답 시간을 활용하기 위해 하이퍼바이저 계층에 새로운 입출력(I/O) 완료 처리 방법을 도입하여 사용자에게 빠른 응답 시간을 제공하고 효율적으로 CPU 자원을 활용할 수 있다.Embodiments of the present invention introduce a new input/output (I/O) completion processing method to the hypervisor layer in order to utilize the fast response time of a high-performance storage device in a virtualization system to provide a fast response time to users and efficiently save CPU resources. Can be utilized.

본 발명의 실시예들은 HyPIV(Hybrid Polling and Interrupt in Virtualized Systems)로 지칭될 수 있으며, I/O 요청의 크기에 따라 적절한 I/O 완료 처리 방식을 적용하여 CPU 사용량과 응답 시간 사이의 균형을 유지할 수 있다.Embodiments of the present invention may be referred to as HyPIV (Hybrid Polling and Interrupt in Virtualized Systems), and maintain a balance between CPU usage and response time by applying an appropriate I/O completion processing method according to the size of the I/O request. I can.

더블어, 높은 응답 시간을 가지지만 CPU 사용률이 높은 종래의 폴링 방식이나 낮은 CPU 사용률을 가지지만 응답 시간이 느린 인터럽트 방식과 같은 종래의 I/O 완료 처리 방식들과는 달리, 본 발명의 실시예들은 두 가지 방식을 조건에 맞게 사용하여 두 방식의 장점들을 모으고 오버헤드를 경감시킬 수 있다.In addition, unlike the conventional polling method that has a high response time but has a high CPU usage rate, or the interrupt method that has a low CPU use rate but has a slow response time, the embodiments of the present invention have two embodiments. By using the method according to the conditions, the advantages of both methods can be gathered and the overhead can be reduced.

본 발명의 실시예들은 종래의 적응형 폴링 방식보다 평균 4.3% 정도 지연되었지만, CPU 사용량을 최대 38.7% 감소시킬 수 있다. 따라서 응답 시간의 감소 대비 높은 CPU 사용량을 보이기 때문에, 본 발명의 실시예들은 종래의 적응형 폴링 방식보다 효율적임을 확인할 수 있다. 또한, 본 발명의 실시예들은 4KB와 64KB의 두 가지 크기의 I/O 요청을 99:1에서 1:99까지 다른 비율로 실험을 했을 때에도 응답 시간이 평균 5.9% 지연되었지만 CPU 사용량을 평균 28.9% 감소시킬 수 있다. 즉, 구현 범위 중 가장 작은 크기의 I/O 요청과 가장 큰 크기의 I/O 요청을 혼합해서 수행하였음에도, 본 발명의 실시예들은 종래의 적응형 폴링 방식 대비 높은 효율성을 보여준다.Embodiments of the present invention are delayed by an average of 4.3% compared to the conventional adaptive polling method, but can reduce CPU usage by up to 38.7%. Accordingly, it can be seen that the embodiments of the present invention are more efficient than the conventional adaptive polling method, because the CPU usage is high compared to the reduction of the response time. In addition, in the embodiments of the present invention, the response time was delayed by an average of 5.9% even when the two sizes of I/O requests of 4 KB and 64 KB were tested at different ratios from 99:1 to 1:99, but the CPU usage was reduced by an average of 28.9%. Can be reduced. That is, even though the I/O request of the smallest size and the I/O request of the largest size are mixed and executed in the implementation range, the embodiments of the present invention show higher efficiency compared to the conventional adaptive polling method.

도 1은 본 발명의 일 실시예에 따른 가상화 시스템의 구성을 나타낸 구성도이다.
도 2는 본 발명의 일 실시예에 따른 가상화 시스템에서 입출력 요청에 대한 완료 처리 동작을 나타낸 도면이다.
도 3은 본 발명의 일 실시예에 따른 가상화 시스템에서의 입출력 완료 처리 장치의 구성을 설명하기 위한 구성도이다.
도 4 및 도 5는 본 발명의 일 실시예에 따른 가상화 시스템에서 입출력 완료 처리 방법을 나타낸 흐름도이다.
도 6 내지 도 9는 본 발명의 일 실시예와 종래 기술에 따른 응답 시간 및 CPU 사용량의 측정 결과를 나타낸 도면이다.
1 is a block diagram showing the configuration of a virtualization system according to an embodiment of the present invention.
2 is a diagram illustrating an operation of processing completion of an input/output request in a virtualization system according to an embodiment of the present invention.
3 is a block diagram illustrating a configuration of an input/output completion processing apparatus in a virtualization system according to an embodiment of the present invention.
4 and 5 are flowcharts illustrating a method of processing input/output completion in a virtualization system according to an embodiment of the present invention.
6 to 9 are diagrams showing measurement results of response time and CPU usage according to an embodiment of the present invention and the prior art.

본 발명은 다양한 변경을 가할 수 있고 여러 가지 실시예를 가질 수 있는바, 특정 실시예들을 도면에 예시하고 상세하게 설명하고자 한다.Since the present invention can make various changes and have various embodiments, specific embodiments will be illustrated in the drawings and described in detail.

그러나 이는 본 발명을 특정한 실시 형태에 대해 한정하려는 것이 아니며, 본 발명의 사상 및 기술 범위에 포함되는 모든 변경, 균등물 내지 대체물을 포함하는 것으로 이해되어야 한다.However, this is not intended to limit the present invention to a specific embodiment, it should be understood to include all changes, equivalents, or substitutes included in the spirit and scope of the present invention.

제1, 제2 등의 용어는 다양한 구성요소들을 설명하는데 사용될 수 있지만, 상기 구성요소들은 상기 용어들에 의해 한정되어서는 안 된다. 상기 용어들은 하나의 구성요소를 다른 구성요소로부터 구별하는 목적으로만 사용된다. 예를 들어, 본 발명의 권리 범위를 벗어나지 않으면서 제1 구성요소는 제2 구성요소로 명명될 수 있고, 유사하게 제2 구성요소도 제1 구성요소로 명명될 수 있다. 및/또는 이라는 용어는 복수의 관련된 기재된 항목들의 조합 또는 복수의 관련된 기재된 항목들 중의 어느 항목을 포함한다.Terms such as first and second may be used to describe various elements, but the elements should not be limited by the terms. The above terms are used only for the purpose of distinguishing one component from another component. For example, without departing from the scope of the present invention, a first element may be referred to as a second element, and similarly, a second element may be referred to as a first element. The term and/or includes a combination of a plurality of related listed items or any of a plurality of related listed items.

어떤 구성요소가 다른 구성요소에 "연결되어" 있다거나 "접속되어" 있다고 언급된 때에는, 그 다른 구성요소에 직접적으로 연결되어 있거나 또는 접속되어 있을 수도 있지만, 중간에 다른 구성요소가 존재할 수도 있다고 이해되어야 할 것이다. 반면에, 어떤 구성요소가 다른 구성요소에 "직접 연결되어" 있다거나 "직접 접속되어" 있다고 언급된 때에는, 중간에 다른 구성요소가 존재하지 않는 것으로 이해되어야 할 것이다. When a component is referred to as being "connected" or "connected" to another component, it is understood that it may be directly connected or connected to the other component, but other components may exist in the middle. It should be. On the other hand, when a component is referred to as being "directly connected" or "directly connected" to another component, it should be understood that there is no other component in the middle.

본 출원에서 사용한 용어는 단지 특정한 실시예를 설명하기 위해 사용된 것으로, 본 발명을 한정하려는 의도가 아니다. 단수의 표현은 문맥상 명백하게 다르게 뜻하지 않는 한, 복수의 표현을 포함한다. 본 출원에서, "포함하다" 또는 "가지다" 등의 용어는 명세서상에 기재된 특징, 숫자, 단계, 동작, 구성요소, 부품 또는 이들을 조합한 것이 존재함을 지정하려는 것이지, 하나 또는 그 이상의 다른 특징들이나 숫자, 단계, 동작, 구성요소, 부품 또는 이들을 조합한 것들의 존재 또는 부가 가능성을 미리 배제하지 않는 것으로 이해되어야 한다.The terms used in the present application are only used to describe specific embodiments, and are not intended to limit the present invention. Singular expressions include plural expressions unless the context clearly indicates otherwise. In the present application, terms such as "comprise" or "have" are intended to designate the presence of features, numbers, steps, actions, components, parts, or combinations thereof described in the specification, but one or more other features. It is to be understood that the presence or addition of elements or numbers, steps, actions, components, parts, or combinations thereof does not preclude in advance.

다르게 정의되지 않는 한, 기술적이거나 과학적인 용어를 포함해서 여기서 사용되는 모든 용어들은 본 발명이 속하는 기술 분야에서 통상의 지식을 가진 자에 의해 일반적으로 이해되는 것과 동일한 의미를 가지고 있다. 일반적으로 사용되는 사전에 정의되어 있는 것과 같은 용어들은 관련 기술의 문맥상 가지는 의미와 일치하는 의미를 가진 것으로 해석되어야 하며, 본 출원에서 명백하게 정의하지 않는 한, 이상적이거나 과도하게 형식적인 의미로 해석되지 않는다.Unless otherwise defined, all terms used herein including technical or scientific terms have the same meaning as commonly understood by one of ordinary skill in the art to which the present invention belongs. Terms such as those defined in commonly used dictionaries should be interpreted as having a meaning consistent with the meaning in the context of the related technology, and should not be interpreted as an ideal or excessively formal meaning unless explicitly defined in the present application. Does not.

이하, 첨부한 도면들을 참조하여, 본 발명의 바람직한 실시예를 보다 상세하게 설명하고자 한다. 본 발명을 설명함에 있어 전체적인 이해를 용이하게 하기 위하여 도면상의 동일한 구성요소에 대해서는 동일한 참조부호를 사용하고 동일한 구성요소에 대해서 중복된 설명은 생략한다.Hereinafter, preferred embodiments of the present invention will be described in more detail with reference to the accompanying drawings. In describing the present invention, in order to facilitate an overall understanding, the same reference numerals are used for the same elements in the drawings, and duplicate descriptions for the same elements are omitted.

도 1은 본 발명의 일 실시예에 따른 가상화 시스템의 구성을 나타낸 구성도이다.1 is a block diagram showing the configuration of a virtualization system according to an embodiment of the present invention.

도 1에 도시된 바와 같이, 본 발명의 일 실시예에 따른 가상화 시스템(100)은 복수의 가상 머신(140), 하이퍼바이저(130), 호스트(120) 및 저장 장치(110)를 포함한다. 그러나 도시된 구성요소 모두가 필수 구성요소인 것은 아니다. 도시된 구성요소보다 많은 구성요소에 의해 가상화 시스템(100)이 구현될 수도 있고, 그보다 적은 구성요소에 의해서도 가상화 시스템(100)이 구현될 수 있다.As shown in FIG. 1, a virtualization system 100 according to an embodiment of the present invention includes a plurality of virtual machines 140, a hypervisor 130, a host 120, and a storage device 110. However, not all of the illustrated components are essential components. The virtualization system 100 may be implemented by more components than the illustrated components, and the virtualization system 100 can be implemented by fewer components than the illustrated components.

이하, 도 1의 가상화 시스템(100)의 각 구성요소들의 구체적인 구성 및 동작을 설명한다.Hereinafter, a detailed configuration and operation of each component of the virtualization system 100 of FIG. 1 will be described.

호스트(120)는 호스트 운영체제(Host operating system)에 의해 운영되고 호스트 커널을 포함한다.The host 120 is operated by a host operating system and includes a host kernel.

저장 장치(110)는 호스트 커널을 통해 요청된 입출력 요청을 처리한다. The storage device 110 processes I/O requests requested through the host kernel.

가상 머신(140)은 커널 기반으로 동작하고, 호스트 운영체제 위에 동작하는 게스트 운영체제(Guest operating system)에 의해 운영된다. The virtual machine 140 operates based on a kernel and is operated by a guest operating system running on a host operating system.

하이퍼바이저(130)는 가상 머신(140)과 호스트(120) 사이에 위치하고, 커널 기반 가상 머신(140)을 모니터링한다. 하이퍼바이저(130)는 가상화 시스템(100)에서 제1 쓰레드에 입력된 입출력 요청의 크기 정보를 제2 쓰레드에 전송하고, 상기 입력된 입출력 요청을 호스트 커널로 전송하고, 입출력 요청의 크기 정보별로 미리 설정된 휴면 시간에 따라 제2 쓰레드를 휴면 상태로 설정하고, 그 설정된 휴면 시간이 만료되면 제2 쓰레드를 폴링 방식으로 동작시켜 입출력 요청의 완료 여부를 확인한다. The hypervisor 130 is located between the virtual machine 140 and the host 120 and monitors the kernel-based virtual machine 140. The hypervisor 130 transmits the size information of the input/output request input to the first thread from the virtualization system 100 to the second thread, transmits the input input/output request to the host kernel, and advances each input/output request size information. According to the set sleep time, the second thread is set to sleep, and when the set sleep time expires, the second thread is operated in a polling method to check whether the input/output request is completed.

도 2는 본 발명의 일 실시예에 따른 가상화 시스템에서 입출력 요청에 대한 완료 처리 동작을 나타낸 도면이다.2 is a diagram illustrating an operation of processing completion of an input/output request in a virtualization system according to an embodiment of the present invention.

본 발명의 일 실시예에서, CPU 쓰레드(CPU Thread) 및 I/O 쓰레드(I/O Thread)는 하이퍼바이저(130)에 의해 실행된다. 도 2는 QEMU-KVM 하이퍼바이저에서 I/O 완료를 확인하는 과정을 나타낸다. QEMU-KVM 하이퍼바이저는 일반적으로 CPU 쓰레드, I/0 쓰레드, 그리고 VNCC(Virtual Network Computing)과 같은 역할을 하는 여러 쓰레드들로 이루어져 있다 이 중 가상화 시스템의 I/O 작업을 수행하는 쓰레드는 CPU 쓰레드와 I/O 쓰레드이다. CPU 쓰레드는 가상 CPU 전용 큐(virt-queue)의 I/O 요청을 호스트 커널로 전송한다. I/O 쓰레드는 CPU 쓰레드가 I/O 요청을 전송하면 주기적으로 aio_ring 버퍼를 확인하며 I/0 완료 여부를 확인하기 시작한다. 그리고 호스트 커널이 aio_ring 버퍼를 갱선하면 I/O 쓰레드는 I/O 요청이 완료되었음을 확인하고, I/O 완료 처리에 필요한 추가적인 작업을 수행한다,In one embodiment of the present invention, a CPU thread and an I/O thread are executed by the hypervisor 130. 2 shows a process of confirming completion of I/O in the QEMU-KVM hypervisor. QEMU-KVM hypervisor is generally composed of CPU threads, I/0 threads, and several threads that play the same role as Virtual Network Computing (VNCC). Among them, the threads that perform I/O tasks of the virtualization system are CPU threads. And I/O threads. The CPU thread sends I/O requests from a virtual CPU-only queue (virt-queue) to the host kernel. When the CPU thread sends an I/O request, the I/O thread periodically checks the aio_ring buffer and starts to check whether the I/O is complete. And when the host kernel renews the aio_ring buffer, the I/O thread checks that the I/O request has been completed, and performs additional work necessary for processing the I/O completion.

이하, 본 발명의 일 실시예에 따른 CPU 쓰레드 및 I/O 쓰레드의 구체적인 동작을 설명하기로 한다. Hereinafter, specific operations of a CPU thread and an I/O thread according to an embodiment of the present invention will be described.

먼저, 단계 S101에서, 본 발명의 일 실시예에 따르면, CPU 쓰레드(CPU Thread)는 가상 큐(virt_queue)를 통해 입출력(I/O) 요청을 입력받는다.First, in step S101, according to an embodiment of the present invention, a CPU thread receives an input/output (I/O) request through a virtual queue (virt_queue).

단계 S102에서, 가상 CPU 쓰레드(Virtual CPU Thread)는 입출력(I/O) 요청을 호스트 커널로 전달하기 전에 해당 I/O 요청의 크기 정보를 I/O 쓰레드로 전달한다. 여기서, 본 발명의 일 실시예에서, 가상 CPU 쓰레드는 제1 쓰레드로 지칭될 수 있다. In step S102, the virtual CPU thread transfers the size information of the corresponding I/O request to the I/O thread before transferring the input/output (I/O) request to the host kernel. Here, in an embodiment of the present invention, the virtual CPU thread may be referred to as a first thread.

단계 S103에서, 가상 CPU 쓰레드는 입출력(I/O) 요청을 호스트 커널로 전달한다. In step S103, the virtual CPU thread transmits an input/output (I/O) request to the host kernel.

단계 S104에서, I/O 쓰레드(I/O Thread)는 전달받은 I/O 요청의 크기별로 미리 설정된 휴면 시간에 따라 I/O 쓰레드를 휴면 상태로 전환한다. 여기서, 본 발명의 일 실시예에서, 가상 CPU 쓰레드는 제1 쓰레드로 지칭되고, I/O 쓰레드는 제2 쓰레드로 지칭될 수 있다. In step S104, the I/O thread switches the I/O thread to the dormant state according to the dormant time preset according to the size of the received I/O request. Here, in an embodiment of the present invention, the virtual CPU thread may be referred to as a first thread, and the I/O thread may be referred to as a second thread.

단계 S105에서, 설정된 휴면 시간이 만료되면, I/O 쓰레드는 폴링 방식으로 동작하면서 비동기 입출력 링버퍼(aio_ring_buffer)를 주기적으로 확인한다.In step S105, when the set sleep time expires, the I/O thread periodically checks the asynchronous input/output ring buffer (aio_ring_buffer) while operating in a polling manner.

단계 S106에서, 저장 장치(110)에서 I/O 요청의 처리가 완료되면, 호스트 커널은 해당 I/O 요청의 완료 정보를 비동기 입출력 링버퍼(aio_ring_buffer)에 업데이트한다.In step S106, when processing of the I/O request is completed in the storage device 110, the host kernel updates the completion information of the corresponding I/O request in the asynchronous input/output ring buffer (aio_ring_buffer).

단계 S107에서, 비동기 입출력 링버퍼(aio_ring_buffer)의 정보가 업데이트되면 I/O 쓰레드는 해당 정보를 확인하고 폴링 방식을 중단한다.In step S107, when the information of the asynchronous input/output ring buffer (aio_ring_buffer) is updated, the I/O thread checks the information and stops the polling method.

단계 S108에서, I/O 쓰레드는 I/O 요청의 완료를 확인한 다음, I/O 요청의 처리 완료에 필요한 추가적인 I/O 완료 처리를 수행한다.In step S108, the I/O thread checks the completion of the I/O request, and then performs additional I/O completion processing required to complete the processing of the I/O request.

이와 같이, 도 2는 본 발명의 일 실시예에 따른 입출력 요청에 대한 완료 처리 동작을 나타낸다. 본 발명의 일 실시예는 적응형 폴링 방식과 달리 I/O 쓰레드에 먼저 I/O 요청을 보낸 뒤 I/O 쓰레드를 휴면 상태로 전환한다. 그리고 I/O 쓰레드는 특정 시간이 지난 뒤 스케줄링 되어 주기적으로 I/O 완료를 확인한다. 이는 리녹스 커널에서 제공하는 하이브리드 폴링 방식과 마찬가지로 일정 시간 동안 휴면 상태로 전환되기 때문에 기존의 적응형 폴링 방식보다 CPU 사용량이 적다. 또한 본 발명의 일 실시예는 하이브리드 폴렁 방식에서 평균 응답 시간의 50% 시간 동안 휴면 상태를 유지하는 것과 달리 실험적으로 최적의 휴면 시간을 찾아내어 I/0 크기 별로 시간을 지정할 수 있다. 따라서 하이브리드 폴링 방식과 달리 응답 시간의 지연은 최소로 유지하면서 최대한 낮은 CPU 사용량을 제공할 수 있다. 휴면 시간은 본 발명의 일 실시예의 응답 지연 시간이 종래의 폴링 방식 대비 5% 이하가 되도록 설정하였으며, 그중 가장 적은 CPU 사용량을 보이는 휴면 시간을 사용할 수 있다. 또한, 종래의 하이브리드 폴링 방식은 호스트 운영 체제에서 동기 I/O 요청에 대해서만 동작하지만, 본 발명의 일 실시예는 종래의 적응형 폴령 방식과 마찬가지로 하이퍼바이저(130)에서 구현되었기 때문에 동기 I/0 요청뿐만 아니라 비동기 I/0 요청에 대해서도 동작할 수 있다. As such, FIG. 2 shows a complete processing operation for an input/output request according to an embodiment of the present invention. In an embodiment of the present invention, unlike the adaptive polling method, an I/O request is first sent to an I/O thread and then the I/O thread is switched to a dormant state. And I/O threads are scheduled after a certain period of time to periodically check for I/O completion. Similar to the hybrid polling method provided by the Linox kernel, it is converted into a dormant state for a certain period of time, so CPU usage is lower than that of the existing adaptive polling method. In addition, in an embodiment of the present invention, unlike maintaining the dormant state for 50% of the average response time in the hybrid pollung method, the optimal dormancy time may be experimentally found and the time may be designated for each I/0 size. Therefore, unlike the hybrid polling method, it is possible to provide the lowest CPU usage while keeping the response time to a minimum. The sleep time is set so that the response delay time of an embodiment of the present invention is 5% or less compared to the conventional polling method, of which the sleep time showing the lowest CPU usage may be used. In addition, the conventional hybrid polling method operates only for synchronous I/O requests in the host operating system, but since an embodiment of the present invention is implemented in the hypervisor 130 like the conventional adaptive polling method, synchronous I/0 It can operate on asynchronous I/0 requests as well as requests.

도 3은 본 발명의 일 실시예에 따른 가상화 시스템에서의 입출력 완료 처리 장치의 구성을 설명하기 위한 구성도이다.3 is a block diagram illustrating a configuration of an input/output completion processing apparatus in a virtualization system according to an embodiment of the present invention.

도 3에 도시된 바와 같이, 본 발명의 일 실시예에 따른 가상화 시스템(100)에서의 입출력 완료 처리 장치(200)는 저장 장치(110), 메모리(220) 및 프로세서(230)를 포함한다. 그러나 도시된 구성요소 모두가 필수 구성요소인 것은 아니다. 도시된 구성요소보다 많은 구성요소에 의해 입출력 완료 처리 장치(200)가 구현될 수도 있고, 그보다 적은 구성요소에 의해서도 입출력 완료 처리 장치(200)가 구현될 수 있다. 본 발명의 일 실시예에 따른 입출력 완료 처리 장치(200)는 호스트(120)와 연결된 하이퍼바이저(130)에 포함되어 동작하거나, 하이퍼바이저로서 동작할 수 있다. As shown in FIG. 3, the input/output completion processing apparatus 200 in the virtualization system 100 according to an embodiment of the present invention includes a storage device 110, a memory 220, and a processor 230. However, not all of the illustrated components are essential components. The input/output completion processing apparatus 200 may be implemented by more components than the illustrated components, and the input/output completion processing apparatus 200 may be implemented by fewer components. The input/output completion processing apparatus 200 according to an embodiment of the present invention may be included in the hypervisor 130 connected to the host 120 to operate, or may operate as a hypervisor.

이하, 도 3의 가상화 시스템(100)에서의 입출력 완료 처리 장치(200)의 각 구성요소들의 구체적인 구성 및 동작을 설명한다.Hereinafter, a detailed configuration and operation of each component of the input/output completion processing apparatus 200 in the virtualization system 100 of FIG. 3 will be described.

저장 장치(110)는 하이퍼바이저(130)를 통해 요청된 입출력 요청을 처리한다. The storage device 110 processes the input/output request requested through the hypervisor 130.

메모리(220)는 적어도 하나의 프로그램을 저장한다. The memory 220 stores at least one program.

프로세서(230)는 저장 장치(110) 및 메모리(220)와 연결된다. The processor 230 is connected to the storage device 110 and the memory 220.

프로세서(230)는, 상기 적어도 하나의 프로그램을 실행함으로써, 가상화 시스템(100)에서 제1 쓰레드에 입력된 입출력 요청의 크기 정보를 제2 쓰레드에 전송하고, 호스트 커널과 연결된 저장 장치(110)에서 그 입력된 입출력 요청이 처리되도록, 그 입력된 입출력 요청을 호스트 커널로 전송하고, 그 입출력 요청의 크기 정보별로 미리 설정된 휴면 시간에 따라 제2 쓰레드를 휴면 상태로 설정하고, 그 설정된 휴면 시간이 만료되면 제2 쓰레드를 폴링 방식으로 동작시켜 입출력 요청의 완료 여부를 확인한다.The processor 230 transmits the size information of the input/output request input to the first thread in the virtualization system 100 to the second thread by executing the at least one program, and transmits the size information of the input/output request input to the first thread to the second thread, and in the storage device 110 connected to the host kernel. In order to process the input I/O request, the input I/O request is transmitted to the host kernel, the second thread is set to sleep according to the preset sleep time according to the size information of the I/O request, and the set sleep time expires. If so, it checks whether the I/O request has been completed by operating the second thread in a polling method.

다양한 실시예들에 따르면, 프로세서(230)는 입출력 요청이 완료된 것으로 확인되면, 제2 쓰레드에 대한 폴링 방식 동작을 중단할 수 있다. According to various embodiments, when it is determined that the input/output request has been completed, the processor 230 may stop the polling method operation for the second thread.

다양한 실시예들에 따르면, 프로세서(230)는 입출력 요청의 크기가 기설정된 요청 크기값(예컨대, 64KB) 이하인 경우에 미리 설정된 휴면 시간에 따라 제2 쓰레드를 휴면 상태로 설정할 수 있다.According to various embodiments, when the size of the input/output request is less than or equal to a preset request size value (eg, 64 KB), the processor 230 may set the second thread to a sleep state according to a preset sleep time.

다양한 실시예들에 따르면, 프로세서(230)는 입출력 요청의 크기가 기설정된 요청 크기값을 초과하면 제2 쓰레드를 인터럽트 방식으로 동작시킬 수 있다.According to various embodiments, the processor 230 may operate the second thread in an interrupt method when the size of the input/output request exceeds a preset request size value.

다양한 실시예들에 따르면, 프로세서(230)는 호스트 커널로부터의 완료 정보가 업데이트되는 입출력 링버퍼(I/O Ring Buffer)를 주기적으로 확인하여 입출력 요청의 완료 여부를 확인할 수 있다. According to various embodiments, the processor 230 may check whether the input/output request is completed by periodically checking an I/O ring buffer in which completion information from the host kernel is updated.

다양한 실시예들에 따르면, 프로세서(230)는 호스트 커널과 연결된 저장 장치(110)에서 입출력 요청의 처리가 완료되면, 호스트 커널을 통해 링버퍼에 입출력 요청의 완료 정보를 업데이트할 수 있다.According to various embodiments, when processing of the input/output request is completed in the storage device 110 connected to the host kernel, the processor 230 may update completion information of the input/output request to the ring buffer through the host kernel.

다양한 실시예들에 따르면, 입출력 요청은 기설정된 일반 동기 입출력 요청 또는 비동기 입출력 요청일 수 있다. According to various embodiments, the input/output request may be a preset general synchronous input/output request or an asynchronous input/output request.

다양한 실시예들에 따르면, 제1 쓰레드 및 상기 제2 쓰레드는 상기 가상화 시스템(100)의 하이퍼바이저 계층에서 동작하고, 호스트 커널은 가상화 시스템(100)의 호스트 계층에서 동작할 수 있다.According to various embodiments, the first thread and the second thread may operate in the hypervisor layer of the virtualization system 100, and the host kernel may operate in the host layer of the virtualization system 100.

다양한 실시예들에 따르면, 제1 쓰레드 및 상기 제2 쓰레드는 가상화 시스템(100)에서 동작하는 QEMU-KVM(Quick Emulator Kernel-Based Virtual Machine) 하이퍼바이저에 의해 동작할 수 있다.According to various embodiments, the first thread and the second thread may operate by a Quick Emulator Kernel-Based Virtual Machine (QEMU-KVM) hypervisor operating in the virtualization system 100.

도 4 및 도 5는 본 발명의 일 실시예에 따른 가상화 시스템에서 입출력 완료 처리 방법을 나타낸 흐름도이다.4 and 5 are flowcharts illustrating a method of processing input/output completion in a virtualization system according to an embodiment of the present invention.

우선, 도 4를 통해 본 발명의 일 실시예에 따른 입출력 완료 처리 방법에서의 전체 흐름을 설명하기로 한다. First, the overall flow in the input/output completion processing method according to an embodiment of the present invention will be described with reference to FIG. 4.

단계 S201에서, 입출력 완료 처리 장치(200)는 제1 쓰레드에 입력된 입출력 요청의 크기 정보를 확인한다. In step S201, the input/output completion processing apparatus 200 checks the size information of the input/output request input to the first thread.

단계 S202에서, 입출력 완료 처리 장치(200)는 입출력 요청이 기설정된 요청값 이하인지를 확인한다.In step S202, the input/output completion processing apparatus 200 checks whether the input/output request is equal to or less than a preset request value.

단계 S203에서, 입출력 요청이 기설정된 요청값 이하이면, 입출력 완료 처리 장치(200)는 제2 쓰레드를 폴링 방식으로 동작시켜 입출력 요청의 완료 여부를 확인한다.In step S203, if the input/output request is less than or equal to the preset request value, the input/output completion processing apparatus 200 checks whether the input/output request is completed by operating the second thread in a polling manner.

반면, 단계 S204에서, 입출력 요청이 기설정된 요청값을 초과하면, 입출력 완료 처리 장치(200)는 제2 쓰레드를 인터럽트 방식으로 동작시켜 입출력 요청의 완료 여부를 확인한다. On the other hand, in step S204, when the input/output request exceeds a preset request value, the input/output completion processing apparatus 200 checks whether the input/output request is completed by operating the second thread in an interrupt manner.

이후, 단계 S205에서, 입출력 완료 처리 장치(200)는 입출력 요청이 완료되는지를 확인한다.Thereafter, in step S205, the input/output completion processing apparatus 200 checks whether the input/output request is completed.

단계 S206에서, 입출력 요청이 완료되면, 입출력 완료 처리 장치(200)는 입출력 완료 처리에 필요한 추가적인 작업을 제2 쓰레드를 통해 수행할 수 있다. In step S206, when the input/output request is completed, the input/output completion processing apparatus 200 may perform an additional operation necessary for processing the input/output completion through the second thread.

한편, 도 5를 참조하여, 제2 쓰레드를 폴링 방식으로 동작시켜 입출력 요청의 완료 여부를 확인하는 단계 S203에 대한 상세 흐름을 설명하기로 한다. Meanwhile, with reference to FIG. 5, a detailed flow of step S203 of confirming whether the input/output request is completed by operating the second thread in a polling manner will be described.

단계 S301에서, 입출력 완료 처리 장치(200)는 제1 쓰레드에 입력된 입출력 요청의 크기 정보를 제2 쓰레드에 전송한다. In step S301, the input/output completion processing apparatus 200 transmits the size information of the input/output request input to the first thread to the second thread.

단계 S302에서, 입출력 완료 처리 장치(200)는 입력된 입출력 요청을 호스트 커널로 전송한다.In step S302, the input/output completion processing device 200 transmits the input input/output request to the host kernel.

단계 S303에서, 입출력 완료 처리 장치(200)는 입출력 요청의 크기 정보별로 미리 설정된 휴면 시간에 따라 제2 쓰레드를 휴면 상태로 설정한다. In step S303, the input/output completion processing apparatus 200 sets the second thread to the dormant state according to a preset dormancy time for each size information of the input/output request.

단계 S304에서, 입출력 완료 처리 장치(200)는 휴면 시간이 만료되는지를 확인한다. In step S304, the input/output completion processing apparatus 200 checks whether the dormant time expires.

단계 S305에서, 휴면 시간이 만료되면, 입출력 완료 처리 장치(200)는 제2 쓰레드를 폴링 방식으로 동작시켜 입출력 요청의 완료 여부를 확인한다. In step S305, when the dormant time expires, the input/output completion processing apparatus 200 checks whether the input/output request is completed by operating the second thread in a polling manner.

이후, 입출력 요청이 완료된 것으로 확인되면, 입출력 완료 처리 장치(200)는 제2 쓰레드에 대한 폴링 방식 동작을 중단할 수 있다.Thereafter, when it is determined that the input/output request has been completed, the input/output completion processing apparatus 200 may stop the polling method operation for the second thread.

도 6 내지 도 9는 본 발명의 일 실시예와 종래 기술에 따른 응답 시간 및 CPU 사용량의 측정 결과를 나타낸 도면이다.6 to 9 are diagrams showing measurement results of response time and CPU usage according to an embodiment of the present invention and the prior art.

본 발명의 일 실시예와 종래 기술에 따른 응답 시간 및 CPU 사용량을 측정하는 실험 방법에 대해서 설명하기로 한다. 이러한 실험 방법을 통해 I/O 요청 크기에 따른 종래의 I/O 완료 처리 방식과 본 발명의 일 실시예의 응답 시간 및 CPU 사용량을 비교한 도면이 도 6 내지 도 9에 나타나 있다.An experimental method of measuring response time and CPU usage according to an embodiment of the present invention and the prior art will be described. 6 to 9 are diagrams comparing a conventional I/O completion processing method according to the size of an I/O request through this experimental method, and a response time and CPU usage according to an embodiment of the present invention.

본 실험은 인텔 코어(Intel Core) i7-8700, DRAM 16GB, 인텔 옵테인(Intel Optane) SSD 480GB의 하드웨어 장비들이 장착된 시스템에서 수행되었다. 호스트의 커널 버전은 4.16.2이고 게스트의 커널 버전은 4.20.2이다. 호스트와 게스트에 사용된 운영체제와 파일시스템은 우분투(Ubuntu) 14.04LTS와 Ext4 파일시스템(Filesystem)이다. 그리고, 가상머신은 QEMU-KVM(ver. 2.10.2)을 사용해서 생성하였으며 가상머신은 32GB의 가상 디스크, 1개의 vCPU, 그리고 1024MB의 메모리를 가진다. 또한, 적응형 폴링 방식을 제공하기 위해 virtio-blk-pci 디바이스 드라이버를 사용하였다. I/O 성능을 측정하기 위해 스토리지 성능 측정에 대표적으로 사용되는 FIO 벤치마크를 이용해 워크로드를 수행하였다. 실험에 사용된 워크로드는 pvsync2 엔진을 사용하여 가상 디스크에 대해 임의 읽기를 수행한다. pvsync2 엔진은 RWF_HIPRI 옵션을 가진 동기 I/O를 수행하기 때문에 호스트에서 해당 워크로드를 수행하면 하이브리드 폴링이 동작하지만, 본 실험은 가상머신에서 수행하기 때문에 호스트의 하이브리드 폴링은 동작하지 않는다.This experiment was performed on a system equipped with hardware equipment of Intel Core i7-8700, DRAM 16GB, and Intel Optane SSD 480GB. The host kernel version is 4.16.2 and the guest kernel version is 4.20.2. The operating system and file system used for the host and guest are Ubuntu 14.04LTS and Ext4 Filesystem. In addition, the virtual machine was created using QEMU-KVM (ver. 2.10.2), and the virtual machine has a 32GB virtual disk, 1 vCPU, and 1024MB of memory. In addition, the virtio-blk-pci device driver was used to provide an adaptive polling method. In order to measure I/O performance, the workload was performed using the FIO benchmark, which is typically used to measure storage performance. The workload used in the experiment uses the pvsync2 engine to perform random reads on the virtual disk. Since the pvsync2 engine performs synchronous I/O with the RWF_HIPRI option, hybrid polling works when the host executes the workload, but hybrid polling of the host does not work because this experiment is performed in a virtual machine.

실험은 두 가지로 진행하였으며 첫 번째는 I/O 요청의 크기를 4KB부터 64KB까지 4KB 기준으로 증가시키면서 각 I/O 요청의 크기별로 적응형 폴링 방식과 인터럽트 방식 그리고 제안 기법의 응답 시간과 CPU 사용량을 측정하였다. 두 번째는 4KB와 64KB 크기의 I/O 요청을 99:1에서 1:99까지 비율을 변경해가며 I/O 요청 크기의 비율별로 적응형 폴링 방식과 인터럽트 방식 그리고 제안 기법의 응답 시간과 CPU 사용량을 측정하였다.The experiment was conducted in two ways. The first was to increase the size of the I/O request from 4KB to 64KB in a 4KB basis, and the adaptive polling method and interrupt method according to the size of each I/O request, and the response time and CPU usage of the proposed method. Was measured. The second is to change the ratio of 4KB and 64KB I/O requests from 99:1 to 1:99, and adjust the response time and CPU usage of the proposed method as well as the adaptive polling method and interrupt method according to the ratio of the I/O request size. It was measured.

실험 결과를 살펴보면, 도 6 및 도 7에 도시된 바와 같이, 첫 번째 실험의 경우, 본 발명의 일 실시예에 따른 입출력 완료 처리 방법 즉, HyPIV(Hypervisor Polling and Interrupt in Virtualized system)는 종래의 적응형 폴링(Adaptive Polling) 기법에 비해 응답 시간은 최대 5.3% 증가하지만 CPU 사용량은 최대 38.7% 감소하였다. 즉, 응답 시간 지연으로 인한 성능 저하에 비해 CPU 사용량은 종래 방식 대비 크게 감소하였다는 것을 확인할 수 있다. I/O 크기 비율별로 종래의 I/O 완료 처리 방식과 본 발명의 일 실시예에 따른 입출력 완료 처리 방법의 응답 시간 및 CPU 사용량이 도 6 및 도 7에 비교되고 있다. Looking at the experimental results, as shown in FIGS. 6 and 7, in the case of the first experiment, the input/output completion processing method according to an embodiment of the present invention, that is, a Hypervisor Polling and Interrupt in Virtualized system (HPIV) is a conventional adaptation. Compared to the adaptive polling method, response time increased by up to 5.3%, but CPU usage decreased by up to 38.7%. That is, it can be seen that compared to the performance degradation due to the delay in response time, the CPU usage has been significantly reduced compared to the conventional method. The response time and CPU usage of the conventional I/O completion processing method according to the I/O size ratio and the input/output completion processing method according to an embodiment of the present invention are compared in FIGS. 6 and 7.

도 8 및 도 9에 도시된 바와 같이, 두 번째 실험의 경우, 본 발명의 일 실시예에 따른 HyPIV는 종래의 적응형 폴링 방식에 비해 응답 시간이 평균 5.9% 지연되었지만 CPU 사용량은 평균 28.9% 감소하였다. 또한, 4KB의 가장 작은 크기의 I/O 요청과 구현 범위 중 가장 큰 I/O 크기인 64KB의 I/O 요청을 혼합해서 수행했음에도 적응형 폴링 방식 대비 높은 효율성을 보여주는 것을 확인하였다.8 and 9, in the case of the second experiment, the HyPIV according to an embodiment of the present invention delayed the response time by an average of 5.9% compared to the conventional adaptive polling method, but the CPU usage decreased by an average of 28.9%. I did. In addition, even though the I/O request of the smallest size of 4KB and the I/O request of 64KB, which is the largest I/O size in the implementation range, were mixed and executed, it was confirmed that it showed higher efficiency compared to the adaptive polling method.

상술한 본 발명의 실시예들에 따른 가상화 시스템에서의 입출력 완료 처리 방법은 컴퓨터로 읽을 수 있는 기록매체에 컴퓨터가 읽을 수 있는 코드로서 구현되는 것이 가능하다. 본 발명의 실시예들에 따른 가상화 시스템에서의 입출력 완료 처리 방법은 다양한 컴퓨터 수단을 통하여 수행될 수 있는 프로그램 명령 형태로 구현되어 컴퓨터로 읽을 수 있는 기록매체에 기록될 수 있다.The input/output completion processing method in the virtualization system according to the embodiments of the present invention described above may be implemented as a computer-readable code on a computer-readable recording medium. The method of processing input/output completion in a virtualization system according to embodiments of the present invention may be implemented in the form of program commands that can be executed through various computer means and recorded in a computer-readable recording medium.

프로세서에 의해 실행 가능한 적어도 하나의 프로그램을 포함하는 비일시적 컴퓨터 판독가능 저장 매체로서, 상기 적어도 하나의 프로그램은 상기 프로세서에 의해 실행될 때, 상기 프로세서로 하여금: 가상화 시스템에서 제1 쓰레드에 입력된 입출력 요청의 크기 정보를 제2 쓰레드에 전송하고, 호스트 커널과 연결된 상기 저장 장치에서 상기 입력된 입출력 요청이 처리되도록, 상기 입력된 입출력 요청을 상기 호스트 커널로 전송하고, 상기 입출력 요청의 크기 정보별로 미리 설정된 휴면 시간에 따라 상기 제2 쓰레드를 휴면 상태로 설정하고, 상기 설정된 휴면 시간이 만료되면 상기 제2 쓰레드를 폴링 방식으로 동작시켜 상기 입출력 요청의 완료 여부를 확인하게 하는 명령어들을 포함하는, 비 일시적 컴퓨터 판독 가능한 저장 매체가 제공될 수 있다.A non-transitory computer-readable storage medium including at least one program executable by a processor, wherein when the at least one program is executed by the processor, the processor causes: an input/output request input to a first thread in a virtualization system The size information of the input/output is transmitted to the second thread, and the input/output request is transmitted to the host kernel so that the input/output request is processed by the storage device connected to the host kernel, and preset for each size information of the input/output request. Non-transitory computer comprising instructions for setting the second thread to a dormant state according to a dormant time, and for checking whether the input/output request is completed by operating the second thread in a polling method when the set dormant time expires A readable storage medium may be provided.

상술한 본 발명에 따른 방법은 컴퓨터로 읽을 수 있는 기록매체에 컴퓨터가 읽을 수 있는 코드로서 구현되는 것이 가능하다. 컴퓨터가 읽을 수 있는 기록 매체로는 컴퓨터 시스템에 의하여 해독될 수 있는 데이터가 저장된 모든 종류의 기록 매체를 포함한다. 예를 들어, ROM(Read Only Memory), RAM(Random Access Memory), 자기 테이프, 자기 디스크, 플래시 메모리, 광 데이터 저장장치 등이 있을 수 있다. 또한, 컴퓨터로 판독 가능한 기록매체는 컴퓨터 통신망으로 연결된 컴퓨터 시스템에 분산되어, 분산방식으로 읽을 수 있는 코드로서 저장되고 실행될 수 있다.The method according to the present invention described above can be implemented as a computer-readable code on a computer-readable recording medium. The computer-readable recording medium includes all types of recording media in which data that can be decoded by a computer system is stored. For example, there may be read only memory (ROM), random access memory (RAM), magnetic tape, magnetic disk, flash memory, optical data storage device, and the like. In addition, the computer-readable recording medium can be distributed in a computer system connected through a computer communication network, and stored and executed as codes that can be read in a distributed manner.

이상, 도면 및 실시예를 참조하여 설명하였지만, 본 발명의 보호범위가 상기 도면 또는 실시예에 의해 한정되는 것을 의미하지는 않으며 해당 기술 분야의 숙련된 당업자는 하기의 특허 청구의 범위에 기재된 본 발명의 사상 및 영역으로부터 벗어나지 않는 범위 내에서 본 발명을 다양하게 수정 및 변경시킬 수 있음을 이해할 수 있을 것이다. Although the above has been described with reference to the drawings and examples, it does not mean that the scope of protection of the present invention is limited by the drawings or examples, and those skilled in the art It will be appreciated that various modifications and changes can be made to the present invention without departing from the spirit and scope.

구체적으로, 설명된 특징들은 디지털 전자 회로, 또는 컴퓨터 하드웨어, 펌웨어, 또는 그들의 조합들 내에서 실행될 수 있다. 특징들은 예컨대, 프로그래밍 가능한 프로세서에 의한 실행을 위해, 기계 판독 가능한 저장 디바이스 내의 저장장치 내에서 구현되는 컴퓨터 프로그램 제품에서 실행될 수 있다. 그리고 특징들은 입력 데이터 상에서 동작하고 출력을 생성함으로써 설명된 실시예들의 함수들을 수행하기 위한 지시어들의 프로그램을 실행하는 프로그래밍 가능한 프로세서에 의해 수행될 수 있다. 설명된 특징들은, 데이터 저장 시스템으로부터 데이터 및 지시어들을 수신하기 위해, 및 데이터 저장 시스템으로 데이터 및 지시어들을 전송하기 위해, 결합된 적어도 하나의 프로그래밍 가능한 프로세서, 적어도 하나의 입력 디바이스, 및 적어도 하나의 출력 디바이스를 포함하는 프로그래밍 가능한 시스템 상에서 실행될 수 있는 하나 이상의 컴퓨터 프로그램들 내에서 실행될 수 있다. 컴퓨터 프로그램은 소정 결과에 대해 특정 동작을 수행하기 위해 컴퓨터 내에서 직접 또는 간접적으로 사용될 수 있는 지시어들의 집합을 포함한다. 컴퓨터 프로그램은 컴파일된 또는 해석된 언어들을 포함하는 프로그래밍 언어 중 어느 형태로 쓰여지고, 모듈, 소자, 서브루틴(subroutine), 또는 다른 컴퓨터 환경에서 사용을 위해 적합한 다른 유닛으로서, 또는 독립 조작 가능한 프로그램으로서 포함하는 어느 형태로도 사용될 수 있다.Specifically, the described features may be implemented in digital electronic circuitry, or computer hardware, firmware, or combinations thereof. Features may be executed in a computer program product implemented in storage in a machine-readable storage device, for example, for execution by a programmable processor. And the features can be performed by a programmable processor executing a program of directives to perform the functions of the described embodiments by operating on input data and generating output. The described features include at least one programmable processor, at least one input device, and at least one output coupled to receive data and directives from the data storage system and to transmit data and directives to the data storage system. It can be executed within one or more computer programs that can be executed on a programmable system including the device. A computer program includes a set of directives that can be used directly or indirectly within a computer to perform a specific action on a given result. Computer programs are written in any form of programming language, including compiled or interpreted languages, and included as modules, elements, subroutines, or other units suitable for use in other computer environments, or as independently operable programs. It can be used in any form.

지시어들의 프로그램의 실행을 위한 적합한 프로세서들은, 예를 들어, 범용 및 특수 용도 마이크로프로세서들 둘 모두, 및 단독 프로세서 또는 다른 종류의 컴퓨터의 다중 프로세서들 중 하나를 포함한다. 또한 설명된 특징들을 구현하는 컴퓨터 프로그램 지시어들 및 데이터를 구현하기 적합한 저장 디바이스들은 예컨대, EPROM, EEPROM, 및 플래쉬 메모리 디바이스들과 같은 반도체 메모리 디바이스들, 내부 하드 디스크들 및 제거 가능한 디스크들과 같은 자기 디바이스들, 광자기 디스크들 및 CD-ROM 및 DVD-ROM 디스크들을 포함하는 비휘발성 메모리의 모든 형태들을 포함한다. 프로세서 및 메모리는 ASIC들(application-specific integrated circuits) 내에서 통합되거나 또는 ASIC들에 의해 추가될 수 있다.Suitable processors for execution of a program of directives include, for example, both general and special purpose microprocessors, and either a single processor or multiple processors of a different kind of computer. Storage devices suitable for implementing computer program directives and data that also implement the described features are, for example, semiconductor memory devices such as EPROM, EEPROM, and flash memory devices, magnetic devices such as internal hard disks and removable disks. Devices, magneto-optical disks and all types of non-volatile memory including CD-ROM and DVD-ROM disks. The processor and memory may be integrated within application-specific integrated circuits (ASICs) or added by ASICs.

이상에서 설명한 본 발명은 일련의 기능 블록들을 기초로 설명되고 있지만, 전술한 실시예 및 첨부된 도면에 의해 한정되는 것이 아니고, 본 발명의 기술적 사상을 벗어나지 않는 범위 내에서 여러 가지 치환, 변형 및 변경 가능하다는 것이 본 발명이 속하는 기술분야에서 통상의 지식을 가진 자에게 있어 명백할 것이다.The present invention described above is described on the basis of a series of functional blocks, but is not limited by the above-described embodiments and the accompanying drawings, and various substitutions, modifications and changes within the scope not departing from the technical spirit of the present invention It will be apparent to those of ordinary skill in the art to which this invention pertains.

전술한 실시예들의 조합은 전술한 실시예에 한정되는 것이 아니며, 구현 및/또는 필요에 따라 전술한 실시예들 뿐 아니라 다양한 형태의 조합이 제공될 수 있다.Combinations of the above-described embodiments are not limited to the above-described embodiments, and combinations of various types as well as the above-described embodiments may be provided according to implementation and/or need.

전술한 실시예들에서, 방법들은 일련의 단계 또는 블록으로서 순서도를 기초로 설명되고 있으나, 본 발명은 단계들의 순서에 한정되는 것은 아니며, 어떤 단계는 상술한 바와 다른 단계와 다른 순서로 또는 동시에 발생할 수 있다. 또한, 당해 기술 분야에서 통상의 지식을 가진 자라면 순서도에 나타난 단계들이 배타적이지 않고, 다른 단계가 포함되거나, 순서도의 하나 또는 그 이상의 단계가 본 발명의 범위에 영향을 미치지 않고 삭제될 수 있음을 이해할 수 있을 것이다.In the above-described embodiments, the methods are described on the basis of a flow chart as a series of steps or blocks, but the present invention is not limited to the order of steps, and certain steps may occur in a different order or concurrently with other steps as described above. I can. In addition, those of ordinary skill in the art understand that the steps shown in the flowchart are not exclusive, other steps are included, or one or more steps in the flowchart may be deleted without affecting the scope of the present invention. You can understand.

전술한 실시예는 다양한 양태의 예시들을 포함한다. 다양한 양태들을 나타내기 위한 모든 가능한 조합을 기술할 수는 없지만, 해당 기술 분야의 통상의 지식을 가진 자는 다른 조합이 가능함을 인식할 수 있을 것이다. 따라서, 본 발명은 이하의 특허청구범위 내에 속하는 모든 다른 교체, 수정 및 변경을 포함한다고 할 것이다.The above-described embodiments include examples of various aspects. It is not possible to describe all possible combinations for representing the various aspects, but one of ordinary skill in the art will recognize that other combinations are possible. Accordingly, the present invention will be said to include all other replacements, modifications and changes falling within the scope of the following claims.

100: 가상화 시스템
110; 저장 장치
120: 호스트
130: 하이퍼바이저
140: 가상 머신
200: 입출력 완료 처리 장치
210: 저장 장치
220: 메모리
230: 프로세서
100: virtualization system
110; Storage device
120: host
130: hypervisor
140: virtual machine
200: I/O completion processing unit
210: storage device
220: memory
230: processor

Claims (20)

가상화 시스템에서의 입출력 완료 처리 방법에 있어서,
가상화 시스템에서 제1 쓰레드에 입력된 입출력 요청의 크기 정보를 제2 쓰레드에 전송하는 단계;
상기 입력된 입출력 요청을 호스트 커널로 전송하는 단계;
상기 입출력 요청의 크기 정보별로 미리 설정된 휴면 시간에 따라 상기 제2 쓰레드를 휴면 상태로 설정하는 단계; 및
상기 설정된 휴면 시간이 만료되면 상기 제2 쓰레드를 폴링 방식으로 동작시켜 상기 입출력 요청의 완료 여부를 확인하는 단계를 포함하고,
상기 제2 쓰레드를 휴면 상태로 설정하는 단계는, 상기 입출력 요청의 크기가 기설정된 요청 크기값 이하인 경우에 미리 설정된 휴면 시간에 따라 상기 제2 쓰레드를 휴면 상태로 설정하는, 가상화 시스템에서의 입출력 완료 처리 방법.
In the method of processing input/output completion in a virtualization system,
Transmitting size information of the input/output request input to the first thread in the virtualization system to the second thread;
Transmitting the input input/output request to a host kernel;
Setting the second thread to a dormant state according to a preset dormant time for each size information of the input/output request; And
When the set dormant time expires, operating the second thread in a polling method to check whether the input/output request has been completed, and
The setting of the second thread to the dormant state includes setting the second thread to the dormant state according to a preset dormancy time when the size of the input/output request is less than or equal to a preset request size value. Processing method.
제1항에 있어서,
상기 입출력 요청이 완료된 것으로 확인되면, 상기 제2 쓰레드에 대한 폴링 방식 동작을 중단하는 단계를 더 포함하는, 가상화 시스템에서의 입출력 완료 처리 방법.
The method of claim 1,
When it is confirmed that the input/output request has been completed, the method of processing input/output completion in a virtualization system further comprising: stopping a polling method operation for the second thread.
삭제delete 제1항에 있어서,
상기 입출력 요청의 크기가 기설정된 요청 크기값을 초과하면 상기 제2 쓰레드를 인터럽트 방식으로 동작시키는 단계를 더 포함하는, 가상화 시스템에서의 입출력 완료 처리 방법.
The method of claim 1,
The method of processing input/output completion in a virtualization system, further comprising operating the second thread in an interrupt mode when the size of the input/output request exceeds a preset request size value.
제1항에 있어서,
상기 입출력 요청의 완료 여부를 확인하는 단계는,
상기 호스트 커널로부터의 완료 정보가 업데이트되는 입출력 링버퍼(I/O Ring Buffer)를 주기적으로 확인하여 상기 입출력 요청의 완료 여부를 확인하는, 가상화 시스템에서의 입출력 완료 처리 방법.
The method of claim 1,
Checking whether the input/output request is completed,
A method for processing input/output completion in a virtualization system, wherein the I/O ring buffer for which completion information from the host kernel is updated is periodically checked to check whether the input/output request is completed.
제5항에 있어서,
상기 입출력 요청의 완료 여부를 확인하는 단계는,
상기 호스트 커널과 연결된 저장 장치에서 상기 입출력 요청의 처리가 완료되면, 상기 호스트 커널을 통해 상기 입출력 링버퍼에 상기 입출력 요청의 완료 정보를 업데이트하는, 가상화 시스템에서의 입출력 완료 처리 방법.
The method of claim 5,
Checking whether the input/output request is completed,
When the processing of the input/output request is completed in the storage device connected to the host kernel, the input/output completion information of the input/output request is updated in the input/output ring buffer through the host kernel.
제1항에 있어서,
상기 입출력 요청은,
기설정된 일반 동기 입출력 요청 또는 비동기 입출력 요청인, 가상화 시스템에서의 입출력 완료 처리 방법.
The method of claim 1,
The input/output request,
A method of processing I/O completion in a virtualization system, which is a preset general synchronous I/O request or asynchronous I/O request.
제1항에 있어서,
상기 제1 쓰레드 및 상기 제2 쓰레드는 상기 가상화 시스템에서 하이퍼바이저 계층에서 동작하고, 상기 호스트 커널은 상기 가상화 시스템에서 호스트 계층에서 동작하는, 가상화 시스템에서의 입출력 완료 처리 방법.
The method of claim 1,
The first thread and the second thread operate in a hypervisor layer in the virtualization system, and the host kernel operates in a host layer in the virtualization system.
제1항에 있어서,
상기 제1 쓰레드 및 상기 제2 쓰레드는 상기 가상화 시스템에서 동작하는 QEMU-KVM(Quick Emulator Kernel-Based Virtual Machine) 하이퍼바이저에 의해 동작하는, 가상화 시스템에서의 입출력 완료 처리 방법.
The method of claim 1,
The first thread and the second thread are operated by a QEMU-KVM (Quick Emulator Kernel-Based Virtual Machine) hypervisor operating in the virtualization system.
입출력 요청을 처리하는 저장 장치;
적어도 하나의 프로그램을 저장하는 메모리; 및
상기 저장 장치 및 상기 메모리와 연결된 프로세서를 포함하고,
상기 프로세서는, 상기 적어도 하나의 프로그램을 실행함으로써,
가상화 시스템에서 제1 쓰레드에 입력된 입출력 요청의 크기 정보를 제2 쓰레드에 전송하고,
호스트 커널과 연결된 상기 저장 장치에서 상기 입력된 입출력 요청이 처리되도록, 상기 입력된 입출력 요청을 상기 호스트 커널로 전송하고,
상기 입출력 요청의 크기 정보별로 미리 설정된 휴면 시간에 따라 상기 제2 쓰레드를 휴면 상태로 설정하되, 상기 입출력 요청의 크기가 기설정된 요청 크기값 이하인 경우에 미리 설정된 휴면 시간에 따라 상기 제2 쓰레드를 휴면 상태로 설정하고,
상기 설정된 휴면 시간이 만료되면 상기 제2 쓰레드를 폴링 방식으로 동작시켜 상기 입출력 요청의 완료 여부를 확인하는, 가상화 시스템에서의 입출력 완료 처리 장치.
A storage device that processes input/output requests;
A memory for storing at least one program; And
A processor connected to the storage device and the memory,
The processor, by executing the at least one program,
In the virtualization system, the size information of the input/output request input to the first thread is transmitted to the second thread,
Transmitting the input I/O request to the host kernel so that the input I/O request is processed by the storage device connected to the host kernel,
Set the second thread to sleep according to a preset sleep time according to the size information of the input/output request, but sleep the second thread according to a preset sleep time when the size of the input/output request is less than or equal to a preset request size value. Set to the state,
When the set dormant time expires, the second thread is operated in a polling method to check whether the input/output request is completed.
제10항에 있어서,
상기 프로세서는,
상기 입출력 요청이 완료된 것으로 확인되면, 상기 제2 쓰레드에 대한 폴링 방식 동작을 중단하는, 가상화 시스템에서의 입출력 완료 처리 장치.
The method of claim 10,
The processor,
When it is confirmed that the input/output request has been completed, the polling method operation for the second thread is stopped.
삭제delete 제10항에 있어서,
상기 프로세서는,
상기 입출력 요청의 크기가 기설정된 요청 크기값을 초과하면 상기 제2 쓰레드를 인터럽트 방식으로 동작시키는, 가상화 시스템에서의 입출력 완료 처리 장치.
The method of claim 10,
The processor,
When the size of the input/output request exceeds a preset request size value, the second thread is operated in an interrupt manner.
제10항에 있어서,
상기 프로세서는,
상기 호스트 커널로부터의 완료 정보가 업데이트되는 입출력 링버퍼(I/O Ring Buffer)를 주기적으로 확인하여 상기 입출력 요청의 완료 여부를 확인하는, 가상화 시스템에서의 입출력 완료 처리 장치.
The method of claim 10,
The processor,
An I/O completion processing device in a virtualization system that periodically checks an I/O Ring Buffer in which completion information from the host kernel is updated to check whether the I/O request has been completed.
제14항에 있어서,
상기 프로세서는,
상기 호스트 커널과 연결된 저장 장치에서 상기 입출력 요청의 처리가 완료되면, 상기 호스트 커널을 통해 상기 입출력 링버퍼에 상기 입출력 요청의 완료 정보를 업데이트하는, 가상화 시스템에서의 입출력 완료 처리 장치.
The method of claim 14,
The processor,
When processing of the input/output request is completed in the storage device connected to the host kernel, the input/output completion processing device in a virtualization system updates completion information of the input/output request to the input/output ring buffer through the host kernel.
제10항에 있어서,
상기 입출력 요청은,
기설정된 일반 동기 입출력 요청 또는 비동기 입출력 요청인, 가상화 시스템에서의 입출력 완료 처리 장치.
The method of claim 10,
The input/output request,
I/O completion processing device in a virtualization system, which is a preset general synchronous I/O request or asynchronous I/O request.
제10항에 있어서,
상기 제1 쓰레드 및 상기 제2 쓰레드는 상기 가상화 시스템의 하이퍼바이저 계층에서 동작하고, 상기 호스트 커널은 상기 가상화 시스템의 호스트 계층에서 동작하는, 가상화 시스템에서의 입출력 완료 처리 장치.
The method of claim 10,
The first thread and the second thread operate in a hypervisor layer of the virtualization system, and the host kernel operates in a host layer of the virtualization system.
제10항에 있어서,
상기 제1 쓰레드 및 상기 제2 쓰레드는 상기 가상화 시스템에서 동작하는 QEMU-KVM(Quick Emulator Kernel-Based Virtual Machine) 하이퍼바이저에 의해 동작하는, 가상화 시스템에서의 입출력 완료 처리 장치.
The method of claim 10,
The first thread and the second thread are operated by a QEMU-KVM (Quick Emulator Kernel-Based Virtual Machine) hypervisor operating in the virtualization system.
호스트 운영체제(Host operating system)에 의해 운영되고 호스트 커널을 포함하는 호스트;
상기 호스트 커널을 통해 요청된 입출력 요청을 처리하는 저장 장치;
상기 호스트 운영체제 위에 동작하는 게스트 운영체제(Guest operating system)에 의해 운영되는 커널 기반 가상 머신; 및
상기 가상 머신과 상기 호스트 사이에 위치하고 상기 커널 기반 가상 머신을 모니터링하는 하이퍼바이저(hypervisor)를 포함하고,
상기 하이퍼바이저는 가상화 시스템에서 제1 쓰레드에 입력된 입출력 요청의 크기 정보를 제2 쓰레드에 전송하고,
상기 입력된 입출력 요청을 호스트 커널로 전송하고,
상기 입출력 요청의 크기 정보별로 미리 설정된 휴면 시간에 따라 상기 제2 쓰레드를 휴면 상태로 설정하되, 상기 입출력 요청의 크기가 기설정된 요청 크기값 이하인 경우에 미리 설정된 휴면 시간에 따라 상기 제2 쓰레드를 휴면 상태로 설정하고,
상기 설정된 휴면 시간이 만료되면 상기 제2 쓰레드를 폴링 방식으로 동작시켜 상기 입출력 요청의 완료 여부를 확인하는, 입출력 완료 처리를 위한 가상화 시스템.
A host operated by a host operating system and including a host kernel;
A storage device that processes an input/output request requested through the host kernel;
A kernel-based virtual machine operated by a guest operating system running on the host operating system; And
And a hypervisor located between the virtual machine and the host and monitoring the kernel-based virtual machine,
The hypervisor transmits the size information of the input/output request input to the first thread in the virtualization system to the second thread,
Transmit the input I/O request to the host kernel,
Set the second thread to sleep according to a preset sleep time according to the size information of the input/output request, but sleep the second thread according to a preset sleep time when the size of the input/output request is less than or equal to a preset request size value. Set to the state,
When the set dormant time expires, the second thread is operated in a polling manner to check whether the input/output request is completed or not.
프로세서에 의해 실행 가능한 적어도 하나의 프로그램을 포함하는 비일시적 컴퓨터 판독가능 저장 매체로서, 상기 적어도 하나의 프로그램은 상기 프로세서에 의해 실행될 때, 상기 프로세서로 하여금:
가상화 시스템에서 제1 쓰레드에 입력된 입출력 요청의 크기 정보를 제2 쓰레드에 전송하고,
상기 입력된 입출력 요청을 호스트 커널로 전송하고,
상기 입출력 요청의 크기 정보별로 미리 설정된 휴면 시간에 따라 상기 제2 쓰레드를 휴면 상태로 설정하되, 상기 입출력 요청의 크기가 기설정된 요청 크기값 이하인 경우에 미리 설정된 휴면 시간에 따라 상기 제2 쓰레드를 휴면 상태로 설정하고,
상기 설정된 휴면 시간이 만료되면 상기 제2 쓰레드를 폴링 방식으로 동작시켜 상기 입출력 요청의 완료 여부를 확인하게 하는 명령어들을 포함하는, 비 일시적 컴퓨터 판독 가능한 저장 매체.
A non-transitory computer-readable storage medium comprising at least one program executable by a processor, wherein the at least one program, when executed by the processor, causes the processor to:
In the virtualization system, the size information of the input/output request input to the first thread is transmitted to the second thread
Transmit the input I/O request to the host kernel,
Set the second thread to sleep according to a preset sleep time according to the size information of the input/output request, but sleep the second thread according to a preset sleep time when the size of the input/output request is less than or equal to a preset request size value. Set to the state,
And instructions for checking whether the input/output request is completed by operating the second thread in a polling manner when the set dormancy time expires.
KR1020190127294A 2019-10-14 2019-10-14 Methods and apparatuses for processing input/output completion in virtualization system KR102240996B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020190127294A KR102240996B1 (en) 2019-10-14 2019-10-14 Methods and apparatuses for processing input/output completion in virtualization system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020190127294A KR102240996B1 (en) 2019-10-14 2019-10-14 Methods and apparatuses for processing input/output completion in virtualization system

Publications (1)

Publication Number Publication Date
KR102240996B1 true KR102240996B1 (en) 2021-04-16

Family

ID=75743413

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020190127294A KR102240996B1 (en) 2019-10-14 2019-10-14 Methods and apparatuses for processing input/output completion in virtualization system

Country Status (1)

Country Link
KR (1) KR102240996B1 (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20130131812A (en) * 2012-05-24 2013-12-04 성균관대학교산학협력단 Virtualiztion apparatus
KR20140021433A (en) * 2012-08-10 2014-02-20 삼성테크윈 주식회사 Method and apparatus for processing the message between processors
JP2018517201A (en) * 2015-04-08 2018-06-28 ティントリ・インコーポレーテッドTintri Incorporated Native storage quality of service for virtual machines

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20130131812A (en) * 2012-05-24 2013-12-04 성균관대학교산학협력단 Virtualiztion apparatus
KR20140021433A (en) * 2012-08-10 2014-02-20 삼성테크윈 주식회사 Method and apparatus for processing the message between processors
JP2018517201A (en) * 2015-04-08 2018-06-28 ティントリ・インコーポレーテッドTintri Incorporated Native storage quality of service for virtual machines

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
송용주 외 1명. 'I/O 완료 처리 방식에 따른 데이터베이스 시스템 성능 분석'. 한국정보과학회 2018 한국컴퓨터종합학술대회 논문집, 2018.06., pp.1564-1565. *
이혜지 외 2명. 'I/O 완료 처리 방식에 따른 고성능 저장장치 기반 가상화 시스템의 성능 분석'. 한국정보과학회 2018 한국소프트웨어종합학술대회 논문집, 2018.12., pp.31-33. *

Similar Documents

Publication Publication Date Title
US9864627B2 (en) Power saving operating system for virtual environment
EP1899810B1 (en) System and method to optimize os context switching by instruction group trapping
TWI656479B (en) Migrating threads between asymmetric cores in a multiple core processor
JP5434616B2 (en) Virtual machine, virtual machine monitor, and computer control method
US9619378B2 (en) Dynamically optimizing memory allocation across virtual machines
EP4050477B1 (en) Virtual machine migration techniques
US8495267B2 (en) Managing shared computer memory using multiple interrupts
US20140149768A1 (en) Virtualized application power budgeting
US9513953B2 (en) Reducing virtual machine suspension time in checkpoint system
TW201342218A (en) Providing an asymmetric multicore processor system transparently to an operating system
US9201823B2 (en) Pessimistic interrupt affinity for devices
US20110107344A1 (en) Multi-core apparatus and load balancing method thereof
CN102314377A (en) The method of accelerator and the migration of realization virtual support machine thereof
US10089266B2 (en) Power saving feature for storage subsystems
JP6072084B2 (en) Virtual computer system and data transfer control method for virtual computer system
WO2015024475A1 (en) Detection of hot pages for partition hibernation
EP4332764A1 (en) Virtual machine migration method and related apparatus
US20130318528A1 (en) Information processing method
US20120266163A1 (en) Virtual Machine Migration
US20130054860A1 (en) Optimistic interrupt affinity for devices
EP2972826B1 (en) Multi-core binary translation task processing
US20160170474A1 (en) Power-saving control system, control device, control method, and control program for server equipped with non-volatile memory
US9524189B2 (en) Information processing device, information processing method, and computer program product
KR102240996B1 (en) Methods and apparatuses for processing input/output completion in virtualization system
KR102175999B1 (en) I/o completion methods in computer system and computer systems therefor