Re: [PATCH v3 01/11] md/raid5: add CONFIG_MD_RAID456_STRIPE_SHIFT to set STRIPE_SIZE

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

 



>>>>> "Guoqing" == Guoqing Jiang <guoqing.jiang@xxxxxxxxxxxxxxx> writes:

Guoqing> Hi,
Guoqing> On 5/27/20 3:19 PM, Yufen Yu wrote:
>> +config MD_RAID456_STRIPE_SHIFT
>> +	int "RAID4/RAID5/RAID6 stripe size shift"
>> +	default "1"
>> +	depends on MD_RAID456
>> +	help
>> +	  When set the value as 'N', stripe size will be set as 'N << 9',
>> +	  which is a multiple of 4KB.

Guoqing> If 'N  << 9', then seems you are convert it to sector, do you actually 
Guoqing> mean 'N << 12'?

Aren't there helpers that can be used here instead of semi-magic
numbers?  At the least, the 9 and 12 should be #defines with good
names, or using the standard PAGE_SIZE and other defines.  

>> +
>> +	  The default value is 1, that means the default stripe size is
>> +	  4096(1 << 9). Just setting as a bigger value when PAGE_SIZE is
>> +	  bigger than 4096. In that case, you can set it as 2(8KB),
>> +	  4(16K), 16(64K).

Guoqing> So with the above description, the algorithm should be 2 << 12 = 8KB and 
Guoqing> so on.

>> +
>> +	  When you try to set a big value, likely 16 on arm64 with 64KB
>> +	  PAGE_SIZE, that means, you know size of each io that issued to
>> +	  raid device is more than 4096. Otherwise just use default value.
>> +

Cheers,
John



[Index of Archives]     [Linux RAID Wiki]     [ATA RAID]     [Linux SCSI Target Infrastructure]     [Linux Block]     [Linux IDE]     [Linux SCSI]     [Linux Hams]     [Device Mapper]     [Device Mapper Cryptographics]     [Kernel]     [Linux Admin]     [Linux Net]     [GFS]     [RPM]     [git]     [Yosemite Forum]


  Powered by Linux