lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200120003131.GA26292@richard>
Date:   Mon, 20 Jan 2020 08:31:31 +0800
From:   Wei Yang <richardw.yang@...ux.intel.com>
To:     David Rientjes <rientjes@...gle.com>
Cc:     Wei Yang <richardw.yang@...ux.intel.com>,
        akpm@...ux-foundation.org, linux-mm@...ck.org,
        linux-kernel@...r.kernel.org, mhocko@...e.com,
        yang.shi@...ux.alibaba.com
Subject: Re: [PATCH 2/8] mm/migrate.c: not necessary to check start and i

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