Re: [PATCH v4 01/15] fs: Rename the kernel-internal data lifetime constants

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

 



On 11/27/2023 12:38 PM, Christoph Hellwig wrote:
> On Tue, Nov 14, 2023 at 01:40:56PM -0800, Bart Van Assche wrote:
>> -	case WRITE_LIFE_SHORT:
>> +	case WRITE_LIFE_2:
>>   		return CURSEG_HOT_DATA;
>> -	case WRITE_LIFE_EXTREME:
>> +	case WRITE_LIFE_5:
>>   		return CURSEG_COLD_DATA;
>>   	default:
>>   		return CURSEG_WARM_DATA;
> 
> A WRITE_LIFE_2 constant is strictly more confusing than just using 2,
> so this patch makes no sense whatsoever.
> 
> More importantly these constant have been around forever, so we'd better
> have a really good argument for changing them.

How about this argument (assuming you may not have seen) from previous 
iteration [1]-

"Does it make sense to do away with these, and have temperature-neutral
names instead e.g., WRITE_LIFE_1, WRITE_LIFE_2?

With the current choice:
- If the count goes up (beyond 5 hints), infra can scale fine but these
names do not. Imagine ULTRA_EXTREME after EXTREME.
- Applications or in-kernel users can specify LONG hint with data that
actually has a SHORT lifetime. Nothing really ensures that LONG is
really LONG.

Temperature-neutral names seem more generic/scalable and do not present
the unnecessary need to be accurate with relative temperatures."

[1]
https://lore.kernel.org/linux-block/b3058ce6-e297-b4c3-71d4-4b76f76439ba@xxxxxxxxxxx/




[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux