WO2015180493A1 - 存储数据的处理方法、装置和系统 - Google Patents

存储数据的处理方法、装置和系统 Download PDF

Info

Publication number
WO2015180493A1
WO2015180493A1 PCT/CN2015/070030 CN2015070030W WO2015180493A1 WO 2015180493 A1 WO2015180493 A1 WO 2015180493A1 CN 2015070030 W CN2015070030 W CN 2015070030W WO 2015180493 A1 WO2015180493 A1 WO 2015180493A1
Authority
WO
WIPO (PCT)
Prior art keywords
data
control device
stored
persistent
storage medium
Prior art date
Application number
PCT/CN2015/070030
Other languages
English (en)
French (fr)
Inventor
魏巍
陈明宇
蒋德钧
熊劲
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2015180493A1 publication Critical patent/WO2015180493A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/08Addressing or allocation; Relocation in hierarchically structured memory systems, e.g. virtual memory systems

Definitions

  • the embodiments of the present invention relate to the field of computer technologies, and in particular, to a method, an apparatus, and a system for processing stored data.
  • a computer device stores data that does not have to be saved for a long time, such as a system operation log of a computer device, but in some cases, it is necessary to permanently save the data that is not necessarily stored for a long time, that is, to persist data;
  • a process running on a computer device requests to persist data
  • the data is requested to be written to the persistent storage medium from a non-persistent storage medium such as a cache or a DRAM (Dynamic Random Access Memory). (such as a disk)
  • the process needs to enter the kernel registration DMA (Direct Memory Access), obtain the DMA controller access rights, and then can write the start address, size, destination address, etc. of the data requested to be persistent Into the DMA controller.
  • kernel registration DMA Direct Memory Access
  • the process needs to write the physical source address of the data and the physical destination address for storing the data to the DMA controller.
  • the process on the computer device cannot be The physical source address and the physical destination address associated with the data are obtained. Therefore, the application range of the prior art is small, and data persistence cannot be widely implemented, which has a certain impact on persistent storage of data by various devices.
  • Embodiments of the present invention provide a method, an apparatus, and a system for processing stored data, which are used to optimize a process of data persistence to extend the scope of application.
  • an embodiment of the present invention provides a method for processing stored data, including:
  • the data to be stored is located in the storage control device In a non-persistent storage medium
  • the processing device transmits the virtual address to the storage control device to cause the storage control device to store the to-be-stored data in a persistent storage medium of the storage control device.
  • the processing method includes:
  • the storage control device queries the page table according to the virtual address of the data to be stored, and obtains a physical address of the data to be stored in the non-persistent storage medium;
  • the storage control device searches for the data to be stored in the non-persistent storage medium according to the physical address of the data to be stored in the non-persistent storage medium;
  • each physical address of the non-persistent storage medium is associated with a virtual address.
  • the processing method before the processing device sends the virtual address to the storage control device, the processing method further includes:
  • the processing device When a dirty value exists in the non-persistent cache of the processing device, the processing device sends the dirty value and the address associated with the dirty value to the storage control device.
  • the processing method further includes:
  • the storage control device updates data pointed to by the address associated with the dirty value in the non-persistent storage medium according to the dirty value.
  • the processing device is further configured with a persistent cache, where the persistent cache is used to store the virtual address pointing in the non-persistent cache of the processing device Cache data; when there is no remaining space in the persistent cache, the processing method further includes:
  • the processing device transmits data in the persistent cache to the storage control device to cause the storage control device to store data in the persistent cache into the persistent storage medium.
  • the processing method further includes:
  • the storage control device receives data in a persistent cache sent by the processing device
  • the storage control device stores data in the persistent cache into a persistent storage medium.
  • the sending, by the processing device, the virtual address to the storage control device includes:
  • the processing device acquires a mapping address of a control register of the storage control device, and writes a virtual address of the data to be stored to the mapping address to send the virtual address of the data to be stored to the storage Control device in the control register.
  • the storage control device before the storage control device stores the arbitrary data in the persistent storage medium, the arbitrary data is Stored in a non-volatile storage medium of the storage control device;
  • Any data in the non-volatile storage medium is stored in a persistent storage medium under preset conditions;
  • the preset condition at least includes: the processing device sends a storage indication to the storage control device.
  • an embodiment of the present invention provides a method for processing stored data, including:
  • the storage control device receives the virtual address of the data to be stored, and acquires, to be stored, the data to be stored in the non-persistent storage medium of the storage control device according to the virtual address;
  • the storage control device stores the to-be-stored data in the non-persistent storage medium into a persistent storage medium of the storage control device.
  • the acquiring the virtual address of the data to be stored, and acquiring the data to be stored associated with the virtual address according to the virtual address includes:
  • the storage control device reads a control register to receive a virtual address of data to be stored
  • the storage control device queries the page table according to the virtual address of the data to be stored, and obtains a physical address of the data to be stored in the non-persistent storage medium;
  • the storage control device searches for the data to be stored in the non-persistent storage medium according to the physical address of the data to be stored in the non-persistent storage medium;
  • each physical address of the non-persistent storage medium is associated with a virtual address.
  • the processing method before the reading the control register of the storage control device to obtain the virtual address of the data to be stored, the processing method further includes:
  • the storage control device receives an address associated with the dirty value sent by the processing device and the dirty value; the dirty value is located in a non-persistent cache of the processing device;
  • the storage control device updates data pointed to by the address associated with the dirty value in the non-persistent storage medium according to the dirty value.
  • the processing device is further configured with a persistent cache, where the persistent cache is used to store the virtual in the non-persistent cache of the processing device
  • the cached data pointed to by the address when there is no remaining space in the non-persistent cache, the processing method further includes:
  • the storage control device receives data in a persistent cache sent by the processing device
  • the storage control device stores data in the persistent cache into a persistent storage medium.
  • the storage control device is the arbitrary data before storing the arbitrary data in the persistent storage medium Stored in a non-volatile storage medium of the storage control device;
  • any data in the non-volatile storage medium is stored in the persistent storage medium under a preset condition; the preset condition at least includes: the storage control device receiving the storage indication sent by the processing device.
  • an embodiment of the present invention provides a processing device for storing data, specifically a processing device, including:
  • An acquiring module configured to acquire a virtual address of the data to be stored; the data to be stored is located in a non-persistent storage medium of the storage control device;
  • a processing module configured to send the virtual address to the storage control device, so that the storage control device stores the to-be-stored data into a persistent storage medium of the storage control device.
  • the processing module is further used to
  • the processing device When a dirty value exists in the non-persistent cache of the processing device, the processing device sends the dirty value and the address associated with the dirty value to the storage control device.
  • the processing device is further configured with a persistent cache, where the persistent cache is used to store the virtual address pointing in the non-persistent cache of the processing device Cache data; when there is no remaining space in the non-persistent cache, the processing module is also used
  • the processing module is specifically configured to be used
  • the processing device acquires a mapping address of a control register of the storage control device, and writes a virtual address of the data to be stored to the mapping address to send the virtual address of the data to be stored to the storage Control device in the control register.
  • the storage control device stores the arbitrary data in the non-volatile storage medium of the storage control device before storing the arbitrary data in the persistent storage medium;
  • Any data in the non-volatile storage medium is stored in a persistent storage medium under preset conditions;
  • the preset condition includes at least: the processing module sends a storage indication to the storage control device.
  • an embodiment of the present invention provides a processing device for storing data, which is specifically a storage control device, where the processing device includes:
  • a processing module configured to receive a virtual address of the data to be stored, and obtain, according to the virtual address, data to be stored in the non-persistent storage medium of the storage control device that is associated with the virtual address;
  • a storage module configured to store the to-be-stored data in the non-persistent storage medium into a persistent storage medium of the storage control device.
  • the processing module is specifically configured to
  • each physical address of the non-persistent storage medium is associated with a virtual address.
  • the processing module is further used for
  • the processing device Receiving, by the processing device, a dirty value and an address associated with the dirty value; the dirty value is located in a non-persistent cache of the processing device;
  • the processing device is further configured with a persistent cache, where the persistent cache is used to store the virtual address pointing in the non-persistent cache of the processing device Cache data, when there is no remaining space in the non-persistent cache, the processing module is further configured to receive data in the persistent cache sent by the processing device;
  • the processing module is further configured to trigger the storage module to cause the storage module to store data in the persistent cache into a persistent storage medium.
  • the storage module stores the arbitrary data in the non-volatile storage medium of the storage control device before storing any data in the persistent storage medium;
  • the arbitrary data in the non-volatile storage medium is stored in the persistent storage medium under a preset condition; the preset condition at least includes: the processing module receiving the storage indication sent by the processing device.
  • an embodiment of the present invention provides a storage system, including a processing device and a storage control device, where the processing device is connected to the storage control device by using a bus;
  • the processing device acquires a virtual address of the data to be stored; the data to be stored is located in a non-persistent storage medium of the storage control device;
  • the processing device sends the virtual address to the storage control device
  • the storage control device obtains a physical address of the to-be-stored data in the non-persistent storage medium according to the virtual address query page table of the data to be stored; in the page table, each physical of the non-persistent storage medium The address is associated with a virtual address;
  • the storage control device searches for the data to be stored in the non-persistent storage medium according to the physical address of the data to be stored in the non-persistent storage medium;
  • the storage control device stores the to-be-stored data in the non-persistent storage medium into a persistent storage medium of the storage control device to implement persistence of data to be stored.
  • the processing device before the processing device sends the virtual address to the storage control device, when there is a dirty value in the non-persistent cache of the processing device, the processing The device also sends the dirty value and the address associated with the dirty value to the storage control device;
  • the storage control device before the storage control device queries the page table according to the virtual address of the data to be stored, the storage control device further receives the dirty value sent by the processing device and the address associated with the dirty value;
  • the storage control device updates data pointed to by the address associated with the dirty value in the non-persistent storage medium according to the dirty value.
  • the processing device can directly control the storage control device to store the to-be-stored data to the persistent storage medium of the storage control device according to the virtual address of the data to be stored.
  • the data can be widely used in various scenarios, and the data to be stored cannot be persisted due to the inability to know the physical address of the data to be stored, thereby improving the persistent storage data of the storage system. Performance.
  • FIG. 1 is a schematic diagram of a storage system according to an embodiment of the present invention.
  • Embodiment 1 is a flowchart of Embodiment 1 of a method for processing stored data according to the present invention
  • Embodiment 3 is a flowchart of Embodiment 2 of a method for storing data according to the present invention
  • Embodiment 4 is a flowchart of Embodiment 3 of a method for storing data according to the present invention.
  • FIG. 5 is a flowchart of Embodiment 4 of a method for storing data according to the present invention.
  • FIG. 6 is a signaling diagram of Embodiment 5 of a method for storing data according to an embodiment of the present invention.
  • FIG. 7 is a structural diagram of Embodiment 1 of a processing device for storing data according to the present invention.
  • FIG. 8 is a structural diagram of Embodiment 2 of a processing apparatus for storing data according to the present invention.
  • FIG. 1 is a schematic diagram of a storage system according to an embodiment of the present invention.
  • the processing device 10 is connected to the storage control device 20 through a memory bus 30, wherein the processing device 10 includes at least a CPU (Central Processing Unit), an operating system controlled by the CPU, and an operating system.
  • the CPU is connected to the storage control device 20 through the memory bus 11, so that the CPU can access each storage medium in the storage control device through the load/store command.
  • the storage control device can be UAS (Unified Access).
  • UAS contains a processor and a variety of storage media, specifically including non-persistent storage media and persistent storage media, usually in non-persistent storage media for a relatively short time to store information The information in the persistent storage medium can be saved for a long time.
  • the data in the non-persistent storage medium is stored in the persistent storage medium
  • the data can be persisted;
  • the non-persistent storage medium in the UAS It can be DRAM, and the persistent storage medium can be specifically a flash memory, a hard disk, and a network storage device ( Network storage), etc.;
  • UAS can also include a non-volatile Non-Volatile Memory (NVM), which stores information for a longer period of time than a non-persistent storage medium, and stores the data in a non-volatile storage medium.
  • NVM non-volatile Non-Volatile Memory
  • the data is persisted; in addition, non-volatile storage media responds faster to CPU access than persistent storage media; because UAS has a processor, it has rich, intelligent data management functions, such as physical space. management.
  • FIG. 2 is a flowchart of Embodiment 1 of a method for processing stored data according to the present invention.
  • the embodiment is implemented in the storage system shown in FIG. 1.
  • the execution body of this embodiment is a processing device for storing data, and the processing device for storing data may adopt software and/or hardware.
  • the preferred embodiment of the processing device can be integrated into the CPU in the processing device shown in FIG. 1.
  • the embodiment includes:
  • the processing device acquires a virtual address of the data to be stored.
  • the data in some non-persistent storage media may be persistent by compiling a program instruction.
  • the data to be persisted is the data to be stored, and the location of the data to be stored in the program is indicated by a virtual address, and the operating system in the processing device is controlled by the CPU, and the process is started by running the above program.
  • the processing device sends a virtual address to the storage control device, so that the storage control device stores the data to be stored into the persistent storage medium of the storage control device.
  • the storage control device receives the virtual address by the storage control device, and the storage control device obtains the physical address of the data to be stored in the non-persistent storage medium according to the virtual address query page table of the data to be stored;
  • the control device searches for the data to be stored in the non-persistent storage medium according to the physical address of the data to be stored in the non-persistent storage medium, and then the storage control device stores the data to be stored to the persistent storage medium.
  • the persistence of the data to be stored is implemented; wherein, in the above page table, each physical address of the non-persistent storage medium is associated with a virtual address.
  • the storage control device can directly store the data to be stored in the persistent storage medium of the storage control device according to the virtual address of the data to be stored, so as to achieve persistent persistence of the data to be stored. Applicable to various scenarios, the data to be stored cannot be persisted due to the inability to know the physical address of the data to be stored, thereby improving the performance of the storage system for persistently storing data.
  • FIG. 3 is a flowchart of Embodiment 2 of a method for storing data according to the present invention. As shown in FIG. 3, this embodiment is further described on the basis of the embodiment shown in FIG. 2, as follows:
  • the processing device acquires a virtual address of the data to be stored by calling a persistent interface.
  • the user specifies the virtual address of the data to be stored by processing the CPU in the processing device, so that the process can indicate the location information of the data to be stored to the storage control device, and the virtual address of the data to be stored is the processing device.
  • the process is indicated to the storage control device; but in the prior art, when the process on the processing device requests to persist a certain data on the storage control device, the process needs to enter the kernel of the processing device before the storage control
  • the device indicates the location information of the data to be stored, and the location information must be a physical address.
  • the process obtains the virtual address of the data to be stored, and the physical address pointed to by the virtual address cannot be obtained.
  • the location information of the data to be stored cannot be indicated to the storage control device; but in this embodiment, the CPU in the processing device can directly indicate the virtual address of the data to be stored by calling the persistent interface, and does not need to enter the kernel state. Saves the overhead of processing device-to-process user-mode and kernel-state transitions; Need not accurately know the physical address of the virtual address points, to the storage control device can be realized to be indicative of the location information stored data, so that data persistence wide application scenarios.
  • the above-mentioned persistence interface is specifically a user-oriented API (Application Programming Interface). After the process on the processing device calls the persistent interface, the user interface is in the user state. The location information of the data to be stored may be indicated.
  • the data to be stored is stored in the non-persistent storage medium of the storage control device at the current time, and the virtual address of the data to be stored indicates a specific location of the data to be stored in the non-persistent storage medium.
  • the data to be stored is a, b, c three data, the data a is stored in the space pointed to by the virtual address 0000, the data b is stored in the space pointed to by the virtual address 0001, the data c is stored in the space pointed to by the virtual address 0002, and the expression form of the virtual address is specific 0000, 0001, and 0002, and may also be specifically a starting virtual address 0000 and a data length of "3".
  • the determinable data to be stored is stored in the virtual address 0000.
  • the processing device acquires a mapping address of a control register of the storage control device, and writes a virtual address of the to-be-stored data into the mapping address.
  • the process on the processing device calls the persistent interface under the control of the CPU, and then executes each instruction sequentially in the persistent interface.
  • the location of the control register of the storage control device is mapped to the process space of the process, and then the process space is in the process space.
  • There is an indication pointing to the control register of the storage control device Information indicating that the mapping address of the control register of the storage control device is written to the virtual address of the data to be stored by mapping the mapped address of the control register of the storage control device to send the virtual address of the data to be stored to
  • the storage control device controls a control register.
  • the processing device determines, according to the virtual address of the data to be stored, whether to find the cached data pointed to by the virtual address of the data to be stored in the non-persistent cache of the processing device; if yes, execute S204; if not, execute S206;
  • the data to be stored is also cached to the non-persistent cache of the processing device at the same time or after being stored to the non-persistent storage medium (specifically For the cache of the CPU, the cache layer of some devices is also set with NVM.
  • the NVM with a short save time and a volatile cache relative to the cache layer is called a non-persistent cache.
  • the NVM in the cache layer is a persistent cache.
  • the data a is also cached as a cached data in the non-persistent cache of the processing device. It can be understood that when the data a is stored in the non-persistent cache, the data a is Binding to the physical address of the data a in the non-persistent storage medium, the virtual address of the data a is indicated when the process invokes the data a, but the MMU in the processing device (Memory Man)
  • the ageing unit, the memory management unit can resolve the virtual address of the data a to the physical address of the data a in the non-persistent storage medium, and if the physical address of the data a in the non-persistent storage medium is found in the non-persistent cache
  • the data a as the cache data can be found in the non-persistent cache. Therefore, in the embodiment, whether the virtual storage address of the data to be stored can be used to determine whether to find each of the non-persistent caches.
  • S206 is directly executed. Specifically, the process does not use the written data after writing the data to the non-persistent storage medium, or the process is This embodiment has ended a run before, when there is no cache data pointed to by the virtual address of the data to be stored in the non-persistent cache, but the data to be stored written in the non-persistent storage medium still exists, then In this embodiment, when the process requests to persist data, S206 may be directly executed;
  • the process on the processing device executes each instruction in the persistent interface under the control of the CPU, and one of the instructions in the persistent interface is: sending a persistent indication to the CPU; that is, the present The step is performed after the CPU receives the persistence indication.
  • the processing device determines whether there is a dirty value according to status bits of each cached data. If yes, execute S205, and if not, execute S206.
  • the cached data may be determined to be a dirty value according to the status bits of each cached data;
  • the data a stored in the non-persistent storage medium is assigned a value of 1, but then the process on the processing device calls the data a, and the value of the data a is changed from 1 to 2, and Writing the data a with the value 2 as the cache data into the non-persistent cache, and when the process changes the assignment of the data a, when the data a with the value 2 is written as the cache data into the non-persistent cache,
  • the status bit of the cached data is represented as a dirty value, that is, the assignment of the data a in the non-persistent cache is different from the assignment of the data a in the non-persistent storage medium, and it can be said that the data a in the non-persistent
  • the processing device sends the dirty value and the address associated with the dirty value to the storage control device.
  • the data to be stored needs to be kept up-to-date for the first process, that is, the value of the data a is the latest state for the process, but The value of the data a in the non-persistent storage medium is still 1, therefore, the judgment of S204 above, if there is a dirty value in the non-persistent cache, the dirty value in the non-persistent cache, that is, the data a assigned a value of 2 Sending to the storage control device, so that the storage control device updates the data to be stored, and the address associated with the dirty value is the data a bound to the data a in the non-persistent cache in the non-persistent storage medium.
  • the storage control device receives the dirty value sent by the processing device and the address associated with the dirty value; the storage control device points the data pointed to by the address associated with the dirty value in the non-persistent storage medium according to the dirty value. Update.
  • the processing device sends a persistent instruction to the storage control device.
  • the CPU of the processing device may trigger the storage control device to store the to-be-stored data in the non-persistent storage medium associated with the virtual address of the data to be stored in the persistent storage medium by sending a persistent instruction to the storage control device.
  • this step is an optional step, and flexible, when the embodiment executes S202, the storage control device reads the virtual address in the control register; but since the processing device needs to send the dirty value to the storage control device, The data that is persisted by the storage control device is in the latest state, and usually after executing S203 to S205, the non-persistent storage medium is ensured.
  • the persistent control instruction is sent to the storage control device, and then the storage control device reads the control register to obtain the virtual address, so that the storage control device queries the page according to the virtual address of the data to be stored.
  • a table obtaining a physical address of the data to be stored in a non-persistent storage medium; and subsequently storing, by the storage control device, the physical address in the non-persistent storage medium according to the physical address of the data to be stored in the non-persistent storage medium The data to be stored is then stored in the persistent storage medium.
  • the storage control device also stores page tables for different processes. Therefore, when executing S202, if the current processing device is running a process, that is, the virtual address of the data to be stored in the foregoing S201 is indicated by the first process, the mapping address of the control register of the storage control device is located in the process space of the first process; and when the foregoing S202 is executed And writing, to the mapping address of the control register of the storage control device, the identifier of the first process and/or the release identifier; the identifier of the first process may cause the storage control device to search for a page table corresponding to the identifier of the first process; The release identifier is used to notify the storage control device whether to release the data to be stored in the non-persistent storage medium after storing the data to be stored in the persistent storage medium in the storage control device ;
  • the processing device sends a storage indication to the storage control device, so that the to-be-stored data associated with the first process in the non-persistent storage medium is stored in the persistent storage medium in the storage control device.
  • the storage control device Before the storage control device stores any data (including the to-be-stored data in the non-persistent storage medium) in the persistent storage medium, storing the arbitrary data to the non-volatile storage medium of the storage control device; Any data in the non-volatile storage medium is stored in the persistent storage medium under a preset condition; the preset condition includes at least: sending a storage indication to the storage control device.
  • the foregoing storage indication may be a message that the first process is finished running.
  • the non-volatile storage medium has a faster response to the read/write request of the processing device than the persistent storage medium, and the data is After storage to a non-volatile storage medium, data can be persisted, so when data is persisted, it is preferred to store the data in a non-volatile storage medium to have a faster response to the processing device;
  • the capacity of the non-volatile storage medium is small, and the capacity of the persistent storage medium is large, so the data in the persistent storage medium is stored under some preset conditions to Persisting the storage medium
  • the foregoing storage indication may be a running end message of the first process, and the first process may be performed after the first process indicates that the data to be persisted is persistent.
  • the persistent data is also called, so when the data is persisted, it is stored in a non-volatile storage medium, and the non-volatile storage medium also stores data indicated by other processes, when the first process ends. And storing data associated with the first process in the non-volatile storage medium into the persistent storage medium.
  • the following operations may be selected to perform the following operations D1 to D2 instead of the foregoing S203 to S205, specifically,
  • the processing device determines whether there is a dirty value according to a status bit of each cached data in the non-persistent cache, and if so, executes D2, and if not, executes S206.
  • the processing device sends the dirty value and the address associated with the dirty value to the storage control device.
  • all the dirty values in the non-persistent cache may be stored in the non-persistent storage medium.
  • the data to be stored indicated by the first process is a, b, c, but
  • the data a as the cached data is a dirty value, but in this case, there are other data in the non-persistent cache with dirty values, but by executing D1 to D2, all the non-persistent caches will be executed.
  • the dirty value is stored in the non-persistent storage medium, and the dirty value a is also stored in the non-persistent storage medium, but the virtual address of the data to be stored indicated by the first process is not needed, and the non-persistent cache is not searched.
  • the cached data pointed to by the virtual address of the data to be stored saves the overhead required to perform the lookup process.
  • the storage control device directly stores the data to be stored in the persistent storage medium of the storage control device according to the virtual address of the data to be stored, so as to implement data to be stored.
  • Persistence can be widely used in various scenarios, can not achieve the persistence of the data to be stored due to the inability to know the physical address of the data to be stored, and improve the performance of the storage system to store data persistently; and the process does not need to fall into the kernel
  • the virtual address of the data to be stored can be indicated, and the conversion between the user state and the kernel state is not required for the process, thereby saving the overhead required for the transition between the user state and the kernel state.
  • FIG. 4 is a flowchart of Embodiment 3 of a method for storing data according to the present invention.
  • the cache of the processing device is provided with a persistent cache (specifically, NVM set in the cache layer) in addition to the non-persistent cache, and the persistent cache is used to store the non-persistence cache.
  • the cache data pointed to by the virtual address in the cache is persistent, and the embodiment is as follows:
  • the processing device acquires a virtual address of the data to be stored by calling a persistent interface.
  • the processing device acquires a mapping address of a control register of the storage control device, and writes a virtual address of the to-be-stored data into the mapping address.
  • the processing device determines, according to the virtual address of the data to be stored, whether it is in the non-persistent cache. Finding each cached data pointed to by the virtual address of the data to be stored; if yes, executing S304; if not, executing S308;
  • S301 to S303 are similar to the foregoing S201 to S203, and are not described herein again.
  • the processing device determines whether there is any remaining space in the persistent cache; if yes, execute S305, if no, execute S306.
  • the processing device stores each of the cached data into the remaining space.
  • the data to be stored in the non-persistent cache that is, the cached data
  • the cached data is preferentially stored in the persistent cache.
  • the processing device determines whether there is a dirty value according to status bits of each cached data. If yes, execute S307, and if not, execute S308.
  • the step is performed.
  • the processing device sends the dirty value and the address associated with the dirty value to the storage control device.
  • S306 to S307 are similar to the above S204 to S205, and reference may be made to S204 to S205.
  • the processing device sends a persistent instruction to the storage control device.
  • the processing device may have the possibility of running multiple processes. Therefore, when the S302 is executed, if the current process is running on the first process, the virtual address of the data to be stored in the foregoing S301 is the first process. Obtaining, the mapped address of the control register of the storage control device is located in the process space of the first process; and writing the identifier of the first process to the mapped address of the control register of the storage control device and/or Or releasing the identifier; the identifier of the first process may cause the storage control device to search for a page table corresponding to the identifier of the first process; the release identifier is used to notify the storage control device to store in the persistent storage medium in the storage control device Whether the data to be stored in the non-persistent storage medium is released after the data to be stored.
  • the data persistence is implemented by S305, but the space of the persistent cache is limited. After multiple processes sequentially request data persistence, there is no space left in the persistent cache, and then S307 is executed in this embodiment. Simultaneously or after executing S308, the data in the persistent cache is also sent to the storage control device, and then the storage control device receives the data in the persistent cache sent by the processing device, and stores the data in the persistent cache. To a persistent storage medium.
  • S309 can also be performed:
  • the processing device sends the message that the first process ends to the storage control device, so that the to-be-stored data associated with the first process in the non-persistent storage medium is stored in the final storage medium in the storage control device.
  • the storage control device can directly store the data to be stored in the persistent storage medium of the storage control device according to the virtual address of the data to be stored, so as to achieve persistent persistence of the data to be stored.
  • the data to be stored cannot be persisted due to the inability to know the physical address of the data to be stored, and the performance of the storage system to store data persistently is improved; and the process does not need to be trapped in the kernel, and can be indicated
  • the virtual address of the stored data does not need to provide a conversion between the user state and the kernel state for the process, thereby saving the overhead required for the conversion between the user state and the kernel state.
  • FIG. 5 is a flowchart of Embodiment 4 of a method for storing data according to the present invention.
  • the execution body of the embodiment is a processing device for storing data, and the processing device may be implemented by using software and/or hardware.
  • the processing device may be the foregoing storage control device. as follows:
  • the storage control device receives a virtual address of the data to be stored, and acquires, to be stored, data to be stored in the non-persistent storage medium of the storage control device according to the virtual address.
  • the storage control device receives the virtual address of the data to be stored by reading the control register.
  • the storage control device stores the to-be-stored data in the non-persistent storage medium into a persistent storage medium of the storage control device.
  • the data to be stored is stored in the persistent storage medium of the storage control device according to the virtual address of the data to be stored, so as to implement persistence of the data to be stored, which can be widely applied to various scenarios.
  • the performance of the data to be stored cannot be persisted because the process on the processing device cannot know the physical address of the data to be stored, thereby improving the performance of the storage system for persistently storing data.
  • FIG. 6 is a signaling diagram of Embodiment 5 of a method for storing data according to an embodiment of the present invention. As shown in FIG. 6, the embodiment is described on the basis of any of the embodiments shown in FIG. 2 to FIG. 5, and the details are as follows:
  • the processing device acquires a virtual address of the data to be stored by calling a persistent interface.
  • the processing device writes the virtual address of the data to be stored into a mapping address of a control register of the storage control device to send the virtual address to the storage control device.
  • the processing device sends a persistent instruction to the storage control device.
  • the storage control device reads the control register to receive a virtual address of the data to be stored.
  • the storage control device after receiving the persistent instruction sent by the processing device, the storage control device reads the control register.
  • the storage control device queries the page table according to the virtual address of the data to be stored, and obtains a physical address corresponding to the virtual address of the data to be stored in the non-persistent storage medium.
  • the virtual address is used to indicate the location of reading and writing data, but when the storage control device writes or reads data in any storage medium, it is necessary to know that the data is in the storage medium.
  • the physical address therefore, S505 is performed, and each physical address of the non-persistent storage medium in the page table is associated with a virtual address.
  • the storage control device allocates a storage resource block for each process, that is, each process uses The storage resource blocks are different, so that the physical addresses of the resource blocks are also different, but each process uses a virtual address when running on the processing device, so the storage control device establishes a page table for each process, so in this embodiment
  • the process of requesting data persistence is the first process
  • the storage control device executes S504
  • the identifier of the first process is also read, so when S505 is executed, according to the identifier of the first process, in the page table library. Querying a first page table corresponding to the identifier of the first process; at least one of the page tables is stored in the page table library, and each of the page tables corresponds to an identifier of a process.
  • the storage control device executes S505, the data to be stored is stored in the persistent storage medium.
  • the following S506 may be optionally performed:
  • the storage control device obtains the to-be-stored data according to the physical address of the virtual address of the data to be stored in the non-persistent storage medium, and stores the to-be-stored data in the non-volatile storage medium.
  • the arbitrary data is stored in the non-volatile storage medium of the storage control device; specifically, the non-volatile storage medium is divided into at least two a storage area, each of the storage areas has a different access delay, and the data to be stored is preferentially stored in a storage area with the shortest access delay among the two storage areas;
  • the non-persistent storage medium includes the storage area 1, and the storage area 2 and the storage area 3, wherein the access delay of the storage area 1 is the smallest, the access delay of the storage area 3 is the largest, the storage area 2 is centered, the storage area 1 is relative to the storage area 2 and the storage area 3, and the storage area 1 is the first storage.
  • the storage area 2 or the storage area 3 is the second storage area, it can be understood that the storage area 2 is the first storage area with respect to the storage area 3.
  • the storage control device releases the to-be-stored data in the non-persistent storage medium according to the release identifier.
  • the storage control device establishes a first mapping relationship according to the virtual address of the data to be stored and the location of the to-be-stored data in the non-volatile storage medium, and the virtual address of the data to be stored in the page table. Deleting a physical address corresponding to the virtual address of the data to be stored;
  • the virtual address 0000 of the data a corresponds to the physical address m1 in the non-persistent storage medium before the execution of S507, but after executing S507, the data a does not exist at the physical address m1, and only the storage space of the non-volatile storage medium The data a exists in the c1, but the first process on the processing device is still to read the data at the physical address m1 according to the virtual address 0000. Therefore, the mapping relationship between 0000 and c1, that is, the first mapping relationship, needs to be established.
  • the storage control device establishes a second mapping relationship according to the physical address of the to-be-stored data in the non-persistent storage medium and the location of the to-be-stored data in the non-volatile storage medium.
  • mapping relationship between the physical addresses m1 and c1 that is, the second mapping relationship, when the first process modifies the data a again.
  • the assignment of the data a in c1 can be synchronously modified. This step is a case in this embodiment, and is shown in FIG. 6. Not shown.
  • the data to be stored in the first storage area is migrated to the second storage area of the at least two storage areas, if S507 to S508 are performed, the data to be stored is in the second according to the data to be stored.
  • the location in the storage area updates the first mapping relationship; if S509 is performed, the second mapping relationship is updated according to the location of the to-be-stored data in the second storage area.
  • S510 can also be executed
  • the storage control device stores the to-be-stored data in the non-volatile storage medium into the persistent storage medium.
  • a storage medium provides a storage block to store data
  • the storage block is used by a process in the form of a file.
  • a process creates a word file, which can be regarded as using a storage block in a storage medium, and the process writes in a word file.
  • the data a is entered, the data a is stored in the storage block corresponding to the word file.
  • the data to be stored is also associated with the file identifier, and each storage block is associated with the persistent storage medium. a file identifier.
  • the data to be stored in the non-volatile storage medium is stored in the first file identifier according to the first file identifier associated with the data to be stored in the non-volatile storage medium.
  • the following S511 can also be performed;
  • the storage control device is configured to store data to be stored in the non-volatile storage medium according to a location of data to be stored in the non-volatile storage medium, and a persistent storage medium according to the first file identifier.
  • the location of the storage block establishes a third mapping relationship.
  • the mapping relationship between c1 and n1 may be established.
  • the processing device modifies the value of the data a in the cache data a or the non-persistent storage medium again, correspondingly, according to the first mapping relationship or the second mapping relationship, the synchronous modification is located in the non-volatile
  • the assignment of the data a in the storage medium, and further, the data a in the persistent storage medium is synchronously modified according to the third mapping relationship.
  • the data to be stored that is accessed the least in the preset time period is stored according to the access record of each data to be stored in the data maintenance table.
  • the storage control device receives the dirty value sent by the processing device and the An address associated with the dirty value; updating, according to the dirty value, data pointed to by the address associated with the dirty value in the non-persistent storage medium;
  • the processing device will also persist in the cache while or after performing the steps described in S308.
  • the data is sent to the storage control device, and the storage control device further receives the data in the persistent cache and stores the data in the persistent cache into the persistent storage medium.
  • the processing device has a faster response, storing the arbitrary data to the non-volatile storage medium of the storage control device before storing any data in the persistent storage medium (which also includes data in the persistent cache) middle.
  • the storage control device may process the virtual address as a physical address according to the virtual address of the data to be stored, so as to store the data to be stored in the persistent storage medium of the storage control device to implement storage.
  • the persistence of data can be widely applied to various scenarios. The process on the processing device cannot know the physical address of the data to be stored, and the data to be stored cannot be persisted, thereby improving the performance of the storage system for persistent storage of data. .
  • FIG. 7 is a structural diagram of Embodiment 1 of a device for processing stored data according to the present invention.
  • the processing device for storing data of the present embodiment may be integrated on the CPU of the foregoing processing device, that is, the processing device of the embodiment is specifically a processing device.
  • the processing device includes:
  • the obtaining module 11 is configured to obtain a virtual address of the data to be stored; the data to be stored is located in a non-persistent storage medium of the storage control device;
  • the processing module 12 is configured to send the virtual address to the storage control device, so that the storage control device stores the to-be-stored data into a persistent storage medium of the storage control device.
  • processing module 12 is further used to calculate the processing module 12 .
  • the processing device When a dirty value exists in the non-persistent cache of the processing device, the processing device sends the dirty value and the address associated with the dirty value to the storage control device
  • a processing cache is further provided with a persistent cache, where the persistent cache is used to store cached data pointed by the virtual address in the non-persistent cache; when the non-persistent cache is in the cache When there is no remaining space, the processing module is also used
  • processing module 12 sends the virtual address to the storage control device, the processing module 12 is specifically used to
  • the processing device acquires a mapping address of a control register of the storage control device, and writes a virtual address of the data to be stored to the mapping address to send the virtual address of the data to be stored to the storage Control device in the control register.
  • the storage control device stores any data in the persistent storage medium, Is storing the arbitrary data in a non-volatile storage medium of the storage control device;
  • Any data in the non-volatile storage medium is stored in a persistent storage medium under preset conditions;
  • the preset condition includes at least: the processing module sends a storage indication to the storage control device.
  • the processing device storing the data may store the data to be stored in the persistent storage medium of the storage control device according to the virtual address of the data to be stored, so as to implement persistence of the data to be stored. Applicable to various scenarios, the process of the data to be stored cannot be obtained because the process on the processing device cannot know the physical address of the data to be stored, and the performance of the persistent storage data of the storage system is improved.
  • FIG. 8 is a structural diagram of Embodiment 2 of a processing apparatus for storing data according to the present invention.
  • the processing device in this embodiment is preferably integrated on the storage control device, that is, the processing device is specifically a storage control device.
  • the processing device includes:
  • the processing module 21 is configured to receive a virtual address of the data to be stored, and acquire, according to the virtual address, data to be stored associated with the virtual address in the non-persistent storage medium of the storage control device;
  • the storage module 22 is configured to store the to-be-stored data in the non-persistent storage medium into a persistent storage medium of the storage control device to implement persistence of data to be stored.
  • processing module 21 is specifically configured to
  • each physical address of the non-persistent storage medium is associated with a virtual address.
  • processing module 21 is further configured to:
  • the processing device Receiving, by the processing device, a dirty value and an address associated with the dirty value; the dirty value is located in a non-persistent cache of the processing device;
  • the foregoing processing device is further configured with a persistent cache, where the persistent cache is configured to store cached data pointed by the virtual address in the non-persistent cache, where the non-persistent cache does not exist.
  • the processing module is further configured to receive data in the persistent cache sent by the processing device;
  • the processing module 21 is further configured to trigger the storage module 22 to cause the storage module 22 to store data in the persistent cache into a persistent storage medium.
  • the storage module 22 stores the arbitrary data in the non-volatile storage medium of the storage control device before storing any data in the persistent storage medium;
  • the arbitrary data in the non-volatile storage medium is stored in the persistent storage medium under a preset condition; the preset condition at least includes: the processing module 21 receiving the storage indication sent by the processing device.
  • the storage control device may process the virtual address as a physical address according to the virtual address of the data to be stored, so as to store the data to be stored in the persistent storage medium of the storage control device to implement storage.
  • the persistence of data can be widely applied to various scenarios. The process on the processing device cannot know the physical address of the data to be stored, and the data to be stored cannot be persisted, thereby improving the performance of the storage system for persistent storage of data. .
  • an embodiment of the present invention further provides a storage system, where the storage system includes a processing device 10 and a storage control device; and the processing device 10 is connected to the storage control device 20, then the processing device 10 Communication with the storage control device 20 is possible; in particular, the processing device 10 can be connected to the storage control device 20 via the memory bus 30,
  • the processing device 10 acquires a virtual address of data to be stored; the data to be stored is located in a non-persistent storage medium of the storage control device;
  • the processing device 10 sends the virtual address to the storage control device
  • the storage control device 20 obtains a physical address of the data to be stored in the non-persistent storage medium according to the virtual address query page table of the data to be stored; in the page table, each physical of the non-persistent storage medium The address is associated with a virtual address;
  • the storage control device 20 searches for the data to be stored in the non-persistent storage medium according to the physical address of the data to be stored in the non-persistent storage medium;
  • the storage control device 20 stores the data to be stored in the non-persistent storage medium into a persistent storage medium of the storage control device to implement persistence of data to be stored.
  • the processing device 10 before the processing device 10 sends the virtual address to the storage control device 20, when there is a dirty value in the non-persistent cache of the processing device 10, the processing device 10 further Sending the dirty value and the address associated with the dirty value to the storage control device 20;
  • the storage control device 20 before the storage control device 20 queries the page table according to the virtual address of the data to be stored, the storage control device 20 further receives the dirty value sent by the processing device 10 and the address associated with the dirty value;
  • the storage control device 20 updates the data pointed to by the address associated with the dirty value in the non-persistent storage medium according to the dirty value.
  • the processing device sends the virtual address of the data to be stored to the storage control device, and the storage control device can process the virtual address as a physical address, thereby storing the to-be-stored data to the persistent storage of the storage control device.
  • the persistence of the data to be stored can be widely applied to various scenarios, and the processing device cannot be persistent because the physical address of the data to be stored cannot be known by the processing device, thereby improving the storage system persistence. The performance of storing data.
  • the aforementioned program can be stored in a computer readable storage medium.
  • the program when executed, performs the steps including the foregoing method embodiments; and the foregoing storage medium includes various media that can store program codes, such as a ROM, a RAM, a magnetic disk, or an optical disk.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Memory System Of A Hierarchy Structure (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Holo Graphy (AREA)

Abstract

一种存储数据的处理方法、装置和系统,该方法包括:处理设备获取待存储数据的虚拟地址(S101);所述待存储数据位于存储控制设备的非持久化存储介质中;所述处理设备将所述虚拟地址发送至所述存储控制设备,以使所述存储控制设备将所述待存储数据存储至所述存储控制设备的持久化存储介质中(S102);通过存储数据的处理方法和装置,可根据待存储数据的虚拟地址,直接控制存储控制设备将所述待存储数据存储至所述存储控制设备的持久化存储介质中,以实现待存储数据的持久化,使得数据持久化广泛应用于各种场景下,不会由于不能获知待存储数据的物理地址而不能实现待存储数据的持久化,从而提升了存储系统持久化存储数据的性能。

Description

存储数据的处理方法、装置和系统
本申请要求于2014年5月30日提交中国专利局、申请号为201410240335.0、发明名称为“存储数据的处理方法、装置和系统”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本发明实施例涉及计算机技术领域,尤其涉及一种存储数据的处理方法、装置和系统。
背景技术
通常计算机设备会存储一些不必长久保存的数据,例如计算机设备的系统运行日志等,但在一些情况下,需要将上述不必长久保存的数据进行长久保存,即需要将数据持久化;在现有技术中,计算机设备上运行的进程请求将数据持久化时,即请求将数据从如缓存、DRAM(Dynamic Random Access Memory,即动态随机存取存储器)等非持久化存储介质中写入持久化存储介质(如磁盘)时,该进程需进入内核注册DMA(Direct Memory Access,直接内存访问),获得DMA控制器访问权限,随后才可将请求持久化的数据的起始地址、大小、目的地址等写入DMA控制器。
采用上述技术方案时发现,进程需将数据的物理源地址、用于持久化存储该数据的物理目的地址均写入DMA控制器,但在较多的应用场景中,计算机设备上的进程并不能获得该数据关联的物理源地址、物理目的地址,因此现有技术的应用范围较小,不能广泛的实施数据持久化,对各种设备持久化存储数据造成一定的影响。
发明内容
本发明实施例提供一种存储数据的处理方法、装置和系统,用于优化对数据持久化的过程,以扩展应用范围。
第一方面,本发明实施例提供一种存储数据的处理方法,包括:
处理设备获取待存储数据的虚拟地址;所述待存储数据位于存储控制设备 的非持久化存储介质中;
所述处理设备将所述虚拟地址发送至所述存储控制设备,以使所述存储控制设备将所述待存储数据存储至所述存储控制设备的持久化存储介质中。
结合第一方面,在第一实施方式中,在所述处理设备将所述虚拟地址发送至所述存储控制设备之后,所述处理方法包括:
所述存储控制设备根据所述待存储数据的虚拟地址查询页表,获得所述待存储数据在非持久存储介质中的物理地址;
所述存储控制设备根据所述待存储数据在非持久存储介质中的物理地址,在所述非持久存储介质中查找到所述待存储数据;
所述页表中,所述非持久存储介质的每一个物理地址关联一个虚拟地址。
结合第一方面第一实施方式,在第二实施方式中,在所述处理设备将所述虚拟地址发送至所述存储控制设备之前,所述处理方法还包括:
当所述处理设备的非持久化缓存中存在脏值时,所述处理设备向所述存储控制设备发送该脏值和该脏值关联的地址。
结合第一方面第二实施方式,在第三实施方式中,在所述处理设备向所述存储控制设备发送该脏值和该脏值关联的地址之后,所述处理方法还包括:
所述存储控制设备接收所述处理设备发送的脏值和该脏值关联的地址;
所述存储控制设备根据所述脏值,将所述非持久化存储介质中该脏值关联的地址所指向的数据进行更新。
结合第一方面第一实施方式,在第四实施方式中,所述处理设备还设置有持久化缓存,所述持久化缓存用于存储所述处理设备的非持久化缓存中所述虚拟地址指向的缓存数据;当所述持久化缓存中不存在剩余空间时,则所述处理方法还包括:
所述处理设备将所述持久化缓存中的数据发送至所述存储控制设备,以使所述存储控制设备将所述持久化缓存中的数据存储至所述持久化存储介质内。
结合第一方面第四实施方式,在第五实施方式中,在所述处理设备将所述持久化缓存中的数据发送至所述存储控制设备之后,所述处理方法还包括:
所述存储控制设备接收处理设备发送的持久化缓存中的数据;
所述存储控制设备将所述持久化缓存中的数据存储至持久化存储介质中。
结合第一方面至第一方面第五实施方式中的任一种实施方式,在第六实施方式中,所述处理设备将所述虚拟地址发送至所述存储控制设备,包括:
所述处理设备获取所述存储控制设备的控制寄存器的映射地址,并向所述映射地址中写入所述待存储数据的虚拟地址,以将所述待存储数据的虚拟地址发送至所述存储控制设备的控制寄存器中。
结合第一方面至第一方面第六实施方式中的任一种实施方式,在第七实施方式中,所述存储控制设备向所述持久化存储介质中存储任意数据之前,是将该任意数据存储至所述存储控制设备的非挥发性存储介质中的;
所述非挥发性存储介质中的任意数据是在预设条件下存储至持久化存储介质中的;
所述预设条件至少包括:所述处理设备向所述存储控制设备发送了存储指示。
第二方面,本发明实施例提供一种存储数据的处理方法,包括:
存储控制设备接收待存储数据的虚拟地址,并根据所述虚拟地址获取存储控制设备的非持久化存储介质中与所述虚拟地址关联的待存储数据;
所述存储控制设备将所述非持久化存储介质中所述待存储数据存储至所述存储控制设备的持久化存储介质中。
结合第二方面,在第一实施方式中,所述获取待存储数据的虚拟地址,并根据所述虚拟地址获取与所述虚拟地址关联的待存储数据,包括:
所述存储控制设备读取控制寄存器以接收待存储数据的虚拟地址;
所述存储控制设备根据所述待存储数据的虚拟地址查询页表,获得所述待存储数据在非持久存储介质中的物理地址;
所述存储控制设备根据所述待存储数据在非持久存储介质中的物理地址,在所述非持久存储介质中查找到所述待存储数据;
所述页表中,所述非持久存储介质的每一个物理地址关联一个虚拟地址。
结合第二方面第一实施方式,在第二实施方式中,在所述读取存储控制设备的控制寄存器以获得待存储数据的虚拟地址之前,所述处理方法还包括:
所述存储控制设备接收所述处理设备发送的脏值和该脏值关联的地址;所述脏值位于所述处理设备的非持久化缓存中;
所述存储控制设备根据所述脏值,将所述非持久化存储介质中该脏值关联的地址所指向的数据进行更新。
结合第二方面第一实施方式,在第三实施方式中,所述处理设备还设置有持久化缓存,所述持久化缓存用于存储所述处理设备的非持久化缓存中所述虚 拟地址指向的缓存数据,当所述非持久化缓存中不存在剩余空间时,则所述处理方法还包括:
所述存储控制设备接收处理设备发送的持久化缓存中的数据;
所述存储控制设备将所述持久化缓存中的数据存储至持久化存储介质中。
结合第二方面至第二方面第三实施方式中任一种实施方式,在第四实施方式中,所述存储控制设备在向所述持久化存储介质中存储任意数据之前,是将该任意数据存储至所述存储控制设备的非挥发性存储介质中的;
所述非挥发性存储介质中的任意数据是在预设条件下存储至持久化存储介质中的;所述预设条件至少包括:所述存储控制设备接收到所述处理设备发送的存储指示。
第三方面,本发明实施例提供一种存储数据的处理装置,具体为处理设备,包括:
获取模块,用于获取待存储数据的虚拟地址;所述待存储数据位于存储控制设备的非持久化存储介质中;
处理模块,将所述虚拟地址发送至所述存储控制设备,以使所述存储控制设备将所述待存储数据存储至所述存储控制设备的持久化存储介质中。
结合第三方面,在第一实施方式中,所述处理模块还用于
当所述处理设备的非持久化缓存中存在脏值时,所述处理设备向所述存储控制设备发送该脏值和该脏值关联的地址。
结合第三方面第一实施方式,在第二实施方式中,所述处理设备还设置有持久化缓存,所述持久化缓存用于存储所述处理设备的非持久化缓存中所述虚拟地址指向的缓存数据;当所述非持久化缓存中不存在剩余空间时,则所述处理模块还用于
将所述持久化缓存中的数据发送至所述存储控制设备,以使所述存储控制设备将所述持久化缓存中的数据存储至所述持久化存储介质内。
结合第三方面至第三方面第二实施方式中任一种实施方式,在第三实施方式中,所述处理模块具体用于
所述处理设备获取所述存储控制设备的控制寄存器的映射地址,并向所述映射地址中写入所述待存储数据的虚拟地址,以将所述待存储数据的虚拟地址发送至所述存储控制设备的控制寄存器中。
结合第三方面至第三方面第三实施方式中任一种实施方式,在第四实施方 式中,所述存储控制设备向所述持久化存储介质中存储任意数据之前,是将该任意数据存储至所述存储控制设备的非挥发性存储介质中的;
所述非挥发性存储介质中的任意数据是在预设条件下存储至持久化存储介质中的;
所述预设条件至少包括:所述处理模块向所述存储控制设备发送了存储指示。
第四方面,本发明实施例提供一种存储数据的处理装置,具体为存储控制设备,所述处理装置包括:
处理模块,用于接收待存储数据的虚拟地址,并根据所述虚拟地址获取所述存储控制设备的非持久化存储介质中与所述虚拟地址关联的待存储数据;
存储模块,用于将所述非持久化存储介质中所述待存储数据存储至所述存储控制设备的持久化存储介质中。
结合第四方面,在第一实施方式中,处理模块具体用于
读取控制寄存器以接收待存储数据的虚拟地址;
根据所述待存储数据的虚拟地址查询页表,获得所述待存储数据在非持久存储介质中的物理地址;
根据所述待存储数据在非持久存储介质中的物理地址,在所述非持久存储介质中查找到所述待存储数据;
所述页表中,所述非持久存储介质的每一个物理地址关联一个虚拟地址。
结合第四方面第一实施方式,在第二实施方式中,所述处理模块还用于
接收所述处理设备发送的脏值和该脏值关联的地址;所述脏值位于所述处理设备的非持久化缓存中;
根据所述脏值,将所述非持久化存储介质中该脏值关联的地址所指向的数据进行更新。
结合第四方面第一实施方式,在第三实施方式中,所述处理设备还设置有持久化缓存,所述持久化缓存用于存储所述处理设备的非持久化缓存中所述虚拟地址指向的缓存数据,当所述非持久化缓存中不存在剩余空间时,则所述处理模块还用于接收处理设备发送的持久化缓存中的数据;
所述处理模块还用于触发所述存储模块,使所述存储模块将所述持久化缓存中的数据存储至持久化存储介质中。
结合第四方面至第四方面第三实施方式中任一种实施方式,在第四实施方 式中,所述存储模块在向所述持久化存储介质中存储任意数据之前,是将该任意数据存储至所述存储控制设备的非挥发性存储介质中的;
所述非挥发性存储介质中的任意数据是在预设条件下存储至持久化存储介质中的;所述预设条件至少包括:所述处理模块接收到所述处理设备发送的存储指示。
第五方面,本发明实施例提供一种存储系统,包括处理设备和存储控制设备;所述处理设备通过总线与所述存储控制设备连接;
所述处理设备获取待存储数据的虚拟地址;所述待存储数据位于所述存储控制设备的非持久化存储介质中;
所述处理设备将所述虚拟地址发送至所述存储控制设备;
所述存储控制设备根据所述待存储数据的虚拟地址查询页表,获得所述待存储数据在非持久存储介质中的物理地址;所述页表中,所述非持久存储介质的每一个物理地址关联一个虚拟地址;
所述存储控制设备根据所述待存储数据在非持久存储介质中的物理地址,在所述非持久存储介质中查找到所述待存储数据;
所述存储控制设备将所述非持久化存储介质中所述待存储数据存储至所述存储控制设备的持久化存储介质中,以实现待存储数据的持久化。
结合第五方面,在第一实施方式中,在所述处理设备将所述虚拟地址发送至所述存储控制设备之前,当所述处理设备的非持久化缓存中存在脏值时,所述处理设备还向所述存储控制设备发送该脏值和该脏值关联的地址;
则在所述存储控制设备根据所述待存储数据的虚拟地址查询页表之前,所述存储控制设备还接收所述处理设备发送的脏值和该脏值关联的地址;
所述存储控制设备根据所述脏值,将所述非持久化存储介质中该脏值关联的地址所指向的数据进行更新。
本发明实施例提供的存储数据的处理方法、装置和系统,处理设备可根据待存储数据的虚拟地址,直接控制存储控制设备将所述待存储数据存储至所述存储控制设备的持久化存储介质中,以实现待存储数据的持久化,可广泛应用于各种场景下,不会由于不能获知待存储数据的物理地址而不能实现待存储数据的持久化,从而提升了存储系统持久化存储数据的性能。
附图说明
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作一简单地介绍,显而易见地,下面描述中的附图是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。
图1为本发明实施例的存储系统的示意图;
图2为本发明存储数据的处理方法实施例一的流程图;
图3为本发明数据的存储方法实施例二的流程图;
图4为本发明数据的存储方法实施例三的流程图;
图5为本发明数据的存储方法实施例四的流程图;
图6为本发明实施例数据的存储方法实施例五的信令图;
图7为本发明存储数据的处理装置实施例一的结构图;
图8为本发明存储数据的处理装置实施例二的结构图。
具体实施方式
为使本发明实施例的目的、技术方案和优点更加清楚,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。
图1为本发明实施例的存储系统的示意图。如图1所示,处理设备10通过内存总线30与存储控制设备20连接,其中处理设备10中至少包括CPU(Central Processing Unit,中央处理器)、受该CPU控制运行的操作系统及操作系统上运行的各种进程,上述CPU通过内存总线11与存储控制设备20连接,因此CPU可通过load/store指令访问存储控制设备中的各个存储介质,具体的,该存储控制设备可为UAS(Unified Access Storage,一体化存储);UAS包含处理器和多种存储介质,具体可包括非持久化存储介质和持久化存储介质,通常位于非持久化存储介质中的信息保存的时间较短,而存储至持久化存储介质中的信息可长时间保存,当将非持久化存储介质中的数据存储至持久化存储介质中,则可实现该数据的持久化;举例来说,UAS中非持久化存储介质可为DRAM,而持久化存储介质具体可以为闪存(Flash Memory)、硬盘(Hard disk)和网络存储设备(Network storage)等;较优的,UAS中还可以包括一种非挥发性 存储介质(Non-Volatile Memory,简称NVM),该非挥发性存储介质相对于非持久化存储介质来说,其保存信息的时间较长,则将数据存储至非挥发性存储介质中也可实现该数据的持久化;另外,非挥发性存储介质相对于持久化存储介质来说,其对CPU的访问响应较快;由于UAS拥有处理器,具有丰富、智能的数据管理功能,例如物理空间的管理。
图2为本发明存储数据的处理方法实施例一的流程图。如图2所示,本实施例是在图1所示的存储系统中实现的,本实施例的执行主体为存储数据的处理装置,该存储数据的处理装置可采用软件和/或硬件的方式实现,优选的该处理装置可集成在图1所示的处理设备中的CPU上,具体的,本实施例包括:
S101、处理设备获取待存储数据的虚拟地址。
具体的,当工作人员等用户需要将一些存储在存储控制设备的非持久化存储介质中的数据进行持久化时,可通过编译一段程序指示将某些非持久化存储介质中的数据进行持久化,这些需要持久化的数据即为上述待存储数据,且在程序中待存储数据的位置以虚拟地址指示,则处理设备中的操作系统在CPU的控制下,开启进程运行上述程序,则可获取待存储数据的虚拟地址;或者操作系统在CPU的控制下运行的进程,在用户态上向工作人员提供输入窗口,则工作人员可将待存储数据的虚拟地址进行输入,使得处理设备获取了待存储数据的虚拟地址。
S102、处理设备将虚拟地址发送至所述存储控制设备,以使存储控制设备将待存储数据存储至存储控制设备的持久化存储介质中。
通过S102,使存储控制设备接收到该虚拟地址,则所述存储控制设备根据所述待存储数据的虚拟地址查询页表,获得所述待存储数据在非持久存储介质中的物理地址;从而存储控制设备根据所述待存储数据在非持久存储介质中的物理地址,在所述非持久存储介质中查找到所述待存储数据,则该存储控制设备将待存储数据再存储至持久化存储介质中,实现了该待存储数据的持久化;其中上述页表中,所述非持久存储介质的每一个物理地址关联一个虚拟地址。
本实施例中,可根据待存储数据的虚拟地址,直接控制存储控制设备将所述待存储数据存储至所述存储控制设备的持久化存储介质中,以实现待存储数据的持久化,可广泛应用于各种场景下,不会由于不能获知待存储数据的物理地址而不能实现待存储数据的持久化,从而提升了存储系统持久化存储数据的性能。
图3为本发明数据的存储方法实施例二的流程图。如图3所示,本实施例是在图2所示的实施例的基础上做出进一步的描述,具体如下:
S201、处理设备通过调用持久化接口,获取待存储数据的虚拟地址。
通常用户是通过处理设备中CPU控制运行的进程,指定待存储数据的虚拟地址,从而进程可向存储控制设备指示该待存储数据的位置信息,也可以说,待存储数据的虚拟地址是处理设备上的进程向存储控制设备指示的;但在现有技术中,处理设备上的进程请求将存储控制设备上的某个数据持久化时,进程需要进入上述处理设备的内核,才可向存储控制设备指示待存储数据的位置信息,且该位置信息须为物理地址,但在较多的应用场景下,进程获得的是待存储数据的虚拟地址,且不能获知该虚拟地址指向的物理地址,因此不可向存储控制设备指示待存储数据的位置信息;但在本实施例中,处理设备中的CPU通过调用持久化接口,使进程可直接指示出待存储数据的虚拟地址,不需进入内核态,节省了处理设备针对进程进行用户态与内核态转换的开销;进程也不需要准确获知虚拟地址指向的物理地址,便可实现向存储控制设备指示待存储数据的位置信息,使得数据持久化应用场景广泛。
上述持久化接口相对于现有技术,具体为面向用户态的一种新增的API(Application Programming Interface,应用程序编程接口),处理设备上的进程调用该持久化接口后,在用户态下便可指示待存储数据的位置信息。
上述待存储数据在当前时刻存储在存储控制设备的非持久化存储介质中,上述待存储数据的虚拟地址指示了待存储数据在非持久化存储介质中的具体位置,例如,上述待存储数据为a、b、c三个数据,数据a存储在虚拟地址0000指向的空间,数据b存储在虚拟地址0001指向的空间,数据c存储在虚拟地址0002指向的空间,且上述虚拟地址的表达形式具体为0000、0001和0002,;也可具体为起始虚拟地址0000和数据长度“3”,则存储控制设备接收到该表达形式的虚拟地址后,可确定的待存储数据存储在由虚拟地址0000起始的连续3个虚拟地址所指示的空间中。
S202、处理设备获取所述存储控制设备的控制寄存器的映射地址,并向所述映射地址中写入所述待存储数据的虚拟地址。
处理设备上的进程在CPU的控制下,调用了持久化接口,则在持久化接口中依次执行各个指令,首先,将存储控制设备的控制寄存器的位置映射至进程的进程空间,则在进程空间中,存在了指向存储控制设备的控制寄存器的指示 信息,该指示信息即为存储控制设备的控制寄存器的映射地址,通过向存储控制设备的控制寄存器的映射地址中写入待存储数据的虚拟地址,以将所述待存储数据的虚拟地址发送至所述存储控制设备的控制寄存器。
S203、处理设备根据待存储数据的虚拟地址,判断是否在处理设备的非持久化缓存中查找到待存储数据的虚拟地址指向的各个缓存数据;若是,执行S204;若否,执行S206;
需要说明的是,在实施本实施例之前,为便于处理设备的正常运作,上述待存储数据在存储至非持久化存储介质的同时或之后,也被缓存至处理设备的非持久化缓存(具体为CPU的cache,一些设备中的cache层还设置了NVM,如下述图4所示的实施例,则信息保存时间短且易失的cache相对于cache层设置的NVM,称为非持久化缓存,而cache层中的NVM则为持久化缓存)中,例如在实施本实施例之前,处理设备上运行的进程向非持久化存储介质中写入数据a,但进程随后的运行中还需再次访问数据a,为了便于进程访问数据a,因此该数据a作为缓存数据也被缓存至处理设备的非持久化缓存中,可以理解的,在非持久化缓存中存储数据a时,是将数据a与数据a在非持久化存储介质中的物理地址绑定存储,则在进程调用数据a时指示了该数据a的虚拟地址,但处理设备中的MMU(Memory Management Unit,内存管理单元)可将数据a的虚拟地址解析为数据a在非持久化存储介质中的物理地址,若在非持久化缓存中查找到数据a在非持久化存储介质中的物理地址,便可在非持久化缓存中查找到作为缓存数据的数据a,因此在本实施例中,可根据所述待存储数据的虚拟地址,判断是否在非持久化缓存中查找到各个所述待存储数据的虚拟地址指向的各个缓存数据。
当未查找到各个所述待存储数据的虚拟地址指向的各个缓存数据时,直接执行S206,具体的,进程向非持久化存储介质中写入数据后未再使用写入的数据,或者进程在本实施例之前已结束一次运行,此时非持久化缓存中没有所述待存储数据的虚拟地址指向的各个缓存数据,但非持久化存储介质中写入的待存储数据还是存在的,则在本实施例中进程请求持久化数据时,可直接执行S206;
更具体的,在前述S201中,处理设备上的进程在CPU的控制下执行持久化接口中的各个指令,该持久化接口中的一条指令为:向CPU发送持久化指示;也就是说,本步骤是CPU接收到持久化指示后执行的。
S204、处理设备根据各个缓存数据的状态位,判断是否存在脏值,若是,执行S205,若否执行S206。
若根据待存储数据的位置信息,在非持久化缓存中查找到各个所述待存储数据的位置信息指向的各个缓存数据,可根据各个缓存数据的状态位确定该缓存数据是否为脏值;具体的,在本实施例实施之前,存储在非持久化存储介质中的数据a的赋值为1,但随后处理设备上的进程调用该数据a,将该数据a的赋值由1更改为2,并将赋值为2的数据a作为缓存数据写入非持久化缓存中,由于进程更改了数据a的赋值,则在将赋值为2的数据a作为缓存数据写入非持久化缓存中时,将该缓存数据的状态位表示为脏值(dirty),即非持久化缓存中的数据a的赋值与非持久化存储介质中的数据a的赋值不同,也可以说非持久化缓存中的数据a为脏值。
S205、处理设备向所述存储控制设备发送该脏值和该脏值关联的地址。
可以理解的,处理设备上运行的进程在请求持久化数据时,该待存储数据针对第一进程需确保为最新状态,即此时针对进程来说,数据a的赋值为2是最新状态,但非持久化存储介质中的数据a的赋值仍然为1,因此,通过上述S204的判断,若非持久化缓存中存在脏值,则将非持久化缓存中的脏值,即赋值为2的数据a发送至存储控制设备,以使存储控制设备对待存储数据进行更新,此时上述脏值关联的地址,即为非持久化缓存中与数据a绑定存储的数据a在非持久化存储介质中的物理地址;
通过本步骤,存储控制设备接收处理设备发送的脏值和该脏值关联的地址;所述存储控制设备根据脏值,将所述非持久化存储介质中该脏值关联的地址所指向的数据进行更新。
在执行S204时确认没有脏值,则说明非持久化存储介质中的待存储数据均处于最新状态,可直接执行S206。
S206、处理设备向所述存储控制设备发送持久化指令。
具体的,处理设备的CPU通过向所述存储控制设备发送持久化指令,可触发存储控制设备将非持久化存储介质中与待存储数据的虚拟地址关联的待存储数据存储在持久化存储介质中,使待存储数据持久化。其中,本步骤为可选步骤,灵活的,当本实施例执行了S202,存储控制设备便会读取控制寄存器中的虚拟地址;但由于处理设备需将脏值发送至存储控制设备,以使存储控制设备持久化的数据为最新状态,通常在执行S203~S205之后,确保非持久化存储介 质中的待存储数据为最新状态后,通过向存储控制设备发送持久化指令,再触发存储控制设备读取控制寄存器以获取虚拟地址,从而存储控制设备根据所述待存储数据的虚拟地址查询页表,获得所述待存储数据在非持久存储介质中的物理地址;随后存储控制设备根据所述待存储数据在非持久存储介质中的物理地址,在所述非持久存储介质中查找到所述待存储数据,随后将待存储数据存储至持久化存储介质中。
需要补充说明的是,处理设备上会存在运行多个进程的可能,相应的,存储控制设备中也存储了针对不同进程的页表,因此在执行S202时,若当前处理设备上运行的是第一进程,即前述S201中的待存储数据的虚拟地址是第一进程指示的,则所述存储控制设备的控制寄存器的映射地址位于所述第一进程的进程空间中;且在执行前述S202时,还向所述存储控制设备的控制寄存器的映射地址中写入第一进程的标识和/或释放标识;第一进程的标识可使存储控制设备查找第一进程的标识对应的页表;所述释放标识用于通知所述存储控制设备,在所述存储控制设备中的持久化存储介质内存储所述待存储数据之后,是否将所述非持久存储介质中的所述待存储数据进行释放;
进一步的,本实施例可选的,还可执行下述S207:
S207、处理设备向存储控制设备发送存储指示,以使非持久化存储介质中与第一进程关联的待存储数据存储至存储控制设备中的持久化存储介质中。
上述存储控制设备向所述持久化存储介质中存储任意数据(包括上述位于非持久化存储介质中的待存储数据)之前,是将该任意数据存储至所述存储控制设备的非挥发性存储介质中的;所述非挥发性存储介质中的任意数据是在预设条件下存储至持久化存储介质中的;所述预设条件至少包括:向所述存储控制设备发送了存储指示。
上述存储指示可以为第一进程运行结束的消息,具体的,本实施例中,非挥发性存储介质相比于持久化存储介质,对处理设备的读写请求有较快的响应,且将数据存储至非挥发性存储介质后,便可实现对数据的持久化,因此在持久化数据时,优选将数据存储至非挥发性存储介质中,以对处理设备有较快的响应;但现有技术中,因为工艺、成本等因素的影响,非挥发性存储介质的容量较小,而持久化存储介质的容量较大,因此在一些预设条件下,将持久化存储介质中的数据存储至持久化存储介质内,而上述存储指示可以为第一进程的运行结束消息,由于第一进程在指示将待持久化数据持久化后,第一进程有可能 还会调用持久化后的数据,因此在数据持久化时是存储在非挥发性存储介质中,且该非挥发性存储介质中还存储了其他进程指示的数据,则在第一进程结束运行时,将非挥发性存储介质中与第一进程关联的数据存储至持久化存储介质中。
另外,可选的,本实施例在执行时,可选择不执行前述S203~S205,而选择执行下述D1~D2,以替代前述S203~S205,具体的,
D1、处理设备根据非持久化缓存中每一个缓存数据的状态位,判断是否存在脏值,若是,执行D2,若否,执行S206。
D2、若存在脏值,则处理设备向所述存储控制设备发送该脏值和该脏值关联的地址。
同样为了使待存储数据为最新状态,可将非持久化缓存中的全部脏值存储至非持久化存储介质中,举例来说,第一进程指示的待存储数据为a、b、c,但在非持久化缓存中,作为缓存数据的数据a为脏值,但此时非持久化缓存中还有其他状态为脏值的数据,但通过执行D1~D2,将非持久化缓存中的全部脏值存储至非持久化存储介质中,同样实现了将脏值a存储至非持久化存储介质中,但不需要根据第一进程指示的待存储数据的虚拟地址,在非持久化缓存中查找待存储数据的虚拟地址指向的缓存数据,节省了执行查找过程所需的开销。
本实施例中,本实施例中,可根据待存储数据的虚拟地址,直接控制存储控制设备将所述待存储数据存储至所述存储控制设备的持久化存储介质中,以实现待存储数据的持久化,可广泛应用于各种场景下,不会由于不能获知待存储数据的物理地址而不能实现待存储数据的持久化,提升了存储系统持久化存储数据的性能;且进程不需要陷入内核,便可指示待存储数据的虚拟地址,不需为进程提供用户态与内核态之间的转换,从而节省了用户态与内核态之间转换所需的开销。
图4为本发明数据的存储方法实施例三的流程图。如图4所示,本实施例中,处理设备的缓存除了非持久化缓存以外,还设置有持久化缓存(具体为在cache层设置的NVM),所述持久化缓存用于存储所述非持久化缓存中所述虚拟地址指向的缓存数据,则本实施例具体如下:
S301、处理设备通过调用持久化接口,获取待存储数据的虚拟地址。
S302、处理设备获取所述存储控制设备的控制寄存器的映射地址,并向所述映射地址中写入所述待存储数据的虚拟地址。
S303、处理设备根据待存储数据的虚拟地址,判断是否在非持久化缓存中 查找到待存储数据的虚拟地址指向的各个缓存数据;若是,执行S304;若否,执行S308;
S301~S303与前述S201~S203类似,在此不再赘述。
S304、处理设备判断持久化缓存中是否存在剩余空间;若是,执行S305,若否,执行S306。
S305、处理设备将各个所述缓存数据存储至所述剩余空间中。
本实施例中,为了实现数据持久化且便于处理设备在运行过程中使用待存储数据,因此本实施例中是将非持久化缓存中的待存储数据,即缓存数据,优先存储在持久化缓存中,也就是说,执行了S305之后,已针对第一进程实现了数据的持久化,则本实施例可结束。
S306、处理设备根据各个缓存数据的状态位,判断是否存在脏值,若是,执行S307,若否执行S308。
若根据各个所述待存储数据的虚拟地址,在非持久化缓存中查找到各个所述待存储数据的虚拟地址指向的各个缓存数据,则执行本步骤。
S307、处理设备向所述存储控制设备发送所述脏值和该脏值关联的地址。
S306~S307与前述S204~S205类似,可参考S204~S205。
S308、处理设备向所述存储控制设备发送持久化指令。
可参考前述S206。
进一步的,处理设备上会存在运行多个进程的可能,因此在执行S302时,若当前处理设备上运行的是第一进程,即前述S301中的待存储数据的虚拟地址是通过运行第一进程获取的,则所述存储控制设备的控制寄存器的映射地址位于所述第一进程的进程空间中;且还向所述存储控制设备的控制寄存器的映射地址中写入第一进程的标识和/或释放标识;第一进程的标识可使存储控制设备查找第一进程的标识对应的页表;所述释放标识用于通知存储控制设备,在所述存储控制设备中的持久化存储介质内存储所述待存储数据之后,是否将所述非持久存储介质中的所述待存储数据进行释放。
需要补充说明的是,通过S305实现数据持久化,但持久化缓存的空间有限,多个进程依次请求数据持久化后,持久化缓存中没有剩余空间,则本实施例中执行了S307后,在执行S308的同时或之后,还将持久化缓存中的数据发送给所述存储控制设备,则存储控制设备接收处理设备发送的持久化缓存中的数据,并将所述持久化缓存中的数据存储至持久化存储介质中。
可选的,还可执行S309:
S309、处理设备向存储控制设备发送所述第一进程运行结束的消息,以使非持久化存储介质中与第一进程关联的待存储数据存储至存储控制设备中的最终存储介质中。
具体可参考前述S207。
本实施例中,可根据待存储数据的虚拟地址,直接控制存储控制设备将所述待存储数据存储至所述存储控制设备的持久化存储介质中,以实现待存储数据的持久化,可广泛应用于各种场景下,不会由于不能获知待存储数据的物理地址而不能实现待存储数据的持久化,提升了存储系统持久化存储数据的性能;且进程不需要陷入内核,便可指示待存储数据的虚拟地址,不需为进程提供用户态与内核态之间的转换,从而节省了用户态与内核态之间转换所需的开销。
图5为本发明数据的存储方法实施例四的流程图。如图5所示,本实施例的执行主体为存储数据的处理装置,该处理装置可采用软件和/或硬件的方式实现,具体的,该处理装置可为前述存储控制设备,本实施例具体如下:
S401、存储控制设备接收待存储数据的虚拟地址,并根据所述虚拟地址获取存储控制设备的非持久化存储介质中与所述虚拟地址关联的待存储数据。
其中,存储控制设备通过读取控制寄存器,以接收待存储数据的虚拟地址。
S402、存储控制设备将所述非持久化存储介质中所述待存储数据存储至所述存储控制设备的持久化存储介质中。
本实施例中,可根据待存储数据的虚拟地址,将所述待存储数据存储至所述存储控制设备的持久化存储介质中,以实现待存储数据的持久化,可广泛应用于各种场景下,不会由于处理设备上的进程不能获知待存储数据的物理地址而不能实现待存储数据的持久化,提升了存储系统持久化存储数据的性能。
图6为本发明实施例数据的存储方法实施例五的信令图。如图6所示,本实施例是在图2~图5所示的任一种实施例的基础上做出说明,具体如下:
S501、处理设备通过调用持久化接口,获取待存储数据的虚拟地址。
具体如前述S201或S301中所述的步骤。
S502、处理设备向存储控制设备的控制寄存器的映射地址中写入所述待存储数据的虚拟地址,以向存储控制设备发送该虚拟地址。
具体如前述S202或S302中所述的步骤。
S503、处理设备向所述存储控制设备发送持久化指令。
具体如前述S206或S308中所述的步骤。
S504、存储控制设备读取控制寄存器以接收待存储数据的虚拟地址。
本实施例中,存储控制设备在接收到处理设备发送的持久化指令后,便读取控制寄存器。
S505、存储控制设备根据所述待存储数据的虚拟地址查询页表,获得所述待存储数据的虚拟地址在非持久化存储介质中对应的物理地址。
前述处理设备在运作过程中指示读写数据时,使用虚拟地址指示读写数据的位置,但存储控制设备在任一种存储介质中写入或读取数据时,是要获知数据在存储介质中的物理地址,因此需执行S505,且页表中所述非持久存储介质的每一个物理地址关联一个虚拟地址。
需要说明的是,在实施本实施例之前,处理设备上运行的任意一个进程在请求将数据写入存储控制设备时,存储控制设备针对每一个进程分配了存储资源块,即每一个进程使用的存储资源块不同,从而资源块的物理地址也不同,但每一个进程在处理设备上运行时使用的是虚拟地址,因此存储控制设备针对每一个进程均建立了页表,因此当本实施例中请求数据持久化的进程为第一进程时,存储控制设备执行S504时,还读取到第一进程的标识,从而在执行S505时,是根据所述第一进程的标识,在页表库中查询所述第一进程的标识对应的第一页表;所述页表库中存储了至少一个所述页表,每一个所述页表对应一个进程的标识。
通常存储控制设备执行S505后,便将待存储数据存储至持久化存储介质中,但本实施例较优的,在将待存储数据存储至持久化存储介质中之前,可选择执行下述S506:
S506、存储控制设备根据所述待存储数据的虚拟地址在非持久存储介质中的物理地址,获得所述待存储数据,并将所述待存储数据存储至非挥发性存储介质中。
在向所述持久化存储介质中存储任意数据之前,是将该任意数据存储至所述存储控制设备的非挥发性存储介质中的;具体的,所述非挥发性存储介质分为至少两个存储区域,每一个所述存储区域的访问延迟不同,将所述待存储数据优先存储在所述两个存储区域中访问延迟最短的存储区域中;
当所述至少两个存储区域中第一存储区域无空间存储所述待存储数据,则将所述第一存储区域中的待存储数据迁移至所述至少两个存储区域中的第二存 储区域,上述第一存储区域的访问延迟小于所述第二存储区域的访问延迟,其中第一存储区域与第二存储区域为相对概念,例如非持久化存储介质中包括存储区域1,存储区域2和存储区域3,其中存储区域1的访问延迟最小,存储区域3的访问延迟最大,存储区域2居中,则存储区域1相对于存储区域2和存储区域3,存储区域1则为第一存储区域,而存储区域2或存储区域3均为第二存储区域,则可理解的,存储区域2相对于存储区域3则为第一存储区域。
可选的,当获取到所述释放标识时,执行S507~S508或S509,具体如下:
S507、存储控制设备根据所述释放标识将所述非持久存储介质中的所述待存储数据进行释放;
S508、存储控制设备根据所述待存储数据的虚拟地址和该待存储数据在非挥发性存储介质中的位置,建立第一映射关系,并将所述页表中所述待存储数据的虚拟地址和与所述待存储数据的虚拟地址对应的物理地址删除;
例如数据a的虚拟地址0000,在执行S507之前,与非持久化存储介质中的物理地址m1对应,但执行S507之后,物理地址m1处不存在数据a,仅在非挥发性存储介质的存储空间c1中存在数据a,但避免处理设备上的第一进程根据虚拟地址0000仍然读取物理地址m1处的数据,因此需建立0000和c1的映射关系,即上述第一映射关系。
S509、存储控制设备根据所述待存储数据在所述非持久存储介质中的物理地址和该待存储数据在所述非挥发性存储介质中的位置,建立第二映射关系。
若根据所述释放标识,将所述非持久存储介质中的所述待存储数据保留,则建立上述物理地址m1和c1的映射关系,即上述第二映射关系,当第一进程再次修改数据a的赋值时,物理地址m1处的数据a的赋值被修改后,根据第二映射关系,可将c1中数据a的赋值同步修改,本步骤为本实施例中的一种情况,则在图6中并未示出。
但需要说明的是,当将所述第一存储区域中的待存储数据迁移至所述至少两个存储区域中的第二存储区域,若执行S507~S508,则根据该待存储数据在第二存储区域中的位置,更新第一映射关系;若执行了S509,则根据该待存储数据在第二存储区域中的位置更新第二映射关系。
较优的,还可执行S510;
S510、存储控制设备将所述非挥发性存储介质中的待存储数据存储至所述持久化存储介质中。
通常存储介质提供存储块以存储数据时,该存储块被进程以文件的形式使用,例如进程建立一个word文件,可看做是在存储介质中使用了一个存储块,则进程在word文件中写入数据a时,相当于在该word文件对应的存储块中存储了数据a,则可以理解的,上述待存储数据也与文件标识关联,且在所述持久化存储介质中每一个存储块关联一个文件标识,因此,执行S510时,是根据所述非挥发性存储介质中的待存储数据关联的第一文件标识,将所述非挥发性存储介质中待存储数据存储至第一文件标识关联的存储块中。进一步的,还可执行下述S511;
S511、基于所述第一文件标识,存储控制设备根据所述非挥发性存储介质中的待存储数据的位置,和持久化存储介质中用于存储所述非挥发性存储介质中的待存储数据的存储块的位置,建立第三映射关系。
例如前述持久化存储介质中存储空间c1处的数据a所关联的文件标识为word1,而word1对应持久化存储介质的存储块n1,则可建立c1和n1的映射关系,即上述第三映射关系,则在S510之后,当处理设备再次修改了某个缓存数据a或非持久化存储介质中数据a的赋值后,相应的,根据第一映射关系或第二映射关系,同步修改位于非挥发性存储介质中数据a的赋值,进一步的,根据第三映射关系,将持久化存储介质中的数据a同步修改。
需要补充说明的是,上述S510的执行是需要满足一定的预设条件,即所述非挥发性存储介质中的任意数据是在预设条件下存储至持久化存储介质中的,具体如下:
当所述非挥发性存储介质中待存储数据的数量满足预设阈值,则根据数据维护表中各个待存储数据的访问记录,将在预设时间段内被访问次数最少的待存储数据,存储至所述持久化存储介质;
或者,当接收到处理设备发送的存储指示,该存储指示为所述第一进程运行结束的消息,将所述持久化存储介质中所述第一进程关联的待存储数据存储至持久化存储介质中。
可选的,当在S503之前,处理设备执行了S203~S205、或D1~D2、或S307中所述的步骤,则存储控制设备在执行S504之前,接收所述处理设备发送的脏值和该脏值关联的地址;根据所述脏值,将所述非持久化存储介质中该脏值关联的地址所指向的数据进行更新;
或者处理设备在执行S308所述的步骤的同时或之后,还将持久化缓存中的 数据发送给所述存储控制设备,则存储控制设备还会接收到持久化缓存中的数据,并将持久化缓存中的数据存储至持久化存储介质中,可选的,为了使存储控制设备对处理设备有较快的响应,在向持久化存储介质中存储任意数据(此时也包括持久化缓存中的数据)之前,是将该任意数据存储至所述存储控制设备的非挥发性存储介质中的。
本实施例中,根据待存储数据的虚拟地址,存储控制设备可将虚拟地址处理为物理地址,从而将所述待存储数据存储至所述存储控制设备的持久化存储介质中,以实现待存储数据的持久化,可广泛应用于各种场景下,不会由于处理设备上的进程不能获知待存储数据的物理地址而不能实现待存储数据的持久化,提升了存储系统持久化存储数据的性能。
图7为本发明存储数据的处理装置实施例一的结构图。如图7所示,本实施例的存储数据的处理装置可集成在前述处理设备的CPU上,也就是说本实施例的处理装置具体为处理设备,具体的,该处理装置包括:
获取模块11,用于获取待存储数据的虚拟地址;所述待存储数据位于存储控制设备的非持久化存储介质中;
处理模块12,用于将所述虚拟地址发送至所述存储控制设备,以使所述存储控制设备将所述待存储数据存储至所述存储控制设备的持久化存储介质中。
进一步的,所述处理模块12还用于
当所述处理设备的非持久化缓存中存在脏值时,所述处理设备向所述存储控制设备发送该脏值和该脏值关联的地址
与非持久化缓存对应的,在处理设备中还设设置有持久化缓存,持久化缓存用于存储所述非持久化缓存中所述虚拟地址指向的缓存数据;当所述非持久化缓存中不存在剩余空间时,则所述处理模块还用于
将所述持久化缓存中的数据发送至所述存储控制设备,以使所述存储控制设备将所述持久化缓存中的数据存储至所述持久化存储介质内。
进一步的,上述处理模块12在向存储控制设备发送虚拟地址时,该处理模块12具体用于
所述处理设备获取所述存储控制设备的控制寄存器的映射地址,并向所述映射地址中写入所述待存储数据的虚拟地址,以将所述待存储数据的虚拟地址发送至所述存储控制设备的控制寄存器中。
进一步的,所述存储控制设备向所述持久化存储介质中存储任意数据之前, 是将该任意数据存储至所述存储控制设备的非挥发性存储介质中的;
所述非挥发性存储介质中的任意数据是在预设条件下存储至持久化存储介质中的;
所述预设条件至少包括:所述处理模块向所述存储控制设备发送了存储指示。
本实施例中,存储数据的处理装置可根据待存储数据的虚拟地址,将所述待存储数据存储至所述存储控制设备的持久化存储介质中,以实现待存储数据的持久化,可广泛应用于各种场景下,不会由于处理设备上的进程不能获知待存储数据的物理地址而不能实现待存储数据的持久化,提升了存储系统持久化存储数据的性能。
图8为本发明存储数据的处理装置实施例二的结构图。如图8所示,本实施例中的处理装置优选的集成在存储控制设备上,也就是说该处理装置具体为存储控制设备,具体的,处理装置包括:
处理模块21,用于接收待存储数据的虚拟地址,并根据所述虚拟地址获取所述存储控制设备的非持久化存储介质中与所述虚拟地址关联的待存储数据;
存储模块22,用于将所述非持久化存储介质中所述待存储数据存储至所述存储控制设备的持久化存储介质中,以实现待存储数据的持久化。
进一步的,处理模块21具体用于
读取控制寄存器以获得待存储数据的虚拟地址;
根据所述待存储数据的虚拟地址查询页表,获得所述待存储数据在非持久存储介质中的物理地址;
根据所述待存储数据在非持久存储介质中对应的物理地址,在所述非持久存储介质中查找到所述待存储数据;
所述页表中,所述非持久存储介质的每一个物理地址关联一个虚拟地址。
可选的,所述处理模块21还用于
接收所述处理设备发送的脏值和该脏值关联的地址;所述脏值位于所述处理设备的非持久化缓存中;
根据所述脏值,将所述非持久化存储介质中该脏值关联的地址所指向的数据进行更新。
可选的,前述处理设备中还设置有持久化缓存,持久化缓存用于存储所述非持久化缓存中所述虚拟地址指向的缓存数据,当所述非持久化缓存中不存在 剩余空间时,则所述处理模块还用于接收处理设备发送的持久化缓存中的数据;
所述处理模块21还用于触发所述存储模块22,使所述存储模块22将所述持久化缓存中的数据存储至持久化存储介质中。
进一步的,所述存储模块22在向所述持久化存储介质中存储任意数据之前,是将该任意数据存储至所述存储控制设备的非挥发性存储介质中的;
所述非挥发性存储介质中的任意数据是在预设条件下存储至持久化存储介质中的;所述预设条件至少包括:所述处理模块21接收到所述处理设备发送的存储指示。
本实施例中,根据待存储数据的虚拟地址,存储控制设备可将虚拟地址处理为物理地址,从而将所述待存储数据存储至所述存储控制设备的持久化存储介质中,以实现待存储数据的持久化,可广泛应用于各种场景下,不会由于处理设备上的进程不能获知待存储数据的物理地址而不能实现待存储数据的持久化,提升了存储系统持久化存储数据的性能。
本发明上述各个装置实施例用于执行前述各个方法实施例中的各个步骤,具体的实施过程及有益效果参考前述各个方法实施例,在此不再赘述。
进一步的,参照图1,本发明实施例还提供一种存储系统,该存储系统包括处理设备10和存储控制设备;所述处理设备10与所述存储控制设备20连接,则所述处理设备10与所述存储控制设备20之间可进行通信;具体的,所述处理设备10可通过内存总线30与所述存储控制设备20连接,
所述处理设备10获取待存储数据的虚拟地址;所述待存储数据位于所述存储控制设备的非持久化存储介质中;
所述处理设备10将所述虚拟地址发送至所述存储控制设备;
所述存储控制设备20根据所述待存储数据的虚拟地址查询页表,获得所述待存储数据在非持久存储介质中的物理地址;该页表中,所述非持久存储介质的每一个物理地址关联一个虚拟地址;
所述存储控制设备20根据所述待存储数据在非持久存储介质中的物理地址,在所述非持久存储介质中查找到所述待存储数据;
所述存储控制设备20将所述非持久化存储介质中所述待存储数据存储至所述存储控制设备的持久化存储介质中,以实现待存储数据的持久化。
可选的,在所述处理设备10将所述虚拟地址发送至所述存储控制设备20之前,当所述处理设备10的非持久化缓存中存在脏值时,所述处理设备10还 向所述存储控制设备20发送该脏值和该脏值关联的地址;
则在所述存储控制设备20根据所述待存储数据的虚拟地址查询页表之前,所述存储控制设备20还接收所述处理设备10发送的脏值和该脏值关联的地址;
所述存储控制设备20根据所述脏值,将所述非持久化存储介质中该脏值关联的地址所指向的数据进行更新。
本实施例中,处理设备通过向存储控制设备发送待存储数据的虚拟地址,存储控制设备可将虚拟地址处理为物理地址,从而将所述待存储数据存储至所述存储控制设备的持久化存储介质中,以实现待存储数据的持久化,可广泛应用于各种场景下,不会由于处理设备不能获知待存储数据的物理地址而不能实现待存储数据的持久化,提升了存储系统持久化存储数据的性能。
本领域普通技术人员可以理解:实现上述各方法实施例的全部或部分步骤可以通过程序指令相关的硬件来完成。前述的程序可以存储于一计算机可读取存储介质中。该程序在执行时,执行包括上述各方法实施例的步骤;而前述的存储介质包括:ROM、RAM、磁碟或者光盘等各种可以存储程序代码的介质。
最后应说明的是:以上各实施例仅用以说明本发明的技术方案,而非对其限制;尽管参照前述各实施例对本发明进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分或者全部技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本发明各实施例技术方案的范围。

Claims (25)

  1. 一种存储数据的处理方法,其特征在于,包括:
    处理设备获取待存储数据的虚拟地址;所述待存储数据位于存储控制设备的非持久化存储介质中;
    所述处理设备将所述虚拟地址发送至所述存储控制设备,以使所述存储控制设备将所述待存储数据存储至所述存储控制设备的持久化存储介质中。
  2. 根据权利要求1所述的处理方法,其特征在于,在所述处理设备将所述虚拟地址发送至所述存储控制设备之后,所述处理方法包括:
    所述存储控制设备根据所述待存储数据的虚拟地址查询页表,获得所述待存储数据在非持久存储介质中的物理地址;
    所述存储控制设备根据所述待存储数据在非持久存储介质中的物理地址,在所述非持久存储介质中查找到所述待存储数据;
    所述页表中,所述非持久存储介质的每一个物理地址关联一个虚拟地址。
  3. 根据权利要求2所述的处理方法,其特征在于,在所述处理设备将所述虚拟地址发送至所述存储控制设备之前,所述处理方法还包括:
    当所述处理设备的非持久化缓存中存在脏值时,所述处理设备向所述存储控制设备发送该脏值和该脏值关联的地址。
  4. 根据权利要求3所述的处理方法,其特征在于,在所述处理设备向所述存储控制设备发送该脏值和该脏值关联的地址之后,所述处理方法还包括:
    所述存储控制设备接收所述处理设备发送的脏值和该脏值关联的地址;
    所述存储控制设备根据所述脏值,将所述非持久化存储介质中该脏值关联的地址所指向的数据进行更新。
  5. 根据权利要求2所述的处理方法,其特征在于,所述处理设备还设置有持久化缓存,所述持久化缓存用于存储所述处理设备的非持久化缓存中所述虚拟地址指向的缓存数据;当所述持久化缓存中不存在剩余空间时,则所述处理方法还包括:
    所述处理设备将所述持久化缓存中的数据发送至所述存储控制设备,以使所述存储控制设备将所述持久化缓存中的数据存储至所述持久化存储介质内。
  6. 根据权利要求5所述的处理方法,其特征在于,在所述处理设备将所述持久化缓存中的数据发送至所述存储控制设备之后,所述处理方法还包括:
    所述存储控制设备接收处理设备发送的持久化缓存中的数据;
    所述存储控制设备将所述持久化缓存中的数据存储至持久化存储介质中。
  7. 根据权利要求1~6任一项所述的处理方法,其特征在于,所述处理设备将所述虚拟地址发送至所述存储控制设备,包括:
    所述处理设备获取所述存储控制设备的控制寄存器的映射地址,并向所述映射地址中写入所述待存储数据的虚拟地址,以将所述待存储数据的虚拟地址发送至所述存储控制设备的控制寄存器中。
  8. 根据权利要求1~7任一项所述的处理方法,其特征在于,所述存储控制设备向所述持久化存储介质中存储任意数据之前,是将该任意数据存储至所述存储控制设备的非挥发性存储介质中的;
    所述非挥发性存储介质中的任意数据是在预设条件下存储至持久化存储介质中的;
    所述预设条件至少包括:所述处理设备向所述存储控制设备发送了存储指示。
  9. 一种存储数据的处理方法,其特征在于,包括:
    存储控制设备接收待存储数据的虚拟地址,并根据所述虚拟地址获取存储控制设备的非持久化存储介质中与所述虚拟地址关联的待存储数据;
    所述存储控制设备将所述非持久化存储介质中所述待存储数据存储至所述存储控制设备的持久化存储介质中。
  10. 根据权利要求9所述的处理方法,其特征在于,所述获取待存储数据的虚拟地址,并根据所述虚拟地址获取与所述虚拟地址关联的待存储数据,包括:
    所述存储控制设备读取控制寄存器以接收待存储数据的虚拟地址;
    所述存储控制设备根据所述待存储数据的虚拟地址查询页表,获得所述待存储数据在非持久存储介质中的物理地址;
    所述存储控制设备根据所述待存储数据在非持久存储介质中的物理地址,在所述非持久存储介质中查找到所述待存储数据;
    所述页表中,所述非持久存储介质的每一个物理地址关联一个虚拟地址。
  11. 根据权利要求10所述的处理方法,其特征在于,在所述读取存储控制设备的控制寄存器以获得待存储数据的虚拟地址之前,所述处理方法还包括:
    所述存储控制设备接收所述处理设备发送的脏值和该脏值关联的地址;所 述脏值位于所述处理设备的非持久化缓存中;
    所述存储控制设备根据所述脏值,将所述非持久化存储介质中该脏值关联的地址所指向的数据进行更新。
  12. 根据权利要求10所述的存储方法,其特征在于,所述处理设备还设置有持久化缓存,所述持久化缓存用于存储所述处理设备的非持久化缓存中所述虚拟地址指向的缓存数据,当所述非持久化缓存中不存在剩余空间时,则所述处理方法还包括:
    所述存储控制设备接收处理设备发送的持久化缓存中的数据;
    所述存储控制设备将所述持久化缓存中的数据存储至持久化存储介质中。
  13. 根据权利要求9~12任一项所述的处理方法,其特征在于,所述存储控制设备在向所述持久化存储介质中存储任意数据之前,是将该任意数据存储至所述存储控制设备的非挥发性存储介质中的;
    所述非挥发性存储介质中的任意数据是在预设条件下存储至持久化存储介质中的;所述预设条件至少包括:所述存储控制设备接收到所述处理设备发送的存储指示。
  14. 一种存储数据的处理装置,其特征在于,具体为处理设备,包括:
    获取模块,用于获取待存储数据的虚拟地址;所述待存储数据位于存储控制设备的非持久化存储介质中;
    处理模块,将所述虚拟地址发送至所述存储控制设备,以使所述存储控制设备将所述待存储数据存储至所述存储控制设备的持久化存储介质中。
  15. 根据权利要求14所述的处理装置,其特征在于,所述处理模块还用于
    当所述处理设备的非持久化缓存中存在脏值时,所述处理设备向所述存储控制设备发送该脏值和该脏值关联的地址。
  16. 根据权利要求14所述的处理装置,其特征在于,所述处理设备还设置有持久化缓存,所述持久化缓存用于存储所述处理设备的非持久化缓存中所述虚拟地址指向的缓存数据;当所述非持久化缓存中不存在剩余空间时,则所述处理模块还用于
    将所述持久化缓存中的数据发送至所述存储控制设备,以使所述存储控制设备将所述持久化缓存中的数据存储至所述持久化存储介质内。
  17. 根据权利要求14~16任一项所述的处理装置,其特征在于,所述处理模块具体用于
    所述处理设备获取所述存储控制设备的控制寄存器的映射地址,并向所述映射地址中写入所述待存储数据的虚拟地址,以将所述待存储数据的虚拟地址发送至所述存储控制设备的控制寄存器中。
  18. 根据权利要求14~17任一项所述的处理装置,其特征在于,所述存储控制设备向所述持久化存储介质中存储任意数据之前,是将该任意数据存储至所述存储控制设备的非挥发性存储介质中的;
    所述非挥发性存储介质中的任意数据是在预设条件下存储至持久化存储介质中的;
    所述预设条件至少包括:所述处理模块向所述存储控制设备发送了存储指示。
  19. 一种存储数据的处理装置,其特征在于,具体为存储控制设备,所述处理装置包括:
    处理模块,用于接收待存储数据的虚拟地址,并根据所述虚拟地址获取所述存储控制设备的非持久化存储介质中与所述虚拟地址关联的待存储数据;
    存储模块,用于将所述非持久化存储介质中所述待存储数据存储至所述存储控制设备的持久化存储介质中。
  20. 根据权利要求19所述的处理装置,其特征在于,处理模块具体用于
    读取控制寄存器以接收待存储数据的虚拟地址;
    根据所述待存储数据的虚拟地址查询页表,获得所述待存储数据在非持久存储介质中的物理地址;
    根据所述待存储数据在非持久存储介质中的物理地址,在所述非持久存储介质中查找到所述待存储数据;
    所述页表中,所述非持久存储介质的每一个物理地址关联一个虚拟地址。
  21. 根据权利要求19所述的处理装置,其特征在于,所述处理模块还用于
    接收所述处理设备发送的脏值和该脏值关联的地址;所述脏值位于所述处理设备的非持久化缓存中;
    根据所述脏值,将所述非持久化存储介质中该脏值关联的地址所指向的数据进行更新。
  22. 根据权利要求19所述的处理装置,其特征在于,所述处理设备还设置有持久化缓存,所述持久化缓存用于存储所述处理设备的非持久化缓存中所述虚拟地址指向的缓存数据,当所述非持久化缓存中不存在剩余空间时,则所述 处理模块还用于接收处理设备发送的持久化缓存中的数据;
    所述处理模块还用于触发所述存储模块,使所述存储模块将所述持久化缓存中的数据存储至持久化存储介质中。
  23. 根据权利要求19~22任一项所述的处理装置,其特征在于,所述存储模块在向所述持久化存储介质中存储任意数据之前,是将该任意数据存储至所述存储控制设备的非挥发性存储介质中的;
    所述非挥发性存储介质中的任意数据是在预设条件下存储至持久化存储介质中的;所述预设条件至少包括:所述处理模块接收到所述处理设备发送的存储指示。
  24. 一种存储系统,其特征在于,包括处理设备和存储控制设备;所述处理设备通过总线与所述存储控制设备连接;
    所述处理设备获取待存储数据的虚拟地址;所述待存储数据位于所述存储控制设备的非持久化存储介质中;
    所述处理设备将所述虚拟地址发送至所述存储控制设备;
    所述存储控制设备根据所述待存储数据的虚拟地址查询页表,获得所述待存储数据在非持久存储介质中的物理地址;所述页表中,所述非持久存储介质的每一个物理地址关联一个虚拟地址;
    所述存储控制设备根据所述待存储数据在非持久存储介质中的物理地址,在所述非持久存储介质中查找到所述待存储数据;
    所述存储控制设备将所述非持久化存储介质中所述待存储数据存储至所述存储控制设备的持久化存储介质中,以实现待存储数据的持久化。
  25. 根据权利要求24所述的存储系统,其特征在于,在所述处理设备将所述虚拟地址发送至所述存储控制设备之前,当所述处理设备的非持久化缓存中存在脏值时,所述处理设备还向所述存储控制设备发送该脏值和该脏值关联的地址;
    则在所述存储控制设备根据所述待存储数据的虚拟地址查询页表之前,所述存储控制设备还接收所述处理设备发送的脏值和该脏值关联的地址;
    所述存储控制设备根据所述脏值,将所述非持久化存储介质中该脏值关联的地址所指向的数据进行更新。
PCT/CN2015/070030 2014-05-30 2015-01-04 存储数据的处理方法、装置和系统 WO2015180493A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201410240335.0 2014-05-30
CN201410240335.0A CN105138481B (zh) 2014-05-30 2014-05-30 存储数据的处理方法、装置和系统

Publications (1)

Publication Number Publication Date
WO2015180493A1 true WO2015180493A1 (zh) 2015-12-03

Family

ID=54698040

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2015/070030 WO2015180493A1 (zh) 2014-05-30 2015-01-04 存储数据的处理方法、装置和系统

Country Status (2)

Country Link
CN (1) CN105138481B (zh)
WO (1) WO2015180493A1 (zh)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112162818A (zh) * 2020-09-16 2021-01-01 Oppo(重庆)智能科技有限公司 一种虚拟内存分配方法、装置、电子设备及存储介质
CN117591267A (zh) * 2024-01-17 2024-02-23 苏州元脑智能科技有限公司 一种任务处理方法、设备、介质及系统

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105740170B (zh) * 2016-01-22 2020-12-04 浪潮(北京)电子信息产业有限公司 一种缓存脏页刷写方法及装置
CN107168643B (zh) * 2017-03-31 2020-04-03 北京奇艺世纪科技有限公司 一种数据存储方法及装置
CN109992469B (zh) * 2017-12-29 2023-08-18 三六零科技集团有限公司 一种合并日志的方法及装置
CN112346647B (zh) * 2019-08-06 2024-03-29 浙江宇视科技有限公司 数据存储方法、装置、设备和介质
CN114089920A (zh) * 2021-11-25 2022-02-25 北京字节跳动网络技术有限公司 数据存储方法、装置、可读介质及电子设备

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1176433A (zh) * 1996-09-09 1998-03-18 株式会社东芝 高速缓存清理装置以及具备该装置的计算机系统
CN1506843A (zh) * 2002-12-12 2004-06-23 国际商业机器公司 能够使用虚拟存储器处理模式的数据处理系统
CN1622071A (zh) * 2004-12-31 2005-06-01 北京中星微电子有限公司 一种直接存储器存取装置及方法
US20110161622A1 (en) * 2009-06-24 2011-06-30 Masaki Maeda Memory access control device, integrated circuit, memory access control method, and data processing device

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101097562A (zh) * 2006-06-27 2008-01-02 深圳市中兴集成电路设计有限责任公司 一种突破非易失性存储器件速度瓶颈的装置
CN102110057B (zh) * 2009-12-25 2013-05-08 澜起科技(上海)有限公司 存储器模组及存储器模组内的数据交换方法

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1176433A (zh) * 1996-09-09 1998-03-18 株式会社东芝 高速缓存清理装置以及具备该装置的计算机系统
CN1506843A (zh) * 2002-12-12 2004-06-23 国际商业机器公司 能够使用虚拟存储器处理模式的数据处理系统
CN1622071A (zh) * 2004-12-31 2005-06-01 北京中星微电子有限公司 一种直接存储器存取装置及方法
US20110161622A1 (en) * 2009-06-24 2011-06-30 Masaki Maeda Memory access control device, integrated circuit, memory access control method, and data processing device

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112162818A (zh) * 2020-09-16 2021-01-01 Oppo(重庆)智能科技有限公司 一种虚拟内存分配方法、装置、电子设备及存储介质
CN112162818B (zh) * 2020-09-16 2023-04-07 Oppo(重庆)智能科技有限公司 一种虚拟内存分配方法、装置、电子设备及存储介质
CN117591267A (zh) * 2024-01-17 2024-02-23 苏州元脑智能科技有限公司 一种任务处理方法、设备、介质及系统
CN117591267B (zh) * 2024-01-17 2024-04-05 苏州元脑智能科技有限公司 一种任务处理方法、设备、介质及系统

Also Published As

Publication number Publication date
CN105138481B (zh) 2018-03-27
CN105138481A (zh) 2015-12-09

Similar Documents

Publication Publication Date Title
WO2015180493A1 (zh) 存储数据的处理方法、装置和系统
US10545672B2 (en) Method for accessing extended memory, device, and system
KR102432754B1 (ko) 최종 레벨 캐시 시스템 및 이에 대응하는 방법
TWI549060B (zh) Access methods and devices for virtual machine data
US8504792B2 (en) Methods and apparatuses to allocate file storage via tree representations of a bitmap
US20150113230A1 (en) Directory storage method and query method, and node controller
EP3608790B1 (en) Modifying nvme physical region page list pointers and data pointers to facilitate routing of pcie memory requests
CN106326140B (zh) 数据拷贝方法、直接内存访问控制器及计算机系统
JP6101170B2 (ja) 計算機システム、キャッシュ管理方法、及び計算機
US9092365B2 (en) Splitting direct memory access windows
EP3594807A1 (en) Virtual disk file format conversion method and device
US20170075614A1 (en) Memory system and host apparatus
JP2016536694A5 (zh)
WO2016095761A1 (zh) 缓存的处理方法和装置
WO2017006674A1 (ja) 情報処理システム、記憶制御装置、記憶制御方法および記憶制御プログラム
WO2015180598A1 (zh) 对存储设备的访问信息处理方法和装置、系统
JP6834955B2 (ja) 情報処理システム、記憶制御装置、記憶制御方法および記憶制御プログラム
KR20170108713A (ko) 하드웨어 가속기를 포함하는 메인 메모리 및 메인 메모리의 동작 방법
WO2016037499A1 (zh) 一种内存迁移方法及设备
US10719240B2 (en) Method and device for managing a storage system having a multi-layer storage structure
CN113641596A (zh) 缓存管理方法、缓存管理装置、处理器
US20110246667A1 (en) Processing unit, chip, computing device and method for accelerating data transmission
CN103345452B (zh) 一种在多个缓冲存储器中根据权重信息缓存数据方法
WO2016206070A1 (zh) 一种文件更新方法及存储设备
CN107562648B (zh) 无锁ftl访问方法与装置

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 15800677

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 15800677

Country of ref document: EP

Kind code of ref document: A1