The invention discloses a method for non volatile memory page cache, including: file read process, a separate division of nonvolatile memory as a disk cache file readahead data stored in the nonvolatile memory of the non base tree; when receiving the target page cache read instructions, according to the instructions to find the target the page cache, and the search results based on the paging information is copied to the DRAM file; the writing process, if paging data is modified, the paging the dirty, dirty pages to write data in the non-volatile memory, when the need to write back the dirty page, the dirty page data cache to the nonvolatile memory, and the the dirty page data copied to the corresponding position of non volatile memory medium in the tree, the nonvolatile memory data is written to disk. Compared with the existing technology, the invention is suitable for big data application scenarios, and can reduce system I/O operation and improve system performance when data read frequently and data volume is large.
【技术实现步骤摘要】
一种面向非易失存储的页缓存方法
本专利技术涉及服务器操作系统
,具体地说是一种面向非易失存储的页缓存方法。
技术介绍
随着云计算技术的不断发展和规模的壮大,人们对存储的要求越来越高,希望有高密度、高读写速度、低能耗的存储介质。现有的Linux的页缓存机制只支持对DRAM的使用,DRAM(DynamicRandomAccessMemory),即动态随机存取存储器,最为常见的系统内存。DRAM只能将数据保持很短的时间。为了保持数据,DRAM使用电容存储,所以必须隔一段时间刷新(refresh)一次,如果存储单元没有被刷新,存储的信息就会丢失。DRAM的结构可谓是简单高效,每一个bit只需要一个晶体管加一个电容。但是电容不可避免的存在漏电现象,如果电荷不足会导致数据出错,因此电容必须被周期性的刷新(预充电),这也是DRAM的一大特点。而且电容的充放电需要一个过程,刷新频率不可能无限提升(频障),这就导致DRAM的频率很容易达到上限,即便有先进工艺的支持也收效甚微。所以,存在的弊端如下:1、Linux的页缓存机制只支持对DRAM的使用;2、现有基于DRAM的用于缓存页的区域容量小,能够预取和缓存的页面少,需要频繁进行I/O操作,降低系统性能。而NVM(Non-volatileMemory,固定存储器,非易失存储器),具有非易失、按字节存取、存储密度高、低能耗、读写性能接近DRAM。基于新型非易失性存储器(统称为NVM)的服务器系统逐渐引起人们的关注,如何利用NVM的密度高、容量大、速度快和能耗低的特点,成为基于非易失存储的服务器系统的关键问题。
技术实现思路
本 ...
【技术保护点】
一种面向非易失存储的页缓存方法,其特征在于,在Linux操作系统中,将非易失存储器作为磁盘的缓存的页缓存方法。
【技术特征摘要】
1.一种面向非易失存储的页缓存方法,其特征在于,在Linux操作系统中,将非易失存储器作为磁盘的缓存的页缓存方法。2.根据权利要求1所述的一种面向非易失存储的页缓存方法,其特征在于,包括:文件读取过程,单独划分非易失存储器作为磁盘的缓存,将文件预读的数据存储于非易失存储器的基树中;当接收目标页缓存读取指令时,根据所述指令查找目标页缓存,并根据查找结果将分页的信息复制到DRAM中;文件写入过程,若分页数据被修改后,将分页置脏,把脏页数据写入非易失存储器中,当需要脏页回写时,把脏页数据缓存到非易失存储器,并把脏页数据复制到非易失存储器基树中的对应位置后,将非易失存储器中的数据,写入磁盘。3.根据权利要求2所述的一种面向非易失存储的页缓存方法,其特征在于,所述的当接收目标页缓存读取指令时,根据指令查找目标页缓存,具体方法如下:当接收目标页缓存读取指令时,根据所述指令,查找page_tree结构体;如果未命中,继续查找非易失存储器的基树;如果命中,把分页复制到DRAM中;如果未命中,从磁盘中读取目标页到DRAM中。4.根据权利要求3所述的一种面向非易失存储的页缓存方法,其特征在于,所述的page_tree结构体中保存有address_space结构体,所述的address_space结构体中增加一个基树page_tree_nvm,所述的基树page_t...
【专利技术属性】
技术研发人员:刘璧怡,范冬冬,周恒钊,
申请(专利权)人:郑州云海信息技术有限公司,
类型:发明
国别省市:河南,41
还没有人留言评论。发表了对其他浏览者有用的留言会获得科技券。