Re: [PATCH 2/8] mm/migrate.c: not necessary to check start and i

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

 



On Sun, Jan 19, 2020 at 02:14:28PM -0800, David Rientjes wrote:
>On Sun, 19 Jan 2020, Wei Yang wrote:
>
>> diff --git a/mm/migrate.c b/mm/migrate.c
>> index ba7cf4fa43a0..c3ef70de5876 100644
>> --- a/mm/migrate.c
>> +++ b/mm/migrate.c
>> @@ -1664,11 +1664,9 @@ static int do_pages_move(struct mm_struct *mm, nodemask_t task_nodes,
>>  		err = do_move_pages_to_node(mm, &pagelist, current_node);
>>  		if (err)
>>  			goto out;
>> -		if (i > start) {
>> -			err = store_status(status, start, current_node, i - start);
>> -			if (err)
>> -				goto out;
>> -		}
>> +		err = store_status(status, start, current_node, i - start);
>> +		if (err)
>> +			goto out;
>>  		current_node = NUMA_NO_NODE;
>>  	}
>>  out_flush:
>
>Not sure this is useful, it relies on the implementation of store_status() 
>when i == start and the overhead of the function call should actually be 
>slower than the simple conditional to avoid it in that case?

Not sure about this.

While this patch is a transient state for the following cleanup. The purpose
of this is to make the consolidation a little easy to review.

-- 
Wei Yang
Help you, Help me




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux