Messages in this thread | | | Subject | Re: [PATCH] pramdisk: new block disk driver to perform persistent storage | From | Lin Yongting <> | Date | Mon, 21 Sep 2015 17:35:49 +0800 |
| |
On 2015/9/19 0:41, Dan Williams wrote: > On Fri, Sep 18, 2015 at 9:18 AM, Ross Zwisler > <ross.zwisler@linux.intel.com> wrote: >> On Fri, Sep 18, 2015 at 03:46:30PM +0800, Lin Yongting wrote: >>> In embed devices, user space applications will use reserved memory >>> (i.e. persistent memory) to store business data, the data is kept >>> in this memory region after system rebooting or panic. >>> >>> pramdisk is a block disk driver based on Persistent memory, it provide >>> file system interface for application to read/write data in persistent >>> memory. Application can use pramdisk to store log file or business data >>> in persistent memory in the way of file system operation, avoid operating >>> or managing memory directly. >>> >>> pramdisk support multiple Persistent menory regions and each one is a >>> block device named as /dev/pram<N>. >>> >>> Usage: >>> modprobe pramdisk.ko pmem=<size1>@<addr2> [ pmem=<size2>@<addr2> ... ] >>> >>> For example: >>> modprobe pramdisk.ko pmem=20M@2050M pmem=20M@2150M >>> mkfs.ext3 /dev/pram1 >>> mkdir /tmp/test1 >>> mount -t ext3 /dev/pram1 /tmp/test1 >>> >>> Signed-off-by: Lin Yongting <linyongting@huawei.com> >>> Signed-off-by: Wang xiaozhe <wangxiaozhe@huawei.com> >> >> I think you already have this functionality with the PMEM driver and the >> memmap=nn[KMG]!ss[KMG] command line parameter? What are you trying to >> accomplish with this driver that you can't do with PMEM? > > Moreover, if your embedded firmware publishes persistent memory ranges > you can reuse the drivers/nvdimm/e820.c driver. As long as your > platform code in the kernel names those iomem_resource(s) as > ""Persistent Memory (legacy)" they will be auto discovered and > surfaced by the libnvidmm sub-system. >
Thanks Dan!
Seems nvdimm sub-system can figure out my requirement.
Actually, my system is ARM arch, there is no any firmware but just a DDR memory. We reserved a memory region which is out of OS-memory to store data Persistently, this memory region will not clear in rebooting or panic as long as the power is not cut off.
| |