TECHNICAL FIELD
[0001] The present invention relates to the field of information technologies, and in particular,
to a computer device and a method for reading/writing data by a computer device.
BACKGROUND
[0002] With development of data centers and approaching of the era of big data, a data center
architecture has developed into a virtualization-technology-centered architecture
from a tightly coupled siloed server architecture. To adapt to the current era of
big data, an existing data center is faced with a series of challenges in future big
data processing, and the challenges include P bits/second real-time data processing,
dynamic resource allocation and adjustment on demand, energy efficiency improvement
of a large-scale system, or the like. In this case, a high-throughput computer data
center with features such as resource pooling, hardware decoupling, and silicon photonic
interconnection comes into being.
[0003] In an architecture of a high-throughput computer data center, resource pooling of
memory resources, input/output resources, or the like is implemented. A high-throughput
computing node is connected to a memory resource pool or an input/output resource
pool by using a network, to dynamically allocate and adjust resources and improve
system energy efficiency. Due to resource pooling, hardware decoupling makes an interconnect
technology, for example, silicon photonic interconnection, become a most crucial technology.
A current data center level interconnect technology relies mainly on an Ethernet interconnect
technology. However, due to a complex and bloated protocol stack and an extremely
high interconnect delay of the Ethernet itself, the interconnect technology becomes
less capable of meeting a requirement of a data center on quick and high-capacity
data exchange, while a simplified resource pooling-centered interconnect and access
protocol (PRAP, Pooled Resource Access Protocol) that can provide high bandwidth and
a low delay can meet a requirement of a high-throughput computer data center on low
delay.
[0004] In a current method for decoupling a built high-throughput computer, a cloud controller
(Cloud Controller) is used as a key module for interconnection, the PRAP interconnect
protocol is used to connect a computing pool, a remote storage (memory) resource pool,
an input/output (I/O) resource pool, and the like, and a double data rate (DDR, Double
Data Rate) interface is used to connect to a central processing unit CPU. However,
when data in the remote memory resource pool or input/output resource pool needs to
be read, due to a network delay, the cloud controller cannot return required data
at the DDR interface within a specified time. Therefore, when a CPU of a high-throughput
computer accesses the remote memory resource pool or input/output resource pool by
using a network, an interrupt of the CPU is caused, leading to a high access delay
and a problem that overall performance of a system is affected because the CPU cannot
perform another operation during the interrupt.
[0005] Document
CN 104 704 470 discloses a cloud storage infrastructure, the storage nodes being managed by the
cloud controller accessible by clients via a network. Documents
US 2012/066449 and
US 8 874 836 both disclosing the use of queues for scheduling I/O operations to directly attached
storage devices.
SUMMARY
[0006] The present invention provides a computer device and a method for reading/writing
data by a computer device, so as to resolve a prior-art problem that system performance
is affected because a high delay is caused when a CPU of a computer device reads/writes
remote data. To achieve the foregoing objective, as a first aspect the present invention
provides a computer device, including a central processing unit CPU and a cloud controller,
where the cloud controller includes a transmission queue module, a response queue
module, a double data rate DDR interface, and a network interface, the DDR interface
is configured to connect the CPU to the cloud controller, and the network interface
is configured to connect the cloud controller to a network device;
the CPU is configured to: after generating a request for performing a read/write operation
on the network device, convert the read/write operation request into a control command,
and write the control command into the transmission queue module, where the control
command is used to instruct the cloud controller to perform a read operation or a
write operation on the network device, and the control command carries operation information
of the read operation or the write operation; and
the cloud controller is configured to: when the control command in the transmission
queue module is triggered, perform the read operation or the write operation on the
network device according to the operation information in the control command, receive
a response message sent by the network device, and write the response message sent
by the network device into the response queue module.
[0007] With reference to the first aspect, in a first possible implementation the read/write
operation request is a read operation request;
the transmission queue module includes a command transmission queue module and a data
transmission queue module;
the response queue module includes a response command queue module and a data receiving
queue module;
the CPU is specifically configured to: convert the read operation request into a read
control command, and write the read control command into the command transmission
queue module, where the read control command carries read operation information and
is used to instruct the cloud controller to perform a read operation on the network
device according to the read operation information; and
the cloud controller is specifically configured to: when the read control command
in the command transmission queue module is triggered, perform the read operation
on the network device according to the read operation information in the read control
command, receive a read response message sent by the network device, write the read
response message sent by the network device into the response command queue module,
and write, into the data receiving queue module, data that is to be read by means
of the read operation and that is returned by the network device.
[0008] With reference to the first possible implementation of the first aspect, in a second
possible implementation the read operation information includes an address, in the
network device, of the data to be read by means of the read operation and a length
of the data to be read by means of the read operation; or
the read operation information includes a node address and an offset address, in the
network device, of the data to be read by means of the read operation and a length
of the data to be read by means of the read operation.
[0009] With reference to the first possible implementation or the second possible implementation
of the first aspect, in a third possible implementation
the CPU is further configured to: after writing the read control command into the
command transmission queue module, query, in a polling manner, whether the read response
message sent by the network device exists in the response command queue module, and
when the CPU determines that the read response message sent by the network device
exists in the response command queue module and the read response message is a read
success response message, read, from the data receiving queue module, the data to
be read by means of the read operation.
[0010] With reference to the first possible implementation or the second possible implementation,
in a fourth possible implementation
the cloud controller is further configured to: determine whether the read response
message sent by the network device exists in the response command queue module, and
notify the CPU by means of an interrupt when the read response message sent by the
network device exists in the response command queue module; and
the CPU is further configured to: receive an interrupt message sent by the cloud controller,
obtain the read response message from the response command queue module according
to the interrupt message, and when the obtained read response message indicates a
read success, read, from the data receiving queue module, the data to be read by means
of the read operation.
[0011] With reference to the first aspect, in a fifth possible implementation
the read/write operation request is a write operation request;
the transmission queue module includes a command transmission queue module and a data
transmission queue module;
the response queue module includes a response command queue module and a data receiving
queue module;
the CPU is specifically configured to: convert the write operation request into a
write control command, write the write control command into the command transmission
queue module, and write, into the data transmission queue module, data to be written
by means of the write operation, where the write control command carries write operation
information and is used to instruct the cloud controller to write, into the network
device according to the write operation information, the data to be written by means
of the write operation; and
the cloud controller is specifically configured to: when the write control command
in the command transmission queue module is triggered, extract, from the data transmission
queue module according to the write operation information in the write control command,
the data to be written by means of the write operation, and write, into the network
device, the data to be written by means of the write operation; and when receiving
a write response message sent by the network device, write the write response message
sent by the network device into the response command queue module.
[0012] With reference to the fifth possible implementation of the first aspect, in a sixth
possible implementation
the write operation information includes an address of the network device, a length
of the data to be written by means of the write operation, and an address, in the
data transmission queue module, of the data to be written by means of the write operation;
or
the write operation information includes a node address and an offset address of the
network device, a length of the data to be written by means of the write operation,
and an address, in the data transmission queue module, of the data to be written by
means of the write operation.
[0013] With reference to the fifth possible implementation or the sixth possible implementation
of the first aspect, in a seventh possible implementation
the CPU is further configured to: after writing the write control command into the
command transmission queue module, query, in a polling manner, whether the write response
message sent by the network device exists in the response command queue module, and
when the CPU determines that the write response message sent by the network device
exists in the response command queue module, obtain the write response message.
[0014] With reference to the fifth possible implementation or the sixth possible implementation
of the first aspect, in an eighth possible implementation
the cloud controller is further configured to: determine whether the write response
message sent by the network device exists in the response command queue module, and
notify the CPU by means of an interrupt when the write response message sent by the
network device exists in the response command queue module; and
the CPU is further configured to: receive an interrupt message sent by the cloud controller,
and obtain the write response message from the response command queue module according
to the interrupt message.
[0015] A second aspect of the present invention further provides a method for reading/writing
data by a computer device, where the computer device includes a central processing
unit CPU, a cloud controller, and a network interface, the CPU is connected to the
cloud controller by using a double data rate DDR interface, and the network interface
is configured to connect the cloud controller to a network device; and the method
includes:
converting, by the CPU, a request for performing a read/write operation on the network
device into a control command, and writing the control command into a transmission
queue module of the cloud controller, where the control command is used to instruct
the cloud controller to perform a read operation or a write operation on the network
device, and the control command carries operation information of the read operation
or the write operation; and
performing, by the cloud controller, the read operation or the write operation on
the network device according to the operation information in the control command when
the control command in the transmission queue module is triggered, and writing a response
message sent by the network device into a response queue module of the cloud controller
when receiving the response message sent by the network device.
[0016] With reference to the second aspect, in a first possible implementation of the second
aspect
the read/write operation request is a read operation request;
correspondingly, the converting, by the CPU, a request for performing a read/write
operation on the network device into a control command, and writing the control command
into a transmission queue module of the cloud controller includes:
converting, by the CPU, the read operation request into a read control command, and
writing the read control command into a command transmission queue module of the transmission
queue module, where the read control command carries read operation information and
is used to instruct the cloud controller to perform a read operation on the network
device according to the read operation information; and
the performing, by the cloud controller, the read operation or the write operation
on the network device according to the operation information in the control command,
and writing a response message sent by the network device into a response queue module
of the cloud controller when receiving the response message sent by the network device
includes:
performing, by the cloud controller, the read operation on the network device according
to the read operation information in the read control command when the read control
command in the command transmission queue module is triggered, receiving a read response
message sent by the network device, writing the read response message sent by the
network device into the response command queue module of the response queue module,
and writing, into the data receiving queue module of the response queue module, data
that is to be read by means of the read operation and that is returned by the network
device.
[0017] With reference to the first possible implementation of the second aspect, in a second
possible implementation
the read operation information includes an address, in the network device, of the
data to be read by means of the read operation and a length of the data to be read
by means of the read operation; or
the read operation information includes a node address and an offset address, in the
network device, of the data to be read by means of the read operation and a length
of the data to be read by means of the read operation.
[0018] With reference to the first possible implementation or the second possible implementation
of the second aspect, in a third possible implementation
after writing the read control command into the command transmission queue module,
querying, by the CPU in a polling manner, whether the read response message sent by
the network device exists in the response command queue module, and when the CPU determines
that the read response message sent by the network device exists in the response command
queue module and the read response message is a read success response message, reading,
from the data receiving queue module, the data to be read by means of the read operation.
[0019] With reference to the first possible implementation or the second possible implementation
of the second aspect, in a fourth possible implementation
determining, by the cloud controller, whether the read response message sent by the
network device exists in the response command queue module, and notifying the CPU
by means of an interrupt when the read response message sent by the network device
exists in the response command queue module; and
receiving, by the CPU, an interrupt message sent by the cloud controller, obtaining
the read response message from the response command queue module according to the
interrupt message, and when the obtained read response message indicates a read success,
reading, from the data receiving queue module, the data to be read by means of the
read operation.
[0020] With reference to the second aspect, in a fifth possible implementation
the read/write operation request is a write operation request;
correspondingly, the converting, by the CPU, a request for performing a read/write
operation on the network device into a control command, and writing the control command
into a transmission queue module of the cloud controller includes:
converting, by the CPU, the write operation request into a write control command,
writing the write control command into the command transmission queue module of the
transmission queue module, and writing, into the data transmission queue module of
the transmission queue module, data to be written by means of the write operation,
where the write control command carries write operation information and is used to
instruct the cloud controller to write, into the network device according to the write
operation information, the data to be written by means of the write operation; and
the performing, by the cloud controller, the read operation or the write operation
on the network device according to the operation information in the control command,
and writing a response message sent by the network device into a response queue module
of the cloud controller when receiving the response message sent by the network device
includes:
when the write control command in the command transmission queue module is triggered,
extracting, by the cloud controller from the data transmission queue module according
to the write operation information in the write control command, the data to be written
by means of the write operation, and writing, into the network device, the data to
be written by means of the write operation; and when receiving a write response message
sent by the network device, writing the write response message sent by the network
device into the response command queue module of the response queue module.
[0021] With reference to the fifth possible implementation of the second aspect, in a sixth
possible implementation
the write operation information includes an address of the network device, a length
of the data to be written by means of the write operation, and an address, in the
data transmission queue module, of the data to be written by means of the write operation;
or
the write operation information includes a node address and an offset address of the
network device, a length of the data to be written by means of the write operation,
and an address, in the data transmission queue module, of the data to be written by
means of the write operation.
[0022] With reference to the fifth possible implementation or the sixth possible implementation
of the second aspect, in a seventh possible implementation the method further includes:
after writing the write control command into the command transmission queue module,
querying, by the CPU in a polling manner, whether the write response message sent
by the network device exists in the response command queue module, and when the CPU
determines that the write response message sent by the network device exists in the
response command queue module, obtaining the write response message.
[0023] With reference to the fifth possible implementation or the sixth possible implementation
of the second aspect, in an eighth possible implementation the method further includes:
determining, by the cloud controller, whether the write response message sent by the
network device exists in the response command queue module, and notifying the CPU
by means of an interrupt when the write response message sent by the network device
exists in the response command queue module; and
receiving, by the CPU, an interrupt message sent by the cloud controller, and obtaining
the write response message from the response command queue module according to the
interrupt message.
[0024] According to the computer device and the method for reading/writing data by a computer
device that are provided by the present invention, a CPU of the computer device is
connected to a cloud controller by using a DDR interface, and an interrupt is avoided
because the DDR interface has a high data transmission rate. In addition, the CPU
converts a read/write operation request into a control command and writes the control
command into a transmission queue module of the cloud controller. Because the cloud
controller performs a read operation or a write operation on a network device according
to operation information in the control command, after writing the control command
into the transmission queue module, the CPU does not need to wait for an operation
performed by the cloud controller and can continue to perform other service processing,
for example, continue to write another control command. This avoids a waste of CPU
resources, and improves CPU utilization and overall performance of a system.
BRIEF DESCRIPTION OF DRAWINGS
[0025] The following clearly and completely describes the technical solutions of the present
invention with reference to the accompanying drawings showing preferred embodiments
of the present invention.
FIG. 1 is a schematic architecture diagram of a specific implementation of a high-throughput
computer data center in the prior art;
FIG. 2 is a schematic structural diagram of a computer device according to an embodiment
of the present invention;
FIG. 3 is a schematic structural diagram of a specific implementation of a computer
device according to an embodiment of the present invention;
FIG. 4 is a schematic structural diagram of reading/writing remote data by a computer
device according to an embodiment of the present invention; and
FIG. 5 is a schematic flowchart of a method for reading/writing data by a computer
device according to an embodiment of the present invention.
DESCRIPTION OF EMBODIMENTS
[0026] The following clearly and completely describes the technical solutions of the present
invention with reference to the accompanying drawings showing preferred embodiments
of the present invention.
[0027] FIG. 1 is a schematic architecture diagram of a specific implementation of a high-throughput
computer data center in the prior art. A computer device includes a central processing
unit, a memory, and a cloud controller. The cloud controller is connected to a remote
resource pool by using a network. The remote resource pool includes storage resources,
input/output resources, or the like. The storage resources, for example, a dynamic
random access memory (DRAM, Dynamic Random Access Memory) and a non-volatile memory
(NVM, Non-Volatile Memory), form a storage resource pool. The input/output resources,
for example, a network adapter and a Peripheral Component Interconnect Express PCIe
interface, form an input/output resource pool. It should be noted that FIG. 1 shows
merely an example of a structural diagram of a high-throughput computer data center.
During specific implementation, another hardware resource (for example, a bus), another
resource pool (for example, a computing resource pool), or the like may be further
included. In addition, in a computer device, multiple central processing units and
multiple memories may form a computing resource pool or the like. Moreover, a quantity
of resources in the resource pool shown in FIG. 1 is used as an example. During specific
implementation, at least two resources may be included, for example, a memory resource
pool may include at least two memories.
[0028] In the example shown in FIG. 1, in addition to a local memory (for example, a dynamic
random access memory DRAM using a DDR interface), a CPU in the computer device also
has a remote storage space allocated by a system. Each physical storage space is mapped
to a global address space. A mapping relationship of the address space is stored in
a driver of a cloud controller corresponding to each CPU. For example, a CPU 1 has
a 10 GB local memory and a 100 GB remote storage resource (that is, storage spaces
in the storage resource pool that are connected by using a network and can be accessed)
in total. Assuming that the CPU 1 can access a remote storage resource pool including
a storage space A and a storage space B, and the storage space A and the storage space
B each are a storage resource with a capacity of 50 GB, the CPU 1 can access a 110
GB storage space in total: a storage space of 0 to 10 GB in the local memory and a
storage space of 10 GB to 110 GB in the remote storage resource pool.
[0029] When the CPU 1 accesses the local memory, data can be accessed within a specified
time because network transmission is not required. However, when data is not in the
local memory, but in the remote storage resource pool, for example, in the storage
space A or the storage space B, a cloud controller 1 can read the data only by accessing
the remote storage resource pool by using a network. Because network transmission
is required, the cloud controller 1 cannot return the required data to the CPU 1 at
a DDR interface within a specified time. Therefore, after receiving a data read request
delivered by the CPU 1, the cloud controller 1 packs the request, sends the request
to the storage resource pool by using the network, to obtain data, and returns an
ECC error or a PAGE error to the CPU 1. When receiving error information sent by the
cloud controller 1, the CPU 1 interrupts current memory access and suspends a corresponding
access thread. After receiving the data sent from the storage resource pool, the cloud
controller 1 generates an interrupt signal to notify the CPU 1. The CPU 1 can obtain,
according to the received interrupt signal and only by resending a memory reading
request, the data that needs to be read. Because the data has been written into a
storage space of the cloud controller 1 at this time, the CPU 1 can obtain the data
at the DDR interface within a specified time. Therefore, when data that needs to be
accessed by the CPU 1 is not inside the cloud controller 1, the CPU 1 needs to perform
one interrupt operation and two read operations. As a result, a high access delay
is caused, and overall performance of a system is affected because the CPU 1 cannot
perform another operation during the interruption.
[0030] To resolve problems of an excessively high access delay and low system performance
that are caused by a network delay when a CPU in the foregoing high-throughput computer
data center accesses data that is not in a local resource, an embodiment of the present
invention provides a computer device 10. As shown in FIG. 2, the computer device 10
includes a central processing unit CPU 100 and a cloud controller 200. The cloud controller
200 includes a transmission queue module 201, a response queue module 202, a double
data rate DDR interface 203, and a network interface 204. The DDR interface 203 is
configured to connect the CPU 100 to the cloud controller 200, and the network interface
204 is configured to connect the cloud controller 200 to a network device.
[0031] The CPU 100 is configured to: after generating a request for performing a read/write
operation on the network device, convert the read/write operation request into a control
command, and write the control command into the transmission queue module 201. The
control command is used to instruct the cloud controller 200 to perform a read operation
or a write operation on the network device, and the control command carries operation
information of the read operation or the write operation.
[0032] The cloud controller 200 is configured to: when the control command in the transmission
queue module 201 is triggered, perform the read operation or the write operation on
the network device according to the operation information in the control command,
receive a response message sent by the network device, and write the response message
sent by the network device into the response queue module 202.
[0033] In this embodiment of the present invention, the network device connected to the
computer device 10 by using the network interface 204 is a device connected to the
computer device 10 by using a network. When the CPU 100 needs to access data in the
network device, the cloud controller 200 needs to send a data read/write message to
the network device by using the network, and receives a response message or data returned
by the network device by using the network. The CPU 100 is connected to the cloud
controller 200 by using the DDR interface 203, and an interrupt is avoided because
the DDR interface 203 has a high data transmission rate. In addition, the CPU 100
converts a read/write operation request into a control command and writes the control
command into the transmission queue module 201 of the cloud controller 200. Because
the cloud controller 200 performs the read operation or the write operation on the
network device according to operation information in the control command, after writing
the control command into the transmission queue module 201, the CPU 100 does not need
to wait for an operation performed by the cloud controller 200, and can continue to
perform other service processing, for example, continue to write another control command.
This avoids a waste of CPU 100 resources, and improves CPU 100 utilization and overall
performance of the computer device.
[0034] During specific implementation, the transmission queue module 201 and the response
queue module 202 of the cloud controller 200 may be implemented by hardware such as
a register or a memory, and are connected to the DDR interface and the like by using
a hardware interface. For example, the transmission queue module 201 stores, by using
hardware such as a register, a control command written by the CPU 100, and the response
queue module 202 stores a response message by using hardware such as a register. In
addition, the transmission queue module 201 and the response queue module 202 store
related commands or messages in an ordered arrangement manner such as in a queue form,
so that the cloud controller 200 can read commands or write response messages in a
queue form. In this embodiment of the present invention, that the control command
in the transmission queue module 201 is triggered may be that when the control command
is written into the transmission queue module 201, the cloud controller 200 is triggered
to extract the control command from the transmission queue module 201 and execute
the control command. Specifically, a control unit or a control module of the cloud
controller 200 may extract the control command from the transmission queue module
201 and execute the control command. The control unit or the control module of the
cloud controller 200 is also a hardware control component, and is connected to the
transmission queue module 201, the response queue module 202, or the network interface
204 by using an interface.
[0035] When the read/write operation request is a read operation request, as shown in FIG.
3,
the transmission queue module 201 includes a command transmission queue module 2011
and a data transmission queue module 2012;
the response queue module 202 includes a response command queue module 2021 and a
data receiving queue module 2022;
the CPU 100 is specifically configured to: convert the read operation request into
a read control command, and write the read control command into the command transmission
queue module 2011, where the read control command carries read operation information
and is used to instruct the cloud controller 200 to perform a read operation on the
network device according to the read operation information; and
the cloud controller 200 is specifically configured to: when the read control command
in the command transmission queue module 2011 is triggered, perform the read operation
on the network device according to the read operation information in the read control
command, receive a read response message sent by the network device, write the read
response message sent by the network device into the response command queue module
2021, and write, into the data receiving queue module 2022, data that is to be read
by means of the read operation and that is returned by the network device.
[0036] Specifically, the converting the read operation request into a read control command,
and writing the read control command into the command transmission queue module 2011
is implemented by a driver that runs in the CPU 100.
[0037] That the read control command in the command transmission queue module 2011 is triggered
may be that when the read control command is written into the command transmission
queue module 2011, the cloud controller is triggered to extract the read control command
from the command transmission queue module 2011. During specific implementation, a
control unit or a control module of the cloud controller may extract the read control
command from the command transmission queue module 2011 when the read control command
is written into the command transmission queue module 2011, and execute the read control
command.
[0038] The read operation information may include an address, in the network device, of
the data to be read by means of the read operation and a length of the data to be
read by means of the read operation; or
the read operation information includes a node address and an offset address, in the
network device, of the data to be read by means of the read operation and a length
of the data to be read by means of the read operation.
[0039] Optionally, the performing, by the cloud controller 200, the read operation on the
network device according to the read operation information in the read control command
may include: creating a communications packet by using the address, in the network
device, of the data to be read by means of the read operation and the length of the
data to be read by means of the read operation, and sending the communications packet
to the network device by using a network; or creating, by the cloud controller 200,
a communications packet by using the node address and the offset address, in the network
device, of the data to be read by means of the read operation and the length of the
data to be read by means of the read operation, and sending the communications packet
to the network device by using a network. Specifically, the communications packet
may be a PRAP data packet.
[0040] After converting the read operation request into the read control command and writing
the read control command into the command transmission queue module 2011, the CPU
100 may perform another operation, for example, continue to write another read control
command or write control command. The cloud controller 200 may extract the read control
command from the command transmission queue module 2011 when the read control command
is written into the command transmission queue module 2011, execute the read control
command, write a result of executing the read control command into the response command
queue module 2021, and when obtaining data that is read, write the read data into
the data receiving queue module 2022. In this way, a read operation request is converted
into two processes of writing a read control command by the CPU 100 and executing
the read control command by the cloud controller 200. The CPU 100 can execute another
task with no need to wait for a result of performing a read operation by the cloud
controller 200, and only needs to obtain a read operation result when a read operation
response command is written into the response command queue module 2021. This avoids
an interrupt caused because the CPU 100 waits for a read operation result for an excessively
long time, and improves resource utilization of the CPU 100 and overall performance
of a system.
[0041] In this embodiment of the present invention, the CPU 100 may obtain the read operation
result by querying in a polling manner or by being notified by means of an interrupt.
For example, after writing the read control command into the command transmission
queue module, the CPU 100 queries, in a polling manner, whether the read response
message sent by the network device exists in the response command queue module 2021,
that is, repeatedly queries, according to a preset time interval, whether the read
response message sent by the network device exists in the response command queue module
2021. When determining that the read response message sent by the network device exists
in the response command queue module 2021, the CPU 100 obtains the response message
in the response command queue module 2021. When the read response message is a read
success response message, the CPU 100 reads, from the data receiving queue module
2022, the data to be read by means of the read operation.
[0042] The obtaining the read operation result by being notified by means of an interrupt
includes: determining, by the cloud controller 200, whether the read response message
sent by the network device exists in the response command queue module 2021, and notifying
the CPU 100 by means of an interrupt when the read response message sent by the network
device exists in the response command queue module 2021. Specifically, the response
command queue module 2021 may notify the CPU 100 by means of an interrupt when the
read response message is written into the response command queue module 2021.
[0043] The CPU 100 receives an interrupt message sent by the cloud controller 200, obtains
the read response message from the response command queue module 2021 according to
the interrupt message, and when the obtained read response message indicates a read
success, reads, from the data receiving queue module 2022, the data to be read by
means of the read operation. During specific implementation, the CPU 100 may write
a polling-based query manner or an interrupt-based notification manner into a register
of the cloud controller 200. The cloud controller 200 obtains, from the register,
information written by the CPU 100. If the polling-based query manner is written into
the register, the CPU 100 proactively queries, in a polling manner, the response command
queue module 2021; if the interrupt-based notification manner is written into the
register, the cloud controller 200 notifies the CPU 100 by means of an interrupt when
the read response message is written into the response command queue module 2021.
[0044] When the read/write operation request is a write operation request, as shown in FIG.
3,
the transmission queue module 201 includes a command transmission queue module 2011
and a data transmission queue module 2012;
the response queue module 202 includes a response command queue module 2021 and a
data receiving queue module 2022;
the CPU 100 is specifically configured to: convert the write operation request into
a write control command, write the write control command into the command transmission
queue module 2011, and write, into the data transmission queue module 2012, data to
be written by means of the write operation, where the write control command carries
write operation information and is used to instruct the cloud controller 200 to write,
into the network device according to the write operation information, the data to
be written by means of the write operation; and
the cloud controller 200 is specifically configured to: when the write control command
in the command transmission queue module 2011 is triggered, extract, from the data
transmission queue module 2012 according to the write operation information in the
write control command, the data to be written by means of the write operation, and
write, into the network device, the data to be written by means of the write operation;
and when receiving a write response message sent by the network device, write the
write response message sent by the network device into the response command queue
module 2021.
[0045] Specifically, the converting the write operation request into a write control command
and writing the write control command into the command transmission queue module 2011
is implemented by a driver that runs in the CPU 100.
[0046] That the write control command in the command transmission queue module 2011 is triggered
may be that when the write control command is written into the command transmission
queue module 2011, the cloud controller is triggered to extract the write control
command from the command transmission queue module 2011. During specific implementation,
a control unit or a control module of the cloud controller may extract the write control
command from the command transmission queue module 2011 when the write control command
is written into the command transmission queue module 2011, and execute the read control
command.
[0047] In a specific implementation, the write operation information includes an address
of the network device, a length of the data to be written by means of the write operation,
and an address, in the data transmission queue module, of the data to be written by
means of the write operation; or
the write operation information includes a node address and an offset address of the
network device, a length of the data to be written by means of the write operation,
and an address, in the data transmission queue module, of the data to be written by
means of the write operation.
[0048] Optionally, the extracting, by the cloud controller 200 from the data transmission
queue module 2012 according to the write operation information in the write control
command, the data to be written by means of the write operation, and writing, into
the network device, the data to be written by means of the write operation may include:
creating a communications packet by using the data to be written by means of the write
operation, the address of the network device, and the length of the data to be written
by means of the write operation, and sending the communications packet to the network
device by using a network; or creating, by the cloud controller 200, a communications
packet by using the data to be written by means of the write operation, the node address
and the offset address of the network device, and the length of the data to be written
by means of the write operation, and sending the communications packet to the network
device by using a network. Specifically, the communications packet may be a PRAP data
packet.
[0049] After converting the write operation request into the write control command and writing
the write control command into the command transmission queue module 2011, the CPU
100 may perform another operation, for example, continue to write another read control
command or write control command. The cloud controller 200 may extract the write control
command from the command transmission queue module 2011 when the write control command
is written into the command transmission queue module 2011, execute the write control
command, and write a result of executing the write control command into the response
command queue module 2021. In this way, a write operation request is converted into
two processes of writing a write control command into the command transmission queue
module 2011 of the cloud controller and executing the write control command by the
cloud controller 200. The CPU 100 can execute another task with no need to wait for
a result of performing a write operation by the cloud controller 200, and only needs
to obtain a write operation result when a write operation response command is written
into the response command queue module 2021. This avoids an interrupt caused because
the CPU 100 waits for a write operation result for an excessively long time, and improves
resource utilization of the CPU 100 and overall performance of the computer device.
[0050] In this embodiment of the present invention, the CPU 100 may further obtain the write
operation result by querying in a polling manner or by being notified by means of
an interrupt. For example, after writing the write control command into the command
transmission queue module, the CPU 100 queries, in a polling manner, whether the write
response message sent by the network device exists in the response command queue module
2021, that is, repeatedly queries, according to a preset time interval, whether the
write response message sent by the network device exists in the response command queue
module 2021. When determining that the write response message sent by the network
device exists in the response command queue module 2021, the CPU 100 obtains the write
response message.
[0051] The obtaining the write operation result by being notified by means of an interrupt
includes: determining, by the cloud controller 200, whether the write response message
sent by the network device exists in the response command queue module 2021, and notifying
the CPU 100 by means of an interrupt when the write response message sent by the network
device exists in the response command queue module 2021. Specifically, the cloud controller
200 may notify the CPU 100 by means of an interrupt when the write response message
is written into the response command queue module 2021. The CPU 100 is further configured
to: receive an interrupt message sent by the cloud controller 200, and obtain the
write response message from the response command queue module 2021 according to the
interrupt message. In the foregoing embodiment, the command transmission queue module
2011, the data transmission queue module 2012, the response command queue module 2021,
and the data receiving queue module 2022 may be implemented by hardware such as a
register or a memory, and are connected to the DDR interface or the like by using
a hardware interface. In addition, the command transmission queue module 2011 and
the response command queue module 2021 store related commands or messages in an ordered
arrangement manner such as in a queue form, and the data transmission queue module
2012 and the data receiving queue module 2022 store related data in an ordered arrangement
manner such as in a queue form, so that the cloud controller 200 can perform reading
or writing in a queue form. Specifically, a control unit or a control module of the
cloud controller 200 may extract a control command from the command transmission queue
module 2011 or the response command queue module 2021, execute the control command,
and read data from the data transmission queue module 2012 or write data into the
data receiving queue module 2022. The control unit or the control module of the cloud
controller 200 is also a hardware control component, and is connected to the command
transmission queue module 2011, the data transmission queue module 2012, the response
command queue module 2021, the data receiving queue module 2022, and the network interface
204 by using interfaces.
[0052] In an optional implementation, the computer device 10 further includes a memory,
and the CPU 100 obtains to-be-read data from the data receiving queue module 2022
and writes the to-be-read data into the memory. For example, the to-be-read data may
be written into the memory in a direct memory access (DMA, Direct Memory Access) manner.
The writing, by the CPU 100 into the data transmission queue module 2012, the data
to be written by means of the write operation is writing, into the data transmission
queue module 2012 by configuring a DMA controller of a memory controller (MC, Memory
Controller), the data in the memory that is to be written by means of the write operation.
[0053] In this embodiment of the present invention, the network device is a device connected
to the computer device by using a network, and includes a device that provides a storage
resource or a device that provides an input/output resource. Optionally, the device
that provides a storage resource includes a device that provides a memory resource.
[0054] The computer device 10 in the foregoing embodiment may be applied to a high-throughput
computer data center, and is used as a high-throughput computer for data processing.
When the computer device 10 is used as a high-throughput computer for data processing,
the computer device 10 may include at least two CPUs and at least two memories. The
at least two CPUs form a CPU resource pool and separately process data in the high-throughput
computer data center.
[0055] It should be noted that the DDR interface in the foregoing embodiment is a quick
interface for reading/writing data between a CPU and a memory currently. To quickly
read/write data, the DDR is used between the CPU 100 and the cloud controller 200,
so as to meet a requirement of quickly obtaining data by the CPU. However, in this
embodiment of the present invention, no limitation is imposed on a specific form of
an interface used between a CPU and a cloud controller. Another interface that can
be used for quickly reading/writing data and that can meet a requirement of quickly
reading/writing data by a CPU, for example, an interface whose reading/writing rate
is equal to or similar to a reading/writing rate between a CPU and a memory, can be
used as an interface between the CPU and the cloud controller. The following uses
a specific example to describe a schematic structural diagram of a manner of reading/writing
remote data by a computer device according to an embodiment of the present invention.
As shown in FIG. 4, in addition to a local memory (for example, a DRAM using a DDR
interface), a CPU 1 in a CPU resource pool also has remote storage spaces (a storage
space A and a storage space B) allocated by a system. Each physical storage space
is mapped to a global address space. A mapping relationship of the address space is
stored in a driver of a cloud controller corresponding to each CPU. In this embodiment,
descriptions are provided by using an example in which the remote storage spaces include
only the storage space A and the storage space B. During specific implementation,
two or more storage spaces may be included. For example, the CPU 1 has a 10 GB local
memory and a 100 GB remote storage resource in total, the CPU 1 can access a remote
storage resource pool including the storage space A and the storage space B, and the
storage space A and the storage space B each are a storage space with a capacity of
50 GB. In this case, the CPU 1 can access a 110 GB storage space in total: a storage
space of 0 to 10 GB in the local memory and a storage space of 10 GB to 110 GB in
the remote storage resource pool.
[0056] When the CPU 1 accesses the local memory, if an address space of 0 GB to 10 GB is
accessed, the address space is mapped to the local memory, and the local memory is
accessed by using the DDR interface.
[0057] When the CPU 1 accesses an address space of 10 GB to 110 GB, for example, 1 MB data
needs to be written into the address space of 10 GB to 110 GB, the following steps
are included:
Step 1. A driver of the CPU 1 first writes, into a data transmission queue module
of a cloud controller 1, the 1 MB data that needs to be written. It is assumed that
the data is stored in an address of 5 KB in the data transmission queue module.
Step 2. The driver of the CPU 1 obtains an address, in the storage resource pool,
into which the 1 MB data to be written. Assuming that the address is the 100th GB address, the address is mapped to an address of 40 GB in the storage space B.
Because an address range mapped to the storage space A is 10 GB to 60 GB, an address
range mapped to the storage space B is 60 GB to 110 GB.
Step 3. The driver of the CPU 1 writes, into a command transmission queue module of
the cloud controller 1, address information of the remote storage space B, an offset
address of 40 GB of the storage space B, an address of 5 KB in a data transmission
queue, information of a data length of 1 MB, an identifier ID (for example, 0x01)
of a current command, and other information. The driver of the CPU 1 may write the
command into the command transmission queue module of the cloud controller 1 by writing
the command into a particular register. Step 4. The cloud controller 1 obtains a new
command (that is, the command of writing 1 MB data) from the command transmission
queue module after finding that the command transmission queue module is not empty,
parses the command to obtain the address of the remote storage space B, the offset
address of the storage space B, the command identifier ID, and the data length, and
other information, obtains corresponding data from the data transmission queue module
according to the address, in the data transmission queue module, of the 1 MB data
in the command transmission queue module to create a communications packet, and sends
the communications packet to the storage space B by using a network. In this case,
if the CPU 1 needs to further perform another write operation, the driver of the CPU
1 may repeatedly perform the foregoing steps, and continue to write corresponding
data and a corresponding command into the cloud controller 1.
Step 5. After the 1 MB data is written into the storage space B, return a packet (carrying
the corresponding command identifier ID: 0x01) indicating that data writing is complete.
After the cloud controller 1 of the CPU 1 receives the returned packet, the cloud
controller 1 of the CPU 1 writes information that a write command is complete into
the response command queue module. The driver of the CPU 1 obtains, by querying the
response command queue module, a write complete operation in which an identifier is
0x01, or the response command queue module notifies, by means of an interrupt, the
CPU 1 that the write complete operation in which an identifier is 0x01 has been received,
and the CPU 1 learns that the write operation of writing 1 MB data in the 100th GB address is complete.
[0058] When the CPU 1 accesses an address space of 10 GB to 110 GB, for example, 1 MB data
needs to be read from the address space of 10 GB to 110 GB, the following steps are
included:
Step 1. The driver of the CPU 1 obtains an address of to-be-read data in the storage
resource pool. Assuming that the address is an address of 100 GB, the address is mapped
to an address of 40 GB on a node B.
Step 2. The driver of the CPU 1 writes, into the command transmission queue module
of the cloud controller 1, address information of the storage space B, an offset address
of 40 GB of the to-be-read data in the storage space B, information of a data length
of 1 MB, an identifier ID (for example, 0x02) of a current command, and other information.
The driver of the CPU 1 may write, by writing a command of reading the 1 MB data into
a particular register, the command of reading the 1 MB data into the command transmission
queue module of the cloud controller 1.
Step 3. After finding that a command transmission queue is not empty, the cloud controller
1 obtains, from the command transmission queue module, the command of reading the
1 MB data, parses the command to obtain the address information of the remote storage
space B, the offset address of the 1 MB data in the storage space B, the command identifier
ID, the data length, and other information to create a communications packet, and
sends the communications packet to the storage space B by using a network. If the
CPU 1 needs to further perform another read or write operation, the CPU 1 may repeatedly
perform the foregoing steps, but different command identifiers need to be used to
represent different commands.
Step 4. After reading the corresponding data from the remote storage space B, the
cloud controller 1 stores the returned data in the data receiving queue module, and
writes, into the response command queue module, a command identifier ID 0x02, address
information (10 KB) in a data receiving queue, a data length of 1 MB, and other information.
Step 5. The driver of the CPU 1 may query, in a polling manner, a status of the response
command queue module, or the response command queue module notifies the CPU 1 by means
of an interrupt, and the driver of the CPU 1 learns, by reading the response command
queue module, a response message of the reading the 1 MB data. When the response message
indicates a read success, the 1 MB data is read from the data receiving queue module
according to information, in the data receiving queue module, about the read data
and is written into the local memory, or is read by means of DMA by configuring a
DMA controller of the CPU.
[0059] The specific implementation is described by using a network device for storing a
resource as an example. The computer device provided in this embodiment of the present
invention may read data from a device that provides an input/output resource or write
data into a device that provides an input/output resource. In this case, the network
device is the device that provides the input/output resource.
[0060] An embodiment of the present invention further provides a method for reading/writing
data by a computer device. The computer device includes a central processing unit
CPU, a cloud controller, and a network interface. The CPU is connected to the cloud
controller by using a double data rate DDR interface, and the network interface is
configured to connect the cloud controller to a network device. Referring to FIG.
5, FIG. 5 is a schematic flowchart of a method for reading/writing data by a computer
device according to an embodiment of the present invention. The method includes the
following steps:
Step 500. The CPU converts a request for performing a read/write operation on the
network device into a control command, and writes the control command into a transmission
queue module of the cloud controller, where the control command is used to instruct
the cloud controller to perform a read operation or a write operation on the network
device, and the control command carries operation information of the read operation
or the write operation.
Step 502. The cloud controller performs the read operation or the write operation
on the network device according to the operation information in the control command
when the control command in the transmission queue module is triggered, and writes
a response message sent by the network device into a response queue module of the
cloud controller when receiving the response message sent by the network device.
[0061] According to the foregoing method embodiment, the CPU is connected to the cloud controller
by using the DDR interface, and an interrupt is avoided because the DDR interface
has a high data transmission rate. In addition, the CPU converts a read/write operation
request into a control command and writes the control command into the transmission
queue module of the cloud controller. Because the cloud controller performs the read
operation or the write operation on the network device according to operation information
in the control command, after writing the control command into the transmission queue
module, the CPU does not need to wait for an operation performed by the cloud controller
and can continue to perform other service processing, for example, continue to write
another control command. This avoids a waste of CPU resources, and improves CPU utilization.
[0062] During specific implementation, if the read/write operation request is a read operation
request, the converting, by the CPU, a request for performing a read/write operation
on the network device into a control command, and writing the control command into
a transmission queue module of the cloud controller includes:
converting, by the CPU, the read operation request into a read control command, and
writing the read control command into a command transmission queue module of the transmission
queue module, where the read control command carries read operation information and
is used to instruct the cloud controller to perform a read operation on the network
device according to the read operation information; and
the performing, by the cloud controller, the read operation or the write operation
on the network device according to the operation information in the control command,
and writing a response message sent by the network device into a response queue module
of the cloud controller when receiving the response message sent by the network device
includes:
performing, by the cloud controller, the read operation on the network device according
to the read operation information in the read control command when the read control
command in the command transmission queue module is triggered, receiving a read response
message sent by the network device, writing the read response message sent by the
network device into the response command queue module of the response queue module,
and writing, into the data receiving queue module of the response queue module, data
that is to be read by means of the read operation and that is returned by the network
device.
[0063] The read operation information may include an address, in the network device, of
the data to be read by means of the read operation and a length of the data to be
read by means of the read operation; or the read operation information includes a
node address and an offset address, in the network device, of the data to be read
by means of the read operation and a length of the data to be read by means of the
read operation.
[0064] After converting the read operation request into the read control command and writing
the read control command into the command transmission queue module, the CPU may perform
another operation, for example, continue to write another read control command or
write control command. The cloud controller may extract the read control command from
the command transmission queue module when the read control command is written into
the command transmission queue module, execute the read control command, write a result
of executing the read control command into the response command queue module, and
write read data into the data receiving queue module when obtaining the read data.
In this way, a read operation request is converted into two processes of writing a
read control command by a CPU and executing the read control command by the cloud
controller. The CPU can execute another task with no need to wait for a result of
performing a read operation by the cloud controller, and only needs to obtain a read
operation result when a read operation response command is written into the response
command queue module. This avoids an interrupt caused because the CPU waits for a
read operation result for an excessively long time, and improves resource utilization
of the CPU.
[0065] Further, in this embodiment of the present invention, the CPU may obtain the read
operation result by querying in a polling manner or by being notified by means of
an interrupt.
[0066] When obtaining the read operation result by querying in a polling manner, the CPU
queries, in a polling manner, after writing the read control command into the command
transmission queue module, whether the read response message sent by the network device
exists in the response command queue module, that is, repeatedly queries, according
to a preset time interval, whether the read response message sent by the network device
exists in the response command queue module. When determining that the read response
message sent by the network device exists in the response command queue module and
the read response message is a read success response message, the CPU reads, from
the data receiving queue module, data to be read by means of the read operation.
[0067] When obtaining the read operation result by being notified by means of an interrupt,
the cloud controller determines whether the read response message sent by the network
device exists in the response command queue module, and notifies the CPU by means
of an interrupt when the read response message sent by the network device exists in
the response command queue module. The CPU receives an interrupt message sent by the
cloud controller, obtains the read response message from the response command queue
module according to the interrupt message, and when the obtained read response message
indicates a read success, reads, from the data receiving queue module, the data to
be read by means of the read operation.
[0068] When the read/write operation request is a write operation request, the converting,
by the CPU, a request for performing a read/write operation on the network device
into a control command, and writing the control command into a transmission queue
module of the cloud controller includes:
converting, by the CPU, the write operation request into a write control command,
writing the write control command into the command transmission queue module of the
transmission queue module, and writing, into the data transmission queue module of
the transmission queue module, data to be written by means of the write operation,
where the write control command carries write operation information and is used to
instruct the cloud controller to write, into the network device according to the write
operation information, the data to be written by means of the write operation; and
the performing, by the cloud controller, the read operation or the write operation
on the network device according to the operation information in the control command,
and writing a response message sent by the network device into a response queue module
of the cloud controller when receiving the response message sent by the network device
includes:
when the write control command in the command transmission queue module is triggered,
extracting, by the cloud controller from the data transmission queue module according
to the write operation information in the write control command, the data to be written
by means of the write operation, and writing, into the network device, the data to
be written by means of the write operation; and when receiving a write response message
sent by the network device, writing the write response message sent by the network
device into the response command queue module of the response queue module.
[0069] The write operation information may include an address of the network device, a length
of the data to be written by means of the write operation, and an address, in the
data transmission queue module, of the data to be written by means of the write operation;
or the write operation information includes a node address and an offset address of
the network device, a length of the data to be written by means of the write operation,
and an address, in the data transmission queue module, of the data to be written by
means of the write operation. After converting the write operation request into the
write control command and writing the write control command into the command transmission
queue module, the CPU may perform another operation, for example, continue to write
another read control command or write control command. The cloud controller may extract
the write control command from the command transmission queue module when the write
control command is written into the command transmission queue module, execute the
write control command, and write a result of executing the write control command into
the response command queue module. In this way, a write operation request is converted
into two processes of writing a write control command into the command transmission
queue module of the cloud controller and executing the write control command by the
cloud controller. The CPU can execute another task with no need to wait for a result
of performing a write operation by the cloud controller, and only needs to obtain
a write operation result when a write operation response command is written into the
response command queue module. This avoids an interrupt caused because the CPU waits
for a write operation result for an excessively long time, and improves resource utilization
of the CPU.
[0070] Further, in this embodiment of the present invention, the CPU may obtain the write
operation result by querying in a polling manner or by being notified by means of
an interrupt.
[0071] When obtaining the write operation result by querying in a polling manner, the CPU
queries, in a polling manner, after writing the write control command into the command
transmission queue module, whether the write response message sent by the network
device exists in the response command queue module, and the CPU obtains the write
response message when determining that the write response message sent by the network
device exists in the response command queue module.
[0072] When obtaining the write operation result by being notified by means of an interrupt,
the cloud controller determines whether the write response message sent by the network
device exists in the response command queue module, and notifies the CPU by means
of an interrupt when the write response message sent by the network device exists
in the response command queue module. The CPU receives an interrupt message sent by
the cloud controller, and obtains the write response message from the response command
queue module according to the interrupt message.
[0073] The implementation of the foregoing method embodiment may also be implemented with
reference to the implementations of the computer device 10, and no details are repeated.
[0074] A person of ordinary skill in the art may be aware that, in combination with the
examples described in the embodiments disclosed in this specification, units and algorithm
steps may be implemented by electronic hardware, computer software, or a combination
thereof. To clearly describe the interchangeability between the hardware and the software,
the foregoing has generally described compositions and steps of each example according
to functions. Whether the functions are performed by hardware or software depends
on particular applications and design constraint conditions of the technical solutions.
[0075] It may be clearly understood by a person skilled in the art that, for the purpose
of convenient and brief description, for a detailed working process of the foregoing
system, apparatus, and unit, reference may be made to a corresponding process in the
foregoing method embodiments, and details are not described herein again.
[0076] In the several embodiments provided in this application, it should be understood
that the disclosed system, apparatus, and method may be implemented in other manners.
For example, the described apparatus embodiment is merely an example. For example,
the unit division is merely logical function division and may be other division in
actual implementation. For example, a plurality of units or components may be combined
or integrated into another system, or some features may be ignored or not performed.
In addition, the displayed or discussed mutual couplings or direct couplings or communication
connections may be implemented through some interfaces, indirect couplings or communication
connections between the apparatuses or units, or electrical connections, mechanical
connections, or connections in other forms.
[0077] The units described as separate parts may or may not be physically separate, and
parts displayed as units may or may not be physical units, may be located in one position,
or may be distributed on a plurality of network units. A part or all of the units
may be selected according to actual needs to achieve the objectives of the solutions
of the embodiments of the present invention.
[0078] In addition, functional units in the embodiments of the present invention may be
integrated into one processing unit, or each of the units may exist alone physically,
or two or more units are integrated into one unit. The integrated unit may be implemented
in a form of hardware, or may be implemented in a form of a software functional unit.
[0079] When the integrated unit is implemented in the form of a software functional unit
and sold or used as an independent product, the integrated unit may be stored in a
computer-readable storage medium. Based on such an understanding, the technical solutions
of the present invention essentially, or the part contributing to the prior art, or
all or a part of the technical solutions may be implemented in the form of a software
product. The software product is stored in a storage medium and includes several instructions
for instructing a computer device (which may be a personal computer, a server, or
a network device) to perform all or a part of the steps of the methods described in
the embodiments of the present invention. The foregoing storage medium includes: any
medium that can store program code, such as a USB flash drive, a removable hard disk,
a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access
Memory), a magnetic disk, or an optical disc.
[0080] The foregoing descriptions are merely specific embodiments of the present invention,
but are not intended to limit the present invention.
1. A computer device (10), comprising a central processing unit, CPU (100), and a cloud
controller (200), wherein the cloud controller (200) comprises a transmission queue
module (201), a response queue module (202), a double data rate, DDR, interface (203),
and a network interface (204), the DDR interface (203) is configured to connect the
CPU (100) to the cloud controller (200), and the network interface (204) is configured
to connect the cloud controller (200) to a network device;
the CPU (100) is configured to: after generating a request for performing a read/write
operation on the network device (204), convert the read/write operation request into
a control command, and write the control command into the transmission queue module
(201), wherein the control command is used to instruct the cloud controller (200)
to perform a read operation or a write operation on the network device, and the control
command carries operation information of the read operation or the write operation;
and
the cloud controller (200) is configured to: when the control command in the transmission
queue module (201) is triggered, perform the read operation or the write operation
on the network device according to the operation information in the control command,
receive a response message sent by the network device, and write the response message
sent by the network device into the response queue module (202).
2. The computer device (10) according to claim 1, wherein
the read/write operation request is a read operation request;
the transmission queue module (201) comprises a command transmission queue module
(2011) and a data transmission queue module (2012);
the response queue module (2022) comprises a response command queue module (2021)
and a data receiving queue module (2022);
the CPU (100) is specifically configured to: convert the read operation request into
a read control command, and write the read control command into the command transmission
queue module (2011), wherein the read control command carries read operation information
and is used to instruct the cloud controller to perform a read operation on the network
device according to the read operation information; and
the cloud controller (200) is specifically configured to: when the read control command
in the command transmission queue module (2011) is triggered, perform the read operation
on the network device according to the read operation information in the read control
command, receive a read response message sent by the network device, write the read
response message sent by the network device into the response command queue module
(2021), and write, into the data receiving queue module (2022), data that is to be
read by means of the read operation and that is returned by the network device.
3. The computer device (10) according to claim 2, wherein
the read operation information comprises an address, in the network device, of the
data to be read by means of the read operation and a length of the data to be read
by means of the read operation; or
the read operation information comprises a node address and an offset address, in
the network device, of the data to be read by means of the read operation and a length
of the data to be read by means of the read operation.
4. The computer device (10) according to claim 2 or 3, wherein
the CPU (100) is further configured to: after writing the read control command into
the command transmission queue module (2011), query, in a polling manner, whether
the read response message sent by the network device exists in the response command
queue module (2021), and when the CPU (100) determines that the read response message
sent by the network device exists in the response command queue module (2021) and
the read response message is a read success response message, read, from the data
receiving queue module (2022), the data to be read by means of the read operation.
5. The computer device (10) according to claim 2 or 3, wherein
the cloud controller (200) is further configured to: determine whether the read response
message sent by the network device exists in the response command queue module (2021),
and notify the CPU (100) by means of an interrupt when the read response message sent
by the network device exists in the response command queue module (2021); and
the CPU (100) is further configured to: receive an interrupt message sent by the cloud
controller (200), obtain the read response message from the response command queue
module (2021) according to the interrupt message, and when the obtained read response
message indicates a read success, read, from the data receiving queue module (2022),
the data to be read by means of the read operation.
6. The computer device (10) according to claim 1, wherein
the read/write operation request is a write operation request;
the transmission queue module (201) comprises a command transmission queue module
(2011) and a data transmission queue module (2012);
the response queue module (202) comprises a response command queue module (2021) and
a data receiving queue module (2022);
the CPU (100) is specifically configured to: convert the write operation request into
a write control command, write the write control command into the command transmission
queue module (2011), and write, into the data transmission queue module (2012), data
to be written by means of the write operation, wherein the write control command carries
write operation information and is used to instruct the cloud controller (200) to
write, into the network device according to the write operation information, the data
to be written by means of the write operation; and
the cloud controller (200) is specifically configured to: when the write control command
in the command transmission queue module (2011) is triggered, extract, from the data
transmission queue module (2012) according to the write operation information in the
write control command, the data to be written by means of the write operation, and
write, into the network device, the data to be written by means of the write operation;
and when receiving a write response message sent by the network device, write the
write response message sent by the network device into the response command queue
module (2021).
7. The computer device (10) according to claim 6, wherein
the write operation information comprises an address of the network device, a length
of the data to be written by means of the write operation, and an address, in the
data transmission queue module (2012), of the data to be written by means of the write
operation; or
the write operation information comprises a node address and an offset address of
the network device, a length of the data to be written by means of the write operation,
and an address, in the data transmission queue module (2012), of the data to be written
by means of the write operation.
8. The computer device (10) according to claim 6 or 7, wherein
the CPU (100) is further configured to: after writing the write control command into
the command transmission queue module (2011), query, in a polling manner, whether
the write response message sent by the network device exists in the response command
queue module (2021), and when the CPU (100) determines that the write response message
sent by the network device exists in the response command queue module (2021), obtain
the write response message.
9. The computer device (10) according to claim 6 or 7, wherein
the cloud controller (200) is further configured to: determine whether the write response
message sent by the network device exists in the response command queue module (2021),
and notify the CPU (100) by means of an interrupt when the write response message
sent by the network device exists in the response command queue module (2021); and
the CPU (100) is further configured to: receive an interrupt message sent by the cloud
controller (200), and obtain the write response message from the response command
queue module (2021) according to the interrupt message.
10. A method for reading/writing data by a computer device, wherein the computer device
comprises a central processing unit, CPU, a cloud controller, and a network interface,
the CPU is connected to the cloud controller by using a double data rate, DDR, interface,
and the network interface is configured to connect the cloud controller to a network
device; and the method comprises:
Converting (500), by the CPU, a request for performing a read/write operation on the
network device into a control command, and writing the control command into a transmission
queue module of the cloud controller, wherein the control command is used to instruct
the cloud controller to perform a read operation or a write operation on the network
device, and the control command carries operation information of the read operation
or the write operation; and
Performing (502), by the cloud controller, the read operation or the write operation
on the network device according to the operation information in the control command
when the control command in the transmission queue module is triggered, and writing
a response message sent by the network device into a response queue module of the
cloud controller when receiving the response message sent by the network device.
11. The method according to claim 10, wherein
the read/write operation request is a read operation request;
correspondingly, converting, by the CPU, a request for performing a read/write operation
on the network device into a control command, and writing the control command into
a transmission queue module of the cloud controller comprises:
converting, by the CPU, the read operation request into a read control command, and
writing the read control command into a command transmission queue module of the transmission
queue module, wherein the read control command carries read operation information
and is used to instruct the cloud controller to perform a read operation on the network
device according to the read operation information; and
performing, by the cloud controller, the read operation or the write operation on
the network device according to the operation information in the control command,
and writing a response message sent by the network device into a response queue module
of the cloud controller when receiving the response message sent by the network device
comprises:
performing, by the cloud controller, the read operation on the network device according
to the read operation information in the read control command when the read control
command in the command transmission queue module is triggered, receiving a read response
message sent by the network device, writing the read response message sent by the
network device into the response command queue module of the response queue module,
and writing, into the data receiving queue module of the response queue module, data
that is to be read by means of the read operation and that is returned by the network
device.
12. The method according to claim 11, wherein the method further comprises:
after writing the read control command into the command transmission queue module,
querying, by the CPU in a polling manner, whether the read response message sent by
the network device exists in the response command queue module, and when the CPU determines
that the read response message sent by the network device exists in the response command
queue module and the read response message is a read success response message, reading,
from the data receiving queue module, the data to be read by means of the read operation.
13. The method according to claim 11, wherein the method further comprises:
determining, by the cloud controller, whether the read response message sent by the
network device exists in the response command queue module, and notifying the CPU
by means of an interrupt when the read response message sent by the network device
exists in the response command queue module; and
receiving, by the CPU, an interrupt message sent by the cloud controller, obtaining
the read response message from the response command queue module according to the
interrupt message, and when the obtained read response message indicates a read success,
reading, from the data receiving queue module, the data to be read by means of the
read operation.
14. The method according to claim 10, wherein
the read/write operation request is a write operation request;
correspondingly, converting, by the CPU, a request for performing a read/write operation
on the network device into a control command, and writing the control command into
a transmission queue module of the cloud controller comprises:
converting, by the CPU, the write operation request into a write control command,
writing the write control command into the command transmission queue module of the
transmission queue module, and writing, into the data transmission queue module of
the transmission queue module, data to be written by means of the write operation,
wherein the write control command carries write operation information and is used
to instruct the cloud controller to write, into the network device according to the
write operation information, the data to be written by means of the write operation;
and
performing, by the cloud controller, the read operation or the write operation on
the network device according to the operation information in the control command,
and writing a response message sent by the network device into a response queue module
of the cloud controller when receiving the response message sent by the network device
comprises:
when the write control command in the command transmission queue module is triggered,
extracting, by the cloud controller from the data transmission queue module according
to the write operation information in the write control command, the data to be written
by means of the write operation, and writing, into the network device, the data to
be written by means of the write operation; and when receiving a write response message
sent by the network device, writing the write response message sent by the network
device into the response command queue module of the response queue module.
15. The method according to claim 14, wherein the method further comprises:
determining, by the cloud controller, whether the write response message sent by the
network device exists in the response command queue module, and notifying the CPU
by means of an interrupt when the write response message sent by the network device
exists in the response command queue module; and
receiving, by the CPU, an interrupt message sent by the cloud controller, and obtaining
the write response message from the response command queue module according to the
interrupt message.
1. Computervorrichtung (10), die eine zentrale Verarbeitungseinheit, CPU (100), und eine
Cloudsteuerung (200) umfasst, wobei die Cloudsteuerung (200) ein Übertragungswarteschlangenmodul
(201), ein Antwortwarteschlangenmodul (202), eine Doppeldatenraten(DDR)-Schnittstelle
(203) und eine Netzwerkschnittstelle (204) umfasst, die DDR-Schnittstelle (203) dazu
ausgelegt ist, die CPU (100) mit der Cloudsteuerung (200) zu verbinden, und die Netzwerkschnittstelle
(204) dazu ausgelegt ist, die Cloudsteuerung (200) mit einer Netzwerkvorrichtung zu
verbinden; wobei die CPU (100) zu Folgendem ausgelegt ist: nach Erzeugen einer Anforderung
zum Durchführen einer Lese-/Schreiboperation auf der Netzwerkvorrichtung (204) Umwandeln
der Lese-/Schreiboperationsanforderung in einen Steuerbefehl und Schreiben des Steuerbefehls
in ein Übertragungswarteschlangenmodul (201), wobei der Steuerbefehl verwendet wird,
um die Cloudsteuerung (200) anzuweisen, eine Leseoperation oder eine Schreiboperation
auf der Netzwerkvorrichtung durchzuführen, und der Steuerbefehl Operationsinformationen
der Leseoperation oder der Schreiboperation enthält; und
wobei die Cloudsteuerung (200) zu Folgendem ausgelegt ist: wenn der Steuerbefehl im
Übertragungswarteschlangenmodul (201) ausgelöst wird, Durchführen der Leseoperation
oder der Schreiboperation auf der Netzwerkvorrichtung gemäß den Operationsinformationen
im Steuerbefehl, Empfangen einer Antwortnachricht, die von der Netzwerkvorrichtung
gesendet wurde, und Schreiben der Antwortnachricht, die von der Netzwerkvorrichtung
gesendet wurde, in das Antwortwarteschlangenmodul (202).
2. Computervorrichtung (10) nach Anspruch 1, wobei
die Lese-/Schreiboperationsanforderung eine Leseoperationsanforderung ist;
das Übertragungswarteschlangenmodul (201) ein Befehlsübertragungswarteschlangenmodul
(2011) und ein Datenübertragungswarteschlangenmodul (2012) umfasst;
das Antwortwarteschlangenmodul (2022) ein Antwortbefehlswarteschlangenmodul (2021)
und ein Datenempfangswarteschlangenmodul (2022) umfasst;
die CPU (100) speziell zu Folgendem ausgelegt ist: Umwandeln der Leseoperationsanforderung
in einen Lesesteuerbefehl und Schreiben des Lesesteuerbefehls in das Befehlsübertragungswarteschlangenmodul
(2011), wobei der Lesesteuerbefehl Leseoperationsinformationen enthält und verwendet
wird, um die Cloudsteuerung anzuweisen, auf der Netzwerkvorrichtung eine Leseoperation
gemäß den Leseoperationsinformationen durchzuführen; und
die Cloudsteuerung (200) speziell zu Folgendem ausgelegt ist: wenn der Lesesteuerbefehl
im Befehlsübertragungswarteschlangenmodul (2011) ausgelöst wird, Durchführen der Leseoperation
auf der Netzwerkvorrichtung gemäß den Leseoperationsinformationen im Lesesteuerbefehl,
Empfangen einer Leseantwortnachricht, die von der Netzwerkvorrichtung gesendet wurde,
Schreiben der Leseantwortnachricht, die von der Netzwerkvorrichtung gesendet wurde,
in das Antwortbefehlswarteschlangenmodul (2021) und Schreiben von Daten, die mittels
der Leseoperation zu lesen sind und die von der Netzwerkvorrichtung zurückgegeben
werden, in das Datenempfangswarteschlangenmodul (2022).
3. Computervorrichtung (10) nach Anspruch 2, wobei
die Leseoperationsinformationen in der Netzwerkvorrichtung eine Adresse der Daten,
die mittels der Leseoperation zu lesen sind, und eine Länge der Daten, die mittels
der Leseoperation zu lesen sind, umfasst oder
die Leseoperationsinformationen in der Netzwerkvorrichtung eine Knotenadresse und
eine Versatzadresse der Daten, die mittels der Leseoperation zu lesen sind, und eine
Länge der Daten, die mittels der Leseoperation zu lesen sind, umfasst.
4. Computervorrichtung (10) nach Anspruch 2 oder 3, wobei
die CPU (100) ferner zu Folgendem ausgelegt ist: nach dem Schreiben des Lesesteuerbefehls
in das Befehlsübertragungswarteschlangenmodul (2011) Abfragen in einer Umfrageweise,
ob die Leseantwortnachricht, die von der Netzwerkvorrichtung gesendet wurde, im Antwortbefehlswarteschlangenmodul
(2021) existiert, und wenn die CPU (100) bestimmt, dass die Leseantwortnachricht,
die von der Netzwerkvorrichtung gesendet wurde, im Antwortbefehlswarteschlangenmodul
(2021) existiert und die Leseantwortnachricht eine Leseerfolgsantwortnachricht ist,
Lesen der Daten, die mittels der Leseoperation zu lesen sind, aus dem Datenempfangswarteschlangenmodul
(2022).
5. Computervorrichtung (10) nach Anspruch 2 oder 3, wobei
die Cloudsteuerung (200) ferner zu Folgendem ausgelegt ist: Bestimmen, ob die Leseantwortnachricht,
die von der Netzwerkvorrichtung gesendet wurde, im Antwortbefehlswarteschlangenmodul
(2021) existiert, und Benachrichtigen der CPU (100) mittels eines Interrupts, wenn
die Leseantwortnachricht, die von der Netzwerkvorrichtung gesendet wurde, im Antwortbefehlswarteschlangenmodul
(2021) existiert; und
die CPU (100) ferner zu Folgendem ausgelegt ist: Empfangen einer Interruptnachricht,
die von der Cloudsteuerung (200) gesendet wurde, Erhalten der Leseantwortnachricht
vom Antwortbefehlswarteschlangenmodul (2021) gemäß der Interruptnachricht und, wenn
die erhaltene Leseantwortnachricht einen Leseerfolg anzeigt, Lesen der Daten, die
mittels der Leseoperation zu lesen sind, aus dem Datenempfangswarteschlangenmodul
(2022).
6. Computervorrichtung (10) nach Anspruch 1, wobei
die Lese-/Schreiboperationsanforderung eine Schreiboperationsanforderung ist;
das Übertragungswarteschlangenmodul (201) ein Befehlsübertragungswarteschlangenmodul
(2011) und ein Datenübertragungswarteschlangenmodul (2012) umfasst;
das Antwortwarteschlangenmodul (202) ein Antwortbefehlswarteschlangenmodul (2021)
und ein Datenempfangswarteschlangenmodul (2022) umfasst;
die CPU (100) speziell zu Folgendem ausgelegt ist: Umwandeln der Schreiboperationsanforderung
in einen Schreibsteuerbefehl, Schreiben des Schreibsteuerbefehls in das Befehlsübertragungswarteschlangenmodul
(2011) und Schreiben von Daten, die mittels der Schreiboperation zu schreiben sind,
in das Datenübertragungswarteschlangenmodul (2012), wobei der Schreibsteuerbefehl
Schreiboperationsinformationen enthält und verwendet wird, um die Cloudsteuerung (200)
anzuweisen, die Daten, die mittels der Schreiboperation zu schreiben sind, gemäß den
Schreiboperationsinformationen in die Netzwerkvorrichtung zu schreiben; und
die Cloudsteuerung (200) speziell zu Folgendem ausgelegt ist: wenn der Schreibsteuerbefehl
im Befehlsübertragungswarteschlangenmodul (2011) ausgelöst wird, Extrahieren der Daten,
die mittels der Schreiboperation zu schreiben sind, gemäß den Schreiboperationsinformationen
im Schreibsteuerbefehl aus dem Datenübertragungswarteschlangenmodul (2012) und Schreiben
der Daten, die mittels der Schreiboperation zu schreiben sind, in die Netzwerkvorrichtung
und, wenn eine Schreibantwortnachricht, die von der Netzwerkvorrichtung gesendet wurde,
empfangen wird, Schreiben der Schreibantwortnachricht, die von der Netzwerkvorrichtung
gesendet wurde, in das Antwortbefehlswarteschlangenmodul (2021).
7. Computervorrichtung (10) nach Anspruch 6, wobei
die Schreiboperationsinformationen eine Adresse der Netzwerkvorrichtung, eine Länge
der Daten, die mittels der Schreiboperation zu schreiben sind, und im Datenübertragungswarteschlangenmodul
(2012) eine Adresse der Daten, die mittels der Schreiboperation zu schreiben sind,
umfasst oder
die Schreiboperationsinformationen eine Knotenadresse und eine Versatzadresse der
Netzwerkvorrichtung, eine Länge der Daten, die mittels der Schreiboperation zu schreiben
sind, und im Datenübertragungswarteschlangenmodul (2012) eine Adresse der Daten, die
mittels der Schreiboperation zu schreiben sind, umfasst.
8. Computervorrichtung (10) nach Anspruch 6 oder 7, wobei
die CPU (100) ferner zu Folgendem ausgelegt ist: nach dem Schreiben des Schreibsteuerbefehls
in das Befehlsübertragungswarteschlangenmodul (2011) Abfragen in einer Umfrageweise,
ob die Schreibantwortnachricht, die von der Netzwerkvorrichtung gesendet wurde, im
Antwortbefehlswarteschlangenmodul (2021) existiert, und wenn die CPU (100) bestimmt,
dass die Schreibantwortnachricht, die von der Netzwerkvorrichtung gesendet wurde,
im Antwortbefehlswarteschlangenmodul (2021) existiert, Erhalten der Schreibantwortnachricht.
9. Computervorrichtung (10) nach Anspruch 6 oder 7, wobei
die Cloudsteuerung (200) ferner zu Folgendem ausgelegt ist: Bestimmen, ob die Schreibantwortnachricht,
die von der Netzwerkvorrichtung gesendet wurde, im Antwortbefehlswarteschlangenmodul
(2021) existiert, und Benachrichtigen der CPU (100) mittels eines Interrupts, wenn
die Schreibantwortnachricht, die von der Netzwerkvorrichtung gesendet wurde, im Antwortbefehlswarteschlangenmodul
(2021) existiert; und
die CPU (100) ferner zu Folgendem ausgelegt ist: Empfangen einer Interruptnachricht,
die von der Cloudsteuerung (200) gesendet wurde, und Erhalten der Schreibantwortnachricht
vom Antwortbefehlswarteschlangenmodul (2021) gemäß der Interruptnachricht.
10. Verfahren zum Lesen/Schreiben von Daten durch eine Computervorrichtung, wobei die
Computervorrichtung eine zentrale Verarbeitungseinheit, CPU, eine Cloudsteuerung und
eine Netzwerkschnittstelle umfasst, die CPU unter Verwendung einer Doppeldatenraten(DDR)-Schnittstelle
mit der Cloudsteuerung verbunden ist und die Netzwerkschnittstelle dazu ausgelegt
ist, die Cloudsteuerung mit einer Netzwerkvorrichtung zu verbinden; und das Verfahren
Folgendes umfasst:
Umwandeln (500) einer Anforderung zum Durchführen einer Lese-/Schreiboperation auf
der Netzwerkvorrichtung in einen Steuerbefehl und Schreiben des Steuerbefehls in ein
Übertragungswarteschlangenmodul der Cloudsteuerung durch die CPU, wobei der Steuerbefehl
verwendet wird, um die Cloudsteuerung anzuweisen, eine Leseoperation oder eine Schreiboperation
auf der Netzwerkvorrichtung durchzuführen, und der Steuerbefehl Operationsinformationen
der Leseoperation oder der Schreiboperation enthält; und
Durchführen (502) durch die Cloudsteuerung der Leseoperation oder der Schreiboperation
auf der Netzwerkvorrichtung gemäß den Operationsinformationen im Steuerbefehl, wenn
der Steuerbefehl im Übertragungswarteschlangenmodul ausgelöst wird, und Schreiben
einer Antwortnachricht, die von der Netzwerkvorrichtung gesendet wurde, in ein Antwortwarteschlangenmodul
der Cloudsteuerung, wenn die Antwortnachricht, die von der Netzwerkvorrichtung gesendet
wurde, empfangen wird.
11. Verfahren nach Anspruch 10, wobei
die Lese-/Schreiboperationsanforderung eine Leseoperationsanforderung ist; das Umwandeln
einer Anforderung zum Durchführen einer Lese-/Schreiboperation auf der Netzwerkvorrichtung
in einen Steuerbefehl und Schreiben des Steuerbefehls in ein Übertragungswarteschlangenmodul
der Cloudsteuerung durch die CPU entsprechend Folgendes umfasst:
Umwandeln der Leseoperationsanforderung in einen Lesesteuerbefehl und Schreiben des
Lesesteuerbefehls in ein Befehlsübertragungswarteschlangenmodul des Übertragungswarteschlangenmoduls
durch die CPU, wobei der Lesesteuerbefehl Leseoperationsinformationen enthält und
verwendet wird, um die Cloudsteuerung anzuweisen, eine Leseoperation auf der Netzwerkvorrichtung
gemäß den Leseoperationsinformationen durchzuführen; und
das Durchführen durch die Cloudsteuerung der Leseoperation oder der Schreiboperation
auf der Netzwerkvorrichtung gemäß den Operationsinformationen im Steuerbefehl und
das Schreiben einer Antwortnachricht, die von der Netzwerkvorrichtung gesendet wurde,
in ein Antwortwarteschlangenmodul der Cloudsteuerung, wenn die Antwortnachricht, die
von der Netzwerkvorrichtung gesendet wurde, empfangen wird, Folgendes umfasst:
Durchführen durch die Cloudsteuerung der Leseoperation oder der Schreiboperation auf
der Netzwerkvorrichtung gemäß den Leseoperationsinformationen im Steuerbefehl, wenn
der Lesesteuerbefehl im Befehlsübertragungswarteschlangenmodul ausgelöst wird, Empfangen
einer Leseantwortnachricht, die von der Netzwerkvorrichtung gesendet wurde, Schreiben
der Leseantwortnachricht, die von der Netzwerkvorrichtung gesendet wurde, in das Antwortbefehlswarteschlangenmodul
des Antwortwarteschlangenmoduls und Schreiben von Daten, die mittels der Leseoperation
zu lesen sind und von der Netzwerkvorrichtung zurückgegeben werden, in das Datenempfangswarteschlangenmodul
des Antwortwarteschlangenmoduls.
12. Verfahren nach Anspruch 11, wobei das Verfahren ferner Folgendes umfasst:
nach dem Schreiben des Lesesteuerbefehls in das Befehlsübertragungswarteschlangenmodul
Abfragen in einer Umfrageweise durch die CPU, ob die Leseantwortnachricht, die von
der Netzwerkvorrichtung gesendet wurde, im Antwortbefehlswarteschlangenmodul existiert,
und wenn die CPU bestimmt, dass die Leseantwortnachricht, die von der Netzwerkvorrichtung
gesendet wurde, im Antwortbefehlswarteschlangenmodul existiert und die Leseantwortnachricht
eine Leseerfolgsantwortnachricht ist, Lesen der Daten, die mittels der Leseoperation
zu lesen sind, aus dem Datenempfangswarteschlangenmodul.
13. Verfahren nach Anspruch 11, wobei das Verfahren ferner Folgendes umfasst:
Bestimmen durch die Cloudsteuerung, ob die Leseantwortnachricht, die von der Netzwerkvorrichtung
gesendet wurde, im Antwortbefehlswarteschlangenmodul existiert, und Benachrichtigen
der CPU mittels eines Interrupts, wenn die Leseantwortnachricht, die von der Netzwerkvorrichtung
gesendet wurde, im Antwortbefehlswarteschlangenmodul existiert; und
Empfangen einer Interruptnachricht, die von der Cloudsteuerung gesendet wurde, durch
die CPU, Erhalten der Leseantwortnachricht vom Antwortbefehlswarteschlangenmodul gemäß
der Interruptnachricht und, wenn die erhaltene Leseantwortnachricht einen Leseerfolg
anzeigt, Lesen der Daten, die mittels der Leseoperation zu lesen sind, aus dem Datenempfangswarteschlangenmodul.
14. Verfahren nach Anspruch 10, wobei
die Lese-/Schreiboperationsanforderung eine Schreiboperationsanforderung ist;
das Umwandeln einer Anforderung zum Durchführen einer Lese-/Schreiboperation auf der
Netzwerkvorrichtung in einen Steuerbefehl und Schreiben des Steuerbefehls in ein Übertragungswarteschlangenmodul
der Cloudsteuerung durch die CPU entsprechend Folgendes umfasst:
Umwandeln der Schreiboperationsanforderung durch die CPU in einen Schreibsteuerbefehl,
Schreiben des Schreibsteuerbefehls in das Befehlsübertragungswarteschlangenmodul des
Übertragungswarteschlangenmoduls und Schreiben von Daten, die mittels der Schreiboperation
zu schreiben sind, in das Datenübertragungswarteschlangenmodul des Übertragungswarteschlangenmoduls,
wobei der Schreibsteuerbefehl Schreiboperationsinformationen enthält und verwendet
wird, um die Cloudsteuerung anzuweisen, die Daten, die mittels der Schreiboperation
zu schreiben sind, gemäß den Schreiboperationsinformationen in die Netzwerkvorrichtung
zu schreiben; und
das Durchführen durch die Cloudsteuerung der Leseoperation oder der Schreiboperation
auf der Netzwerkvorrichtung gemäß den Operationsinformationen im Steuerbefehl und
das Schreiben einer Antwortnachricht, die von der Netzwerkvorrichtung gesendet wurde,
in ein Antwortwarteschlangenmodul der Cloudsteuerung, wenn die Antwortnachricht, die
von der Netzwerkvorrichtung gesendet wurde, empfangen wird, Folgendes umfasst:
wenn der Schreibsteuerbefehl im Befehlsübertragungswarteschlangenmodul ausgelöst wird,
Extrahieren der Daten, die mittels der Schreiboperation zu schreiben sind, gemäß den
Schreiboperationsinformationen im Schreibsteuerbefehl durch die Cloudsteuerung aus
dem Datenübertragungswarteschlangenmodul und Schreiben der Daten, die mittels der
Schreiboperation zu schreiben sind, in die Netzwerkvorrichtung und, wenn eine Schreibantwortnachricht,
die von der Netzwerkvorrichtung gesendet wurde, empfangen wird, Schreiben der Schreibantwortnachricht,
die von der Netzwerkvorrichtung gesendet wurde, in das Antwortbefehlswarteschlangenmodul
des Antwortwarteschlangenmoduls.
15. Verfahren nach Anspruch 14, wobei das Verfahren ferner Folgendes umfasst:
Bestimmen durch die Cloudsteuerung, ob die Schreibantwortnachricht, die von der Netzwerkvorrichtung
gesendet wurde, im Antwortbefehlswarteschlangenmodul existiert, und Benachrichtigen
der CPU mittels eines Interrupts, wenn die Schreibantwortnachricht, die von der Netzwerkvorrichtung
gesendet wurde, im Antwortbefehlswarteschlangenmodul existiert; und
Empfangen einer Interruptnachricht, die von der Cloudsteuerung gesendet wurde, durch
die CPU und Erhalten der Schreibantwortnachricht vom Antwortbefehlswarteschlangenmodul
gemäß der Interruptnachricht.
1. Dispositif informatique (10), comprenant une unité centrale de traitement (CPU) (100)
et un contrôleur de nuage (200), le contrôleur de nuage (200) comprenant un module
de file d'attente d'émission (201), un module de file d'attente de réponse (202),
une interface à débit de données double (DDR) (203) et une interface de réseau (204),
l'interface DDR (203) étant configurée pour connecter la CPU (100) au contrôleur de
nuage (200), et l'interface de réseau (204) étant configurée pour connecter le contrôleur
de nuage (200) à un dispositif de réseau ;
la CPU (100) étant configurée pour : après la génération d'une demande de réalisation
d'une opération de lecture/écriture sur le dispositif de réseau (204), convertir la
demande d'opération de lecture/écriture en une commande de contrôle, et écrire la
commande de contrôle dans le module de file d'attente d'émission (201), la commande
de contrôle étant utilisée pour donner l'instruction au contrôleur de nuage (200)
de réaliser une opération de lecture ou une opération d'écriture sur le dispositif
de réseau, et la commande de contrôle transportant une information d'opération de
l'opération de lecture ou de l'opération d'écriture ; et
le contrôleur de nuage (200) étant configuré pour : quand la commande de contrôle
dans le module de file d'attente d'émission (201) est déclenchée, réaliser l'opération
de lecture ou l'opération d'écriture sur le dispositif de réseau selon l'information
d'opération dans la commande de contrôle, recevoir un message de réponse envoyé par
le dispositif de réseau, et écrire le message de réponse envoyé par le dispositif
de réseau dans le module de file d'attente de réponse (202).
2. Dispositif informatique (10) selon la revendication 1, dans lequel :
la demande d'opération de lecture/écriture est une demande d'opération de lecture
;
le module de file d'attente d'émission (201) comprend un module de file d'attente
d'émission de commande (2011) et un module de file d'attente d'émission de données
(2012) ;
le module de file d'attente de réponse (2022) comprend un module de file d'attente
de commande de réponse (2021) et un module de file d'attente de réception de données
(2022) ;
la CPU (100) est spécifiquement configurée pour : convertir la demande d'opération
de lecture en une commande de contrôle de lecture, et écrire la commande de contrôle
de lecture dans le module de file d'attente d'émission de commande (2011), la commande
de contrôle de lecture transportant une information d'opération de lecture et étant
utilisée pour donner l'instruction au contrôleur de nuage de réaliser une opération
de lecture sur le dispositif de réseau selon l'information d'opération de lecture
; et
le contrôleur de nuage (200) est spécifiquement configuré pour : quand la commande
de contrôle de lecture dans le module de file d'attente d'émission de commande (2011)
est déclenchée, réaliser l'opération de lecture sur le dispositif de réseau selon
l'information d'opération de lecture dans la commande de contrôle de lecture, recevoir
un message de réponse de lecture envoyé par le dispositif de réseau, écrire le message
de réponse de lecture envoyé par le dispositif de réseau dans le module de file d'attente
de commande de réponse (2021), et écrire, dans le module de file d'attente de réception
de données (2022), des données qui doivent être lues au moyen de l'opération de lecture
et qui sont renvoyées par le dispositif de réseau.
3. Dispositif informatique (10) selon la revendication 2, dans lequel :
l'information d'opération de lecture comprend une adresse, dans le dispositif de réseau,
des données à lire au moyen de l'opération de lecture et une longueur des données
à lire au moyen de l'opération de lecture ; ou
l'information d'opération de lecture comprend une adresse de noeud et une adresse
de décalage, dans le dispositif de réseau, des données à lire au moyen de l'opération
de lecture et une longueur des données à lire au moyen de l'opération de lecture.
4. Dispositif informatique (10) selon la revendication 2 ou 3, dans lequel :
la CPU (100) est en outre configurée pour : après l'écriture de la commande de contrôle
de lecture dans le module de file d'attente d'émission de commande (2011), demander,
par interrogation, si le message de réponse de lecture envoyé par le dispositif de
réseau existe dans le module de file d'attente de commande de réponse (2021), et quand
la CPU (100) détermine que le message de réponse de lecture envoyé par le dispositif
de réseau existe dans le module de file d'attente de commande de réponse (2021) et
que le message de réponse de lecture est un message de réponse de réussite de lecture,
lire, dans le module de file d'attente de réception de données (2022), les données
à lire au moyen de l'opération de lecture.
5. Dispositif informatique (10) selon la revendication 2 ou 3, dans lequel :
le contrôleur de nuage (200) est en outre configuré pour : déterminer si le message
de réponse de lecture envoyé par le dispositif de réseau existe dans le module de
file d'attente de commande de réponse (2021), et notifier à la CPU (100) au moyen
d'une interruption quand le message de réponse de lecture envoyé par le dispositif
de réseau existe dans le module de file d'attente de commande de réponse (2021) ;
et la CPU (100) est en outre configurée pour : recevoir un message d'interruption
envoyé par le contrôleur de nuage (200), obtenir le message de réponse de lecture
en provenance du module de file d'attente de commande de réponse (2021) selon le message
d'interruption, et quand le message de réponse de lecture obtenu indique une réussite
de lecture, lire, dans le module de file d'attente de réception de données (2022),
les données à lire au moyen de l'opération de lecture.
6. Dispositif informatique (10) selon la revendication 1, dans lequel :
la demande d'opération de lecture/écriture est une demande d'opération d'écriture
;
le module de file d'attente d'émission (201) comprend un module de file d'attente
d'émission de commande (2011) et un module de file d'attente d'émission de données
(2012) ;
le module de file d'attente de réponse (202) comprend un module de file d'attente
de commande de réponse (2021) et un module de file d'attente de réception de données
(2022) ;
la CPU (100) est spécifiquement configurée pour : convertir la demande d'opération
d'écriture en une commande de contrôle d'écriture, écrire la commande de contrôle
d'écriture dans le module de file d'attente d'émission de commande (2011), et écrire,
dans le module de file d'attente d'émission de données (2012), des données à écrire
au moyen de l'opération d'écriture, la commande de contrôle d'écriture transportant
une information d'opération d'écriture et étant utilisée pour donner l'instruction
au contrôleur de nuage (200) d'écrire, dans le dispositif de réseau selon l'information
d'opération d'écriture, les données à écrire au moyen de l'opération d'écriture ;
et
le contrôleur de nuage (200) est spécifiquement configuré pour : quand la commande
de contrôle d'écriture dans le module de file d'attente d'émission de commande (2011)
est déclenchée, extraire, du module de file d'attente d'émission de données (2012)
selon l'information d'opération d'écriture dans la commande de contrôle d'écriture,
les données à écrire au moyen de l'opération d'écriture, et écrire, dans le dispositif
de réseau, les données à écrire au moyen de l'opération d'écriture ; et au moment
où un message de réponse d'écriture envoyé par le dispositif de réseau est reçu, écrire
le message de réponse d'écriture envoyé par le dispositif de réseau dans le module
de file d'attente de commande de réponse (2021).
7. Dispositif informatique (10) selon la revendication 6, dans lequel :
l'information d'opération d'écriture comprend une adresse du dispositif de réseau,
une longueur des données à écrire au moyen de l'opération d'écriture, et une adresse,
dans le module de file d'attente d'émission de données (2012), des données à écrire
au moyen de l'opération d'écriture ; ou
l'information d'opération d'écriture comprend une adresse de noeud et une adresse
de décalage du dispositif de réseau, une longueur des données à écrire au moyen de
l'opération d'écriture, et une adresse, dans le module de file d'attente d'émission
de données (2012), des données à écrire au moyen de l'opération d'écriture.
8. Dispositif informatique (10) selon la revendication 6 ou 7, dans lequel :
la CPU (100) est en outre configurée pour : après l'écriture de la commande de contrôle
d'écriture dans le module de file d'attente d'émission de commande (2011), demander,
par interrogation, si le message de réponse d'écriture envoyé par le dispositif de
réseau existe dans le module de file d'attente de commande de réponse (2021), et quand
la CPU (100) détermine que le message de réponse d'écriture envoyé par le dispositif
de réseau existe dans le module de file d'attente de commande de réponse (2021), obtenir
le message de réponse d'écriture.
9. Dispositif informatique (10) selon la revendication 6 ou 7, dans lequel :
le contrôleur de nuage (200) est en outre configuré pour : déterminer si le message
de réponse d'écriture envoyé par le dispositif de réseau existe dans le module de
file d'attente de commande de réponse (2021), et notifier à la CPU (100) au moyen
d'une interruption quand le message de réponse d'écriture envoyé par le dispositif
de réseau existe dans le module de file d'attente de commande de réponse (2021) ;
et
la CPU (100) est en outre configurée pour : recevoir un message d'interruption envoyé
par le contrôleur de nuage (200), et obtenir le message de réponse d'écriture en provenance
du module de file d'attente de commande de réponse (2021) selon le message d'interruption.
10. Procédé de lecture/écriture de données par un dispositif informatique, le dispositif
informatique comprenant une unité centrale de traitement (CPU), un contrôleur de nuage
et une interface de réseau, la CPU étant connectée au contrôleur de nuage au moyen
d'une interface à débit de données double (DDR), et l'interface de réseau étant configurée
pour connecter le contrôleur de nuage à un dispositif de réseau ; le procédé consistant
à :
convertir (500), par la CPU, une demande de réalisation d'une opération de lecture/écriture
sur le dispositif de réseau en une commande de contrôle, et écrire la commande de
contrôle dans un module de file d'attente d'émission du contrôleur de nuage, la commande
de contrôle étant utilisée pour donner l'instruction au contrôleur de nuage de réaliser
une opération de lecture ou une opération d'écriture sur le dispositif de réseau,
et la commande de contrôle transportant une information d'opération de l'opération
de lecture ou de l'opération d'écriture ; et
réaliser (502), par le contrôleur de nuage, l'opération de lecture ou l'opération
d'écriture sur le dispositif de réseau selon l'information d'opération dans la commande
de contrôle quand la commande de contrôle dans le module de file d'attente d'émission
est déclenchée, et écrire un message de réponse envoyé par le dispositif de réseau
dans un module de file d'attente de réponse du contrôleur de nuage au moment où le
message de réponse envoyé par le dispositif de réseau est reçu.
11. Procédé selon la revendication 10, dans lequel :
la demande d'opération de lecture/écriture est une demande d'opération de lecture
;
parallèlement, la conversion, par la CPU, d'une demande de réalisation d'une opération
de lecture/écriture sur le dispositif de réseau dans une commande de contrôle, et
écrire la commande de contrôle dans un module de file d'attente d'émission du contrôleur
de nuage, consiste à :
convertir, par la CPU, la demande d'opération de lecture en une commande de contrôle
de lecture, et écrire la commande de contrôle de lecture dans un module de file d'attente
d'émission de commande du module de file d'attente d'émission, la commande de contrôle
de lecture transportant une information d'opération de lecture et étant utilisée pour
donner l'instruction au contrôleur de nuage de réaliser une opération de lecture sur
le dispositif de réseau selon l'information d'opération de lecture ; et
la réalisation, par le contrôleur de nuage, de l'opération de lecture ou l'opération
d'écriture sur le dispositif de réseau selon l'information d'opération dans la commande
de contrôle, et écrire un message de réponse envoyé par le dispositif de réseau dans
un module de file d'attente de réponse du contrôleur de nuage au moment où le message
de réponse envoyé par le dispositif de réseau est reçu, consiste à :
réaliser, par le contrôleur de nuage, l'opération de lecture sur le dispositif de
réseau selon l'information d'opération de lecture dans la commande de contrôle de
lecture quand la commande de contrôle de lecture dans le module de file d'attente
d'émission de commande est déclenchée, recevoir un message de réponse de lecture envoyé
par le dispositif de réseau, écrire le message de réponse de lecture envoyé par le
dispositif de réseau dans le module de file d'attente de commande de réponse du module
de file d'attente de réponse, et écrire, dans le module de file d'attente de réception
de données du module de file d'attente de réponse, des données qui doivent être lues
au moyen de l'opération de lecture et qui sont renvoyées par le dispositif de réseau.
12. Procédé selon la revendication 11, le procédé consistant en outre à :
après l'écriture de la commande de contrôle de lecture dans le module de file d'attente
d'émission de commande, demander, par la CPU par interrogation, si le message de réponse
de lecture envoyé par le dispositif de réseau existe dans le module de file d'attente
de commande de réponse, et quand la CPU détermine que le message de réponse de lecture
envoyé par le dispositif de réseau existe dans le module de file d'attente de commande
de réponse et que le message de réponse de lecture est un message de réponse de réussite
de lecture, lire, dans le module de file d'attente de réception de données, les données
à lire au moyen de l'opération de lecture.
13. Procédé selon la revendication 11, le procédé consistant en outre à :
déterminer, par le contrôleur de nuage, si le message de réponse de lecture envoyé
par le dispositif de réseau existe dans le module de file d'attente de commande de
réponse, et notifier à la CPU au moyen d'une interruption quand le message de réponse
de lecture envoyé par le dispositif de réseau existe dans le module de file d'attente
de commande de réponse ; et
recevoir, par la CPU, un message d'interruption envoyé par le contrôleur de nuage,
obtenir le message de réponse de lecture en provenance du module de file d'attente
de commande de réponse selon le message d'interruption, et quand le message de réponse
de lecture obtenu indique une réussite de lecture, lire, dans le module de file d'attente
de réception de données, les données à lire au moyen de l'opération de lecture.
14. Procédé selon la revendication 10, dans lequel :
la demande d'opération de lecture/écriture est une demande d'opération d'écriture
;
parallèlement, la conversion, par la CPU, d'une demande de réalisation d'une opération
de lecture/écriture sur le dispositif de réseau dans une commande de contrôle, et
écrire la commande de contrôle dans un module de file d'attente d'émission du contrôleur
de nuage, consiste à :
convertir, par la CPU, la demande d'opération d'écriture en une commande de contrôle
d'écriture, écrire la commande de contrôle d'écriture dans le module de file d'attente
d'émission de commande du module de file d'attente d'émission, et écrire, dans le
module de file d'attente d'émission de données du module de file d'attente d'émission,
des données à écrire au moyen de l'opération d'écriture, la commande de contrôle d'écriture
transportant une information d'opération d'écriture et étant utilisée pour donner
l'instruction au contrôleur de nuage d'écrire, dans le dispositif de réseau selon
l'information d'opération d'écriture, les données à écrire au moyen de l'opération
d'écriture ; et
la réalisation, par le contrôleur de nuage, de l'opération de lecture ou l'opération
d'écriture sur le dispositif de réseau selon l'information d'opération dans la commande
de contrôle, et écrire un message de réponse envoyé par le dispositif de réseau dans
un module de file d'attente de réponse du contrôleur de nuage au moment où le message
de réponse envoyé par le dispositif de réseau est reçu, consiste à :
quand la commande de contrôle d'écriture dans le module de file d'attente d'émission
de commande est déclenchée, extraire, par le contrôleur de nuage, du module de file
d'attente d'émission de données selon l'information d'opération d'écriture dans la
commande de contrôle d'écriture, les données à écrire au moyen de l'opération d'écriture,
et écrire, dans le dispositif de réseau, les données à écrire au moyen de l'opération
d'écriture ; et au moment où un message de réponse d'écriture envoyé par le dispositif
de réseau est reçu, écrire le message de réponse d'écriture envoyé par le dispositif
de réseau dans le module de file d'attente de commande de réponse du module de file
d'attente de réponse.
15. Procédé selon la revendication 14, le procédé consistant en outre à :
déterminer, par le contrôleur de nuage, si le message de réponse d'écriture envoyé
par le dispositif de réseau existe dans le module de file d'attente de commande de
réponse, et notifier à la CPU au moyen d'une interruption quand le message de réponse
d'écriture envoyé par le dispositif de réseau existe dans le module de file d'attente
de commande de réponse ; et
recevoir, par la CPU, un message d'interruption envoyé par le contrôleur de nuage,
et obtenir le message de réponse d'écriture en provenance du module de file d'attente
de commande de réponse selon le message d'interruption.