Re: [bch-nvm-pages v7 2/6] bcache: initialize the nvm pages allocator

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

 



On 3/29/21 1:54 PM, Coly Li wrote:
> On 3/17/21 11:10 PM, Qiaowei Ren wrote:
>> From: Jianpeng Ma <jianpeng.ma@xxxxxxxxx>
>>
>> This patch define the prototype data structures in memory and initializes
>> the nvm pages allocator.
>>
>> The nv address space which is managed by this allocatior can consist of
>> many nvm namespaces, and some namespaces can compose into one nvm set,
>> like cache set. For this initial implementation, only one set can be
>> supported.
>>
>> The users of this nvm pages allocator need to call regiseter_namespace()
>> to register the nvdimm device (like /dev/pmemX) into this allocator as
>> the instance of struct nvm_namespace.
>>
>> Signed-off-by: Jianpeng Ma <jianpeng.ma@xxxxxxxxx>
>> Co-authored-by: Qiaowei Ren <qiaowei.ren@xxxxxxxxx>

[snipped]

>> -
>>  struct bch_pgalloc_rec {
>>  	__u64			pgoff:52;
>>  	__u64			order:12;
>>
> 
> BTW the above difinication of bit field is improper. You won't get what
> you wan't as a 64bit size record. But don't worry I fix it in other
> patches and the joint series will be posted soon after I integriate them
> together.

I withdraw the above comments. This is for NVDIMM, and libnvdimm depends
on PHYS_ADDR_T_64BIT, it implicitly indicates a 64bit kernel (64BIT=y).
So your method works.

I will take the above idea in my patch to define the meta data
structure. One more modification is, order:12 is too large, I will take
6 bits, and reserve the highest 6 bits.

Thanks.

Coly Li



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux ARM Kernel]     [Linux Filesystem Development]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux