Method and device for writing data into cache

A technology for writing data and caching, which is applied in the direction of electrical digital data processing, memory system, input/output to record carrier, etc., and can solve problems affecting the life of Flash

Active Publication Date: 2018-02-06
HUAWEI CLOUD COMPUTING TECH CO LTD
View PDF5 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0004] The embodiment of the present invention provides a method and device for writing data into the cache, which can solve the problem of frequently writing metadata into the Flash and affecting the life of the Flash

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Method and device for writing data into cache
  • Method and device for writing data into cache
  • Method and device for writing data into cache

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0066] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments It is a part of embodiments of the present invention, but not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without making creative efforts belong to the protection scope of the present invention.

[0067] In order to facilitate the understanding of the embodiments of the present invention, further explanations will be given below with specific embodiments in conjunction with the accompanying drawings, which are not intended to limit the embodiments of the present invention.

[0068] figure 1 It is a schematic diagram of data layout of ...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

PUM

No PUM Login to view more

Abstract

A method and device for writing data to a cache, comprising: receiving an I / O write request command, the command comprising metadata of data to be written (S410); acquiring a metadata group currently being processed as a first metadata group, one metadata group corresponding to one metadata block and comprising a plurality of free blocks in a memory (S420); determining whether the first metadata group has a residual free block (S430); if so, then writing, into one free block of the residual free blocks and a metadata block corresponding to the first metadata group, the metadata of the data to be written (S440); if not, then determining whether a second metadata group has a residual free block, and if so, then acquiring the second metadata group, and writing, into one free block of the residual free blocks of the second metadata group, the metadata of the data to be written (S450); and writing the metadata of the data to be written into a metadata block corresponding to the second metadata group (S460), thus solving the problem that the service life of flash memory is affected by frequently writing metadata into flash memory.

Description

technical field [0001] The invention relates to the field of data storage, in particular to a method and device for writing data into a cache. Background technique [0002] In the existing read-write cache (Cache) in the industry, the storage media generally adopted are all based on non-volatile memory (A Non-Volatile Dual In-line Memory Module, NVDIMM) or non-volatile random access memory ( Non-Volatile Random Access Memory, NVRAM), but based on the above-mentioned devices, the capacity of the write cache is usually relatively small, and it is difficult to cope with a large number of random write pressure scenarios. [0003] In the prior art, a flash memory (Flash) device is used as the Cache. To ensure data security, each write request requires two IOs, one for writing data IO and the other for writing metadata IO. The lifetime of Flash is directly related to the number of write times, for example, Multi-Level Cell (MLC) flash memory is usually only about 5000-10000 time...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

Application Information

Patent Timeline
no application Login to view more
Patent Type & Authority Patents(China)
IPC IPC(8): G06F3/06G06F12/0877
CPCG06F3/06G06F12/08
Inventor 黄福堂
Owner HUAWEI CLOUD COMPUTING TECH CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products