Method, apparatus, and system for accessing storage device
Abstract
A method, an apparatus, and a system for accessing a storage device. The method includes: acquiring, by an I/O adapter, an access request from a virtual machine, where the access request carries virtual address information of a to-be-accessed storage area; generating an access instruction according to the access request, where the access instruction carries the virtual address information and an identifier of a virtual channel of the virtual machine, where the virtual channel corresponds to the virtual machine on a one-to-one basis and is used to connect the corresponding virtual machine to a storage device target, and the storage device target is configured to manage access to the storage device; and sending the access instruction to the storage device target.
Claims
exact text as granted — not AI-modifiedWhat is claimed is:
1 . A method for accessing a storage device in a computer system having a plurality of virtual machines and an I/O adapter, wherein the method comprises:
configuring, by a processor of the computer system, multiple virtual channels between the plurality of virtual machines and the I/O adapter; assigning, by the processor, each of the multiple virtual channels for a respective virtual machine of the plurality of virtual machines; and sending, by the processor, an access instruction from a virtual machine of the plurality of virtual machines to the I/O adapter through a virtual channel of the multiple virtual channels, wherein the virtual channel provides a uniquely identifiable transmission channel between the virtual machine and a storage device target.
2 . The method according to claim 1 , wherein each of the virtual machines has an identifier, each of the virtual channels has an identifier, and the method further comprises:
storing a correspondence between an identifier of a respective virtual machine of the plurality of virtual machines and an identifier of a respective virtual channel of the plurality of virtual channels.
3 . The method according to claim 1 , wherein a plurality of cache queues are configured in the I/O adapter, wherein each cache queue of the plurality of cache queues corresponds to a respective virtual channel of a respective virtual machine on a one-to-one basis; and
wherein the method further comprises: writing, by the I/O adapter, the access instruction of the virtual machine in a cache queue corresponding to the virtual channel of the virtual machine.
4 . The method according to claim 1 , wherein access requests are acquired from at least two virtual machines, and an access instruction corresponding to a high-priority virtual machine is generated before an access instruction corresponding to a low-priority virtual machine.
5 . The method according to claim 1 , wherein after sending the access instruction, the method further comprises:
receiving, by the IO adapter, a feedback message from the storage device, wherein the feedback message comprises an execution result of the access instruction and an identifier of the virtual channel of the virtual machine; determining, by the IO adapter, the virtual machine according to the identifier of the virtual channel; and sending, by the IO adapter, the execution result of the access instruction to the virtual machine.
6 . The method according to claim 5 , wherein the method further comprises:
receiving, by the I/O adapter, a first notification from the virtual machine; and acquiring, by the I/O adapter, an access request from an I/O shared ring that is shared with the virtual machine, wherein the access request is put in the I/O shared ring by the virtual machine, and the first notification indicates arrival of the access request at the I/O shared ring; and wherein sending the execution result of the access instruction to the virtual machine comprises: putting the execution result of the access instruction in the I/O shared ring that is shared with the virtual machine, and sending a second notification to the virtual machine, wherein the second notification indicates arrival of the execution result at the I/O shared ring.
7 . A computer system comprising:
a processor; an I/O adapter; and a storage device; wherein the processor is configured to:
configure multiple virtual channels between a plurality of virtual machines and the IO adapter;
assign each of the multiple virtual channels for a respective virtual machine of the plurality of virtual machines; and
send an access instruction from a virtual machine of the plurality of virtual machines to the I/O adapter through a virtual channel of the multiple virtual channels, wherein the virtual channel provides a uniquely identifiable transmission channel between the virtual machine and a storage device target.
8 . The computer system according to claim 7 , wherein each of the virtual machines has an identifier, each of the virtual channels has an identifier, and a correspondence between an identifier of a respective virtual machine of the plurality of virtual machines and an identifier of a respective virtual channel of the plurality of virtual channels is stored in the computer system.
9 . The computer system according to claim 7 , wherein a plurality of cache queues are configured in the I/O adapter, wherein each cache queue of the plurality of cache queues corresponds to a respective virtual channel of a respective virtual machine on a one-to-one basis; and
wherein the I/O adapter is configured to write the access instruction of the virtual machine in a cache queue corresponding to the virtual channel of the virtual machine.
10 . The computer system according to claim 7 , wherein the processor is further configured to:
acquire access requests from at least two virtual machines; and generate an access instruction corresponding to a high-priority virtual machine before generating an access instruction corresponding to a low-priority virtual machine.
11 . The computer system according to claim 7 , wherein the I/O adapter is configured to:
receive a feedback message from the storage device, wherein the feedback message comprises an execution result of the access instruction and an identifier of the virtual channel of the virtual machine; determine the virtual machine according to the identifier of the virtual channel; and send the execution result of the access instruction to the virtual machine.
12 . The computer system according to claim 11 , wherein the I/O adapter is further configured to:
receive a first notification from the virtual machine; acquire an access request from an I/O shared ring that is shared with the virtual machine, wherein the access request is put in the I/O shared ring by the virtual machine, and the first notification indicates arrival of the access request at the I/O shared ring; put the execution result of the access instruction in the I/O shared ring that is shared with the virtual machine, and send a second notification to the virtual machine, wherein the second notification is used to indicate arrival of the execution result at the I/O shared ring.
13 . One or more non-transitory computer-readable mediums having processor-executable instructions stored thereon for accessing a storage device in a computer system having a plurality of virtual machines and an I/O adapter, wherein the processor-executable instructions, when executed, facilitate:
configuring multiple virtual channels between the plurality of virtual machines and the 10 adapter; assigning each of the multiple virtual channels for a respective virtual machine of the plurality of virtual machines; and sending an access instruction from a virtual machine of the plurality of virtual machines to the I/O adapter through a virtual channel of the multiple virtual channels, wherein the virtual channel provides a uniquely identifiable transmission channel between the virtual machine and a storage device target.
14 . The one or more non-transitory computer-readable mediums according to claim 13 , wherein each of the virtual machines has an identifier, each of the virtual channels has an identifier, and a correspondence between an identifier of a respective virtual machine of the plurality of virtual machines and an identifier of a respective virtual channel of the plurality of virtual channels is stored in the computer system.
15 . The one or more non-transitory computer-readable mediums according to claim 13 , wherein a plurality of cache queues are configured in the I/O adapter, wherein each cache queue of the plurality of cache queues corresponds to a respective virtual channel of a respective virtual machine on a one-to-one basis; and
wherein the processor-executable instructions, when executed, further facilitate: writing the access instruction of the virtual machine in a cache queue corresponding to the virtual channel of the virtual machine.
16 . The one or more non-transitory computer-readable mediums according to claim 13 , wherein the processor-executable instructions, when executed, further facilitate:
acquiring access requests from at least two virtual machines; and generating an access instruction corresponding to a high-priority virtual machine before generating an access instruction corresponding to a low-priority virtual machine.
17 . The one or more non-transitory computer-readable mediums according to claim 13 , wherein the processor-executable instructions, when executed, further facilitate:
after the access instruction is sent, receiving a feedback message from the storage device, wherein the feedback message comprises an execution result of the access instruction and an identifier of the virtual channel of the virtual machine; determining, according to the identifier of the virtual channel, the virtual machine; and sending the execution result of the access instruction to the virtual machine.
18 . The one or more non-transitory computer-readable mediums according to claim 17 , wherein the processor-executable instructions, when executed, further facilitate:
receiving a first notification from the virtual machine; and acquiring an access request from an I/O shared ring that is shared with the virtual machine, wherein the access request is put in the I/O shared ring by the virtual machine, and the first notification indicates arrival of the access request at the I/O shared ring; and wherein sending the execution result of the access instruction to the virtual machine comprises: putting the execution result of the access instruction in the I/O shared ring that is shared with the virtual machine, and sending a second notification to the virtual machine, wherein the second notification indicates arrival of the execution result at the I/O shared ring.Join the waitlist — get patent alerts
Track US2020278880A1 — get alerts on status changes and closely related new filings.
We store only your email — no account needed. See our privacy policy.