CN106708601A - GPU-oriented virtual IO ringbuffer realization method - Google Patents

GPU-oriented virtual IO ringbuffer realization method Download PDF

Info

Publication number
CN106708601A
CN106708601A CN201611139563.4A CN201611139563A CN106708601A CN 106708601 A CN106708601 A CN 106708601A CN 201611139563 A CN201611139563 A CN 201611139563A CN 106708601 A CN106708601 A CN 106708601A
Authority
CN
China
Prior art keywords
ringbuffer
data
controls
virtual
free space
Prior art date
Legal status (The legal status 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 status listed.)
Pending
Application number
CN201611139563.4A
Other languages
Chinese (zh)
Inventor
马城城
刘晖
田泽
黎小玉
张琛
聂曌
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Xian Aeronautics Computing Technique Research Institute of AVIC
Original Assignee
Xian Aeronautics Computing Technique Research Institute of AVIC
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 Xian Aeronautics Computing Technique Research Institute of AVIC filed Critical Xian Aeronautics Computing Technique Research Institute of AVIC
Priority to CN201611139563.4A priority Critical patent/CN106708601A/en
Publication of CN106708601A publication Critical patent/CN106708601A/en
Pending legal-status Critical Current

Links

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/45562Creating, deleting, cloning virtual machine instances
    • 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

Abstract

The invention belongs to the field of software design and relates to a GPU-oriented virtual IO ringbuffer realization method. The method comprises the steps of writing to-be-stored data in a continuous space starting from a head address of a free space of a ringbuffer if the free space of the ringbuffer can store current data when the data needs to be stored in the ringbuffer, and updating write pointer information; if the free space of the ringbuffer cannot store the current data, initiating synchronization operation to ringbuffer IO control (3) by ringbuffer virtual IO control (2), and re-performing data storage operation; when a data transmission startup instruction is received, sending data information stored in the ringbuffer, and after the sending is finished, updating read pointer information in the ringbuffer IO control (3); and when the space is full of the data in the ringbuffer, actively initiating data transmission operation, and after the sending is finished, updating the read pointer information in the ringbuffer IO control (3). According to the method, ringbuffer management of virtual IO is constructed, so that the costs of the ringbuffer in data transmission and space management are reduced, the communication arbitration cost of a host interface of a GPU is reduced, and the utilization efficiency of the host interface of the GPU is improved.

Description

