Re: [PATCH] brd: detect zero writes for saving ram

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



2015-02-08 0:18 GMT+09:00 Akinobu Mita <akinobu.mita@xxxxxxxxx>:
> 2015-02-08 0:03 GMT+09:00 Akinobu Mita <akinobu.mita@xxxxxxxxx>:
>> This introduces a module parameter to detect zero writes and not to
>> allocate memory.  Read requests for unallocated (unwritten) region
>> end up by reading zero.  So this can save zeroed memory consumption
>> with extra overhead for the detection.
>>
>> This feature is useful for testing filesystems and user programs to
>> huge files without huge real storage.  So this change also extends
>> the upper limit on the size of the RAM disk.
>
> I have just noticed about zram and I'll check I can use it instead.

zram currently needs to allocate memory proportional to the size of
the disk ((disksize >> PAGE_SHIFT) * sizeof(struct zram_table_entry)).
If disksize is TB or PB class, it requires huge amount of memory.
But brd with this patch can create 1PB filesystem.  So there is a
reason for this new brd feature to exist.

        # modprobe brd zero_detect=1 rd_size=$((1024*1024*1024*1024))
        # mkfs.xfs /dev/ram0
        # mount /dev/ram0 /mnt
--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux