Dave Hansen writes:
> On 07/17/2018 08:25 PM, Huang, Ying wrote:
>>> Seriously, though, does it hurt us to add a comment or two to say
>>> something like:
>>>
>>> /*
>>> * Should not even be attempting cluster allocations when
>>> * huge page swap is disabled. Warn and fail the
Dave Hansen writes:
> On 07/17/2018 08:25 PM, Huang, Ying wrote:
>>> Seriously, though, does it hurt us to add a comment or two to say
>>> something like:
>>>
>>> /*
>>> * Should not even be attempting cluster allocations when
>>> * huge page swap is disabled. Warn and fail the
On 07/17/2018 08:25 PM, Huang, Ying wrote:
>> Seriously, though, does it hurt us to add a comment or two to say
>> something like:
>>
>> /*
>> * Should not even be attempting cluster allocations when
>> * huge page swap is disabled. Warn and fail the allocation.
>> */
>>
On 07/17/2018 08:25 PM, Huang, Ying wrote:
>> Seriously, though, does it hurt us to add a comment or two to say
>> something like:
>>
>> /*
>> * Should not even be attempting cluster allocations when
>> * huge page swap is disabled. Warn and fail the allocation.
>> */
>>
Dave Hansen writes:
>> @@ -878,6 +877,11 @@ static int swap_alloc_cluster(struct swap_info_struct
>> *si, swp_entry_t *slot)
>> unsigned long offset, i;
>> unsigned char *map;
>>
>> +if (!IS_ENABLED(CONFIG_THP_SWAP)) {
>> +VM_WARN_ON_ONCE(1);
>> +return
Dave Hansen writes:
>> @@ -878,6 +877,11 @@ static int swap_alloc_cluster(struct swap_info_struct
>> *si, swp_entry_t *slot)
>> unsigned long offset, i;
>> unsigned char *map;
>>
>> +if (!IS_ENABLED(CONFIG_THP_SWAP)) {
>> +VM_WARN_ON_ONCE(1);
>> +return
> @@ -878,6 +877,11 @@ static int swap_alloc_cluster(struct swap_info_struct
> *si, swp_entry_t *slot)
> unsigned long offset, i;
> unsigned char *map;
>
> + if (!IS_ENABLED(CONFIG_THP_SWAP)) {
> + VM_WARN_ON_ONCE(1);
> + return 0;
> + }
I see you
> @@ -878,6 +877,11 @@ static int swap_alloc_cluster(struct swap_info_struct
> *si, swp_entry_t *slot)
> unsigned long offset, i;
> unsigned char *map;
>
> + if (!IS_ENABLED(CONFIG_THP_SWAP)) {
> + VM_WARN_ON_ONCE(1);
> + return 0;
> + }
I see you
In mm/swapfile.c, THP (Transparent Huge Page) swap specific code is
enclosed by #ifdef CONFIG_THP_SWAP/#endif to avoid code dilating when
THP isn't enabled. But #ifdef/#endif in .c file hurt the code
readability, so Dave suggested to use IS_ENABLED(CONFIG_THP_SWAP)
instead and let compiler to do
In mm/swapfile.c, THP (Transparent Huge Page) swap specific code is
enclosed by #ifdef CONFIG_THP_SWAP/#endif to avoid code dilating when
THP isn't enabled. But #ifdef/#endif in .c file hurt the code
readability, so Dave suggested to use IS_ENABLED(CONFIG_THP_SWAP)
instead and let compiler to do
10 matches
Mail list logo