A kind of method of the virtual IO ringbuffer realized towards GPU
Technical field
The invention belongs to software design arts, it is related to a kind of method of the virtual IO ringbuffer realized towards GPU.
Background technology
Ringbuffer is the important component of graph command transmission in GPU designs, is responsible for the life between the GPU of main frame Order interaction, main frame and GPU interactions are general by HPI completion, and ringbuffer designs are all direct IO behaviour in disclosed data Make, frequent I/O operation is carried out when direct I/O operation causes ringbuffer data storages, performance is low and can cause HPI Frequent operation switching reduces HPI bandwidth availability ratio.
The content of the invention
Goal of the invention:
In order to solve the problems of the prior art, the present invention provides a kind of virtual IO ringbuffer realized towards GPU Method, frequently I/O operation during data storage improves ringbuffer data storage rates and HPI bandwidth availability ratio.
Technical scheme:
The technical scheme is that:
A kind of method of the virtual IO ringbuffer realized towards GPU, including:
Step 1, virtual IO controls (2) of ringbuffer interfaces (1) initialization ringbuffer and ringbuffer IO controls All information that system (3) is included;All information include:The ringbuffer IO controls read pointer of (3), write pointer, Ringbuffer sizes, data transfer start control;The free space first address of virtual IO controls (2) of ringbuffer and free time Space size;The free space first address of virtual IO controls (2) of ringbuffer refers to ringbuffer IO controls (3) The free space first address of middle ringbuffer;The free space size of virtual IO controls (2) of the ringbuffer refers to The free space size of ringbuffer in ringbuffer IO controls (3);
Step 2, when there is data to need storage on ringbuffer, first determine whether the virtual IO controls of ringbuffer (2) whether the free space size of the ringbuffer described in can store current data, if can if directly will be to be stored In the continuous space that the free space first address of data write-in ringbuffer starts, updated after the completion of data storage Write pointer information in ringbuffer IO controls (3);If cannot if ringbuffer virtual IO controls (2) to Ringbuffer IO controls (3) initiate simultaneously operating, update virtual IO controls (2) information of ringbuffer, re-start data Storage operation;
Step 3, when receiving data transfer and starting order, send in ringbuffer IO control (3) on ringbuffer The data message of storage, updates the read pointer information in ringbuffer IO controls (3) after being sent completely;Work as ringbuffer In data storage full space when, actively initiates data transfer operation, renewal ringbuffer IO control (3) after being sent completely In read pointer information.
In ringbuffer IO controls (3):
Read pointer:Represent address or address mark that current ringbuffer data-movings arrive;
Write pointer:Represent address or the address mark of current ringbuffer data storages;
Ringbuffer sizes:Ringbuffer spaces total size;
Data transfer starts:Transmission for controlling currently stored data in ringbuffer, passively log-on data can pass Defeated operation, also can the transmission operation of active log-on data.
Beneficial effect:
It is an advantage of the invention that:The invention provides a kind of method of the virtual IO ringbuffer realized towards GPU, By setting up virtual I/O operation mode, ringbuffer software and hardware synchronization times are reduced, especially in ringbuffer frequently During I/O operation, ringbuffer data storage rates and HPI bandwidth availability ratio are greatly improved.
Brief description of the drawings
Fig. 1 is a kind of method schematic diagram of the virtual IO ringbuffer realized towards GPU.
Specific embodiment
The present invention is described further with reference to the accompanying drawings and examples:
A kind of method of the virtual IO ringbuffer realized towards GPU, as shown in figure 1, including:
Step 1, virtual IO controls (2) of ringbuffer interfaces (1) initialization ringbuffer and ringbuffer IO controls All information that system (3) is included;All information include:The ringbuffer IO controls read pointer of (3), write pointer, Ringbuffer sizes, data transfer start control;The free space first address of virtual IO controls (2) of ringbuffer and free time Space size;The free space first address of virtual IO controls (2) of ringbuffer refers to ringbuffer IO controls (3) The free space first address of middle ringbuffer;The free space size of virtual IO controls (2) of the ringbuffer refers to The free space size of ringbuffer in ringbuffer IO controls (3);
Step 2, when there is data to need storage on ringbuffer, first determine whether the virtual IO controls of ringbuffer (2) whether the free space size of the ringbuffer described in can store current data, if can if directly will be to be stored In the continuous space that the free space first address of data write-in ringbuffer starts, updated after the completion of data storage Write pointer information in ringbuffer IO controls (3);If cannot if ringbuffer virtual IO controls (2) to Ringbuffer IO controls (3) initiate simultaneously operating, update virtual IO controls (2) information of ringbuffer, re-start data Storage operation;
Step 3, when receiving data transfer and starting order, send in ringbuffer IO control (3) on ringbuffer The data message of storage, updates the read pointer information in ringbuffer IO controls (3) after being sent completely;Work as ringbuffer In data storage full space when, actively initiates data transfer operation, renewal ringbuffer IO control (3) after being sent completely In read pointer information.
In ringbuffer IO controls (3):
Read pointer:Represent address or address mark that current ringbuffer data-movings arrive;
Write pointer:Represent address or the address mark of current ringbuffer data storages;
Ringbuffer sizes:Ringbuffer spaces total size;
Data transfer starts:Transmission for controlling currently stored data in ringbuffer, passively log-on data can pass Defeated operation, also can the transmission operation of active log-on data.

Claims (2)

1. it is a kind of towards GPU realize virtual IO ringbuffer method, it is characterised in that including:
Step 1, virtual IO controls (2) of ringbuffer interfaces (1) initialization ringbuffer and ringbuffer IO controls (3) all information for being included;All information include:The ringbuffer IO controls read pointer of (3), write pointer, Ringbuffer sizes, data transfer start control;The free space first address of virtual IO controls (2) of ringbuffer and free time Space size;The free space first address of virtual IO controls (2) of ringbuffer refers to ringbuffer IO controls (3) The free space first address of middle ringbuffer;The free space size of virtual IO controls (2) of the ringbuffer refers to The free space size of ringbuffer in ringbuffer IO controls (3);
Step 2, when there is data to need storage on ringbuffer, in first determining whether virtual IO controls (2) of ringbuffer Whether the free space size of the ringbuffer of record can store current data, if can if directly data to be stored are write Enter in the continuous space that the free space first address of ringbuffer starts, ringbuffer IO are updated after the completion of data storage Write pointer information in control (3);If cannot if ringbuffer virtual IO controls (2) control (3) to ringbuffer IO Simultaneously operating is initiated, virtual IO controls (2) information of ringbuffer is updated, data storage operations are re-started;
Step 3, when receiving data transfer and starting order, send in ringbuffer IO control (3) and stored on ringbuffer Data message, the read pointer information in ringbuffer IO control (3) is updated after being sent completely;When in ringbuffer When data storage expires space, data transfer operation is actively initiated, after being sent completely in renewal ringbuffer IO controls (3) Read pointer information.
2. the method for a kind of virtual IO ringbuffer realized towards GPU as claimed in claim 1, it is characterised in that
In ringbuffer IO controls (3):
Read pointer:Represent address or address mark that current ringbuffer data-movings arrive;
Write pointer:Represent address or the address mark of current ringbuffer data storages;
Ringbuffer sizes:Ringbuffer spaces total size;
Data transfer starts:Transmission for controlling currently stored data in ringbuffer, passively can grasp in log-on data transmission Make, also can the transmission operation of active log-on data.
CN201611139563.4A 2016-12-12 2016-12-12 GPU-oriented virtual IO ringbuffer realization method Pending CN106708601A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201611139563.4A CN106708601A (en) 2016-12-12 2016-12-12 GPU-oriented virtual IO ringbuffer realization method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201611139563.4A CN106708601A (en) 2016-12-12 2016-12-12 GPU-oriented virtual IO ringbuffer realization method

