Loading...
Please wait, while we are loading the content...
Dram-based Storage Caching Method and Dram-based Smart Terminal
| Content Provider | The Lens |
|---|---|
| Abstract | Embodiments of the present disclosure provide a DRAM-based storage caching method for a smart terminal, and the method includes: capturing an IO delivered by an upper-layer application; determining, based on a configuration policy, whether the IO belongs to a pre-specified to-be-cached IO type; and when the IO belongs to the pre-specified to-be-cached IO type, performing a corresponding caching operation for the IO in a DRAM disk based on a read/write type of the IO and a preset caching policy, where the DRAM disk is a block device created by using a reserved part of DRAM space of an operating system. |
| Related Links | https://www.lens.org/lens/patent/009-880-063-932-602/frontpage |
| Language | English |
| Publisher Date | 2019-08-22 |
| Access Restriction | Open |
| Content Type | Text |
| Resource Type | Patent |
| Jurisdiction | United States of America |
| Date Applied | 2019-05-01 |
| Applicant | Huawei Tech Co Ltd |
| Application No. | 201916400319 |
| Claim | A DRAM-based storage caching method for a smart terminal, comprising: capturing an input/output (IO) delivered by an upper-layer application; determining, based on a configuration policy, whether the IO belongs to a pre-specified to-be-cached IO type; and when the IO belongs to the pre-specified to-be-cached IO type, performing a corresponding caching operation for the IO in a DRAM disk based on a read/write type of the IO and a preset caching policy, wherein the DRAM disk is a block device created by using a reserved part of DRAM space of an operating system. The method according to claim 1 , wherein determining whether the IO belongs to the pre-specified to-be-cached IO type comprises: determining a size relationship between a size of the IO and a preset threshold, and when the size of the IO is smaller than the preset threshold, determining that the IO belongs to the pre-specified to-be-cached IO type. The method according to claim 1 , wherein determining whether the IO belongs to the pre-specified to-be-cached IO type comprises: determining whether a type of the IO is a user pre-specified IO type, and when the type of the IO is the user pre-specified IO type, determining that the IO belongs to the pre-specified to-be-cached IO type, wherein the user pre-specified IO type is a hot data IO or a random IO. The method according to claim 1 , wherein performing the corresponding caching operation for the IO in the DRAM disk based on the read/write type of the IO and the preset caching policy comprises: determining the read/write type of the IO, and when the IO is a write IO, caching the write IO in the DRAM disk, or when the IO is a read IO, reading data operated by the read IO and caching the data in the DRAM disk. The method according to claim 1 , further comprising: when the DRAM disk is short of space, selecting to flush dirty data back into a bottom-layer device according to a preset policy. The method according to claim 5 , further comprising: in a case of a normal switch-off of the smart terminal, before the switch-off, flushing all dirty data cached in the DRAM disk back into the bottom-layer device, and disabling caching or setting the caching policy to write-through. The caching method according to claim 1 , wherein the method further comprises: in a case of a forced switch-off or a restart of the smart terminal, at the beginning of the forced switch-off or the restart, flushing back the dirty data, and disabling caching or setting the caching policy to write-through. A terminal having a DRAM, the terminal comprising: a capture module configured to capture an input/output (IO) delivered by an upper-layer application; a judgment module configured to determine, based on a configuration policy, whether the IO captured by the capture module belongs to a to-be-cached IO type; and a caching operation module configured to: when the IO captured by the capture module belongs to the to-be-cached IO type, perform a corresponding caching operation for the IO in a DRAM disk based on a read/write type of the IO and a preset caching policy, wherein the DRAM disk is a block device created by using a reserved part of DRAM space of an operating system of the termina The terminal according to claim 8 , wherein the judgment module comprises: a first judgment unit configured to determine a size relationship between a size of the IO captured by the capture module and a preset threshold, and a determining unit configured to: when the first judgment unit determines that the size of the IO is smaller than the preset threshold, determine that the IO belongs to a to-be-cached IO type. The terminal according to claim 8 , wherein the judgment module comprises: a first judgment unit configured to determine whether a type of the IO is a user pre-specified IO type, and a determining unit configured to: when the first judgment unit determines that the type of the IO is the user pre-specified IO type, determine that the IO belongs to the to-be-cached IO type, wherein the user pre-specified IO type is a hot data IO or a random IO. The terminal according to claim 9 , wherein the caching operation module comprises: a second judgment unit configured to: when the first judgment unit determines that the size of the IO is smaller than the preset threshold or that the type of the IO is a user pre-specified IO type, determine a read/write type of the IO, and a caching unit configured to: when the second judgment unit determines that the IO is a write IO, cache the write IO into the DRAM disk, or configured to: when the second judgment unit determines that the IO is a read IO, read data operated by the read IO from a bottom-layer storage device of the terminal, and cache the data in the DRAM disk. |
| CPC Classification | ELECTRIC DIGITAL DATA PROCESSING |
| Extended Family | 154-088-037-735-945 049-240-720-398-979 007-491-896-001-763 179-904-600-967-965 009-880-063-932-602 |
| Patent ID | 20190258582 |
| Inventor/Author | Miao Xie Wang Yijing Wang Bintian Chen Qiulin |
| IPC | G06F12/0893 G06F12/0804 G06F12/0868 |
| Status | Discontinued |
| Simple Family | 007-491-896-001-763 049-240-720-398-979 009-880-063-932-602 179-904-600-967-965 154-088-037-735-945 |
| CPC (with Group) | G06F3/061 G06F3/0656 G06F3/0688 G06F3/0685 G06F3/0646 G06F3/0655 G06F3/0679 G06F12/0868 G06F12/0871 G06F12/0888 G06F2212/1016 G06F2212/305 G06F2212/313 G06F2212/461 G06F12/0893 G06F3/06 G06F12/0804 G06F2212/224 |
| Issuing Authority | United States Patent and Trademark Office (USPTO) |
| Kind | Patent Application Publication |