CROSS-REFERENCE TO RELATED APPLICATION

This application claims priority to Chinese Patent Application No. CN202010158684.3, on file at the China National Intellectual Property Administration (CNIPA), having a filing date of Mar. 9, 2020, and having “METHOD, DEVICE, AND COMPUTER PROGRAM PRODUCT FOR MANAGING MEMORIES” as a title, the contents and teachings of which are herein incorporated by reference in their entirety.

TECHNICAL FIELD

Embodiments of this disclosure generally relate to the field of memories, and in particular, to a method, a device, and a computer program product for managing a memory.

BACKGROUND

Command queues for a memory can serve different requirements. For example, input/output (I/O) command queues can serve different I/O requirements. There are various types of command queues, such as user I/O command queues, reconstruction I/O command queues, and storage area network (SAN) replication I/O command queues. When another command queue exists, transmission and processing of commands in a user I/O command queue may be affected, resulting in an increased user I/O delay. This is unacceptable to users.

At present, a solution to the problem is to set a relatively low reconstruction I/O rate to avoid affecting the user I/O. However, in the event of a low user I/O requirement, such a solution is inefficient because the transmission bandwidth is underutilized.

SUMMARY OF THE INVENTION

A method, a device, and a computer program product for managing a memory are provided in the embodiments of this disclosure.

In a first aspect of this disclosure, a method for managing a memory is provided. The method includes: determining a set of weights corresponding to a plurality of command queues in the memory, each weight indicating the number of commands allowed to be transmitted in a corresponding command queue; detecting whether a transmission delay occurs in the plurality of command queues; and adjusting the set of weights based on a result of the detection.

In a second aspect of this disclosure, an electronic device is provided. The electronic device includes: at least one processing unit; and at least one memory coupled to the at least one processing unit and storing instructions for execution by the at least one processing unit, wherein when executed by the at least one processing unit, the instructions cause the electronic device to perform actions including: determining a set of weights corresponding to a plurality of command queues in the memory, each weight indicating the number of commands allowed to be transmitted in a corresponding command queue; detecting whether a transmission delay occurs in the plurality of command queues; and adjusting the set of weights based on a result of the detection.

In a third aspect of this disclosure, a computer program product is provided. The computer program product is tangibly stored in a non-transitory computer storage medium and includes machine-executable instructions. When executed by a device, the machine-executable instructions cause the device to perform any step of the method described according to the first aspect of this disclosure.

The summary is provided to introduce the choice of concepts in a simplified form, which will be further described in the detailed description below. The summary is neither intended to identify important features or necessary features of this disclosure, nor intended to limit the scope of this disclosure.