Publications (1)

Publication Number Publication Date
CN106708601A true CN106708601A (en) 2017-05-24

Family

ID=58937195

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201611139563.4A Pending CN106708601A (en) 2016-12-12 2016-12-12 GPU-oriented virtual IO ringbuffer realization method

Country Status (1)

Country Link
CN (1) CN106708601A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107908428A (en) * 2017-11-24 2018-04-13 中国航空工业集团公司西安航空计算技术研究所 A kind of frame, the GPU graphics command buffer synchronisation methods of page synchronization
CN110888737A (en) * 2019-11-18 2020-03-17 中国航空工业集团公司西安航空计算技术研究所 Ringbuffer implementation system and method supporting multiple GPUs

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1540523A (en) * 2003-10-30 2004-10-27 中兴通讯股份有限公司 Quick method for reading/writing buffer in single task
US20070091101A1 (en) * 2005-10-26 2007-04-26 Via Technologies, Inc Graphics Input Command Stream Scheduling Method and Apparatus
CN102037453A (en) * 2008-04-01 2011-04-27 苹果公司 Central DMA with arbitrary processing functions
CN102521179A (en) * 2011-11-28 2012-06-27 曙光信息产业股份有限公司 Achieving device and achieving method of direct memory access (DMA) reading operation

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1540523A (en) * 2003-10-30 2004-10-27 中兴通讯股份有限公司 Quick method for reading/writing buffer in single task
US20070091101A1 (en) * 2005-10-26 2007-04-26 Via Technologies, Inc Graphics Input Command Stream Scheduling Method and Apparatus
CN102037453A (en) * 2008-04-01 2011-04-27 苹果公司 Central DMA with arbitrary processing functions
CN102521179A (en) * 2011-11-28 2012-06-27 曙光信息产业股份有限公司 Achieving device and achieving method of direct memory access (DMA) reading operation

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
王海清: "嵌入式GPU硬件加速渲染的纹理传输优化及预取策略研究", 《中国优秀硕士学位论文全文数据库 信息科技辑》 *

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107908428A (en) * 2017-11-24 2018-04-13 中国航空工业集团公司西安航空计算技术研究所 A kind of frame, the GPU graphics command buffer synchronisation methods of page synchronization
CN107908428B (en) * 2017-11-24 2021-09-14 中国航空工业集团公司西安航空计算技术研究所 Frame and page synchronous GPU (graphics processing Unit) graphics instruction buffer synchronization method
CN110888737A (en) * 2019-11-18 2020-03-17 中国航空工业集团公司西安航空计算技术研究所 Ringbuffer implementation system and method supporting multiple GPUs

Similar Documents

Publication Publication Date Title
US9110669B2 (en) Power management of a storage device including multiple processing cores
US20060174156A1 (en) Cache redundancy for lsi raid controllers
US7380090B2 (en) Storage device and control method for the same
CN110970078B (en) Method for fast boot reading
US20140019496A1 (en) Data transfer method
US8078815B2 (en) Power-saving-backup management method
CN104881248B (en) The adaptive directly IO accelerated methods towards in the file system of SSD
JP2010152853A (en) Data storage device
TWI712951B (en) Task management method, host and storage device for electronic storage device
US20170010992A1 (en) Power saving feature for storage subsystems
US9898413B2 (en) Auto-adaptive system to implement partial write buffering for storage systems dynamic caching method and system for data storage system
CN114125077B (en) Method and device for realizing multi-executive TCP session normalization
US20090240839A1 (en) Data storage device
JP2012063817A (en) Communication device
CN107957852A (en) A kind of method for lifting solid state hard disc consistency of performance
CN106708601A (en) GPU-oriented virtual IO ringbuffer realization method
US11966585B2 (en) Storage device and storage system
KR20180049340A (en) Storage device and link state control method thereof
CN102622286B (en) A kind of raid-array bitmap backup method and system
EP4044015A1 (en) Data processing method and apparatus
CN107908428B (en) Frame and page synchronous GPU (graphics processing Unit) graphics instruction buffer synchronization method
US20200226085A1 (en) Data processing system
US20120023350A1 (en) Method for active power management in a serial ata interface
US20140149535A1 (en) Method for transmitting data and mobile storage apparatus using the same
CN101727399A (en) Storage device and data exchange system using same

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20170524

RJ01 Rejection of invention patent application after publication