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]
Date:   Mon, 7 Mar 2022 10:31:33 +0800
From:   Baolin Wang <baolin.wang@...ux.alibaba.com>
To:     Miaohe Lin <linmiaohe@...wei.com>, akpm@...ux-foundation.org
Cc:     mike.kravetz@...cle.com, shy828301@...il.com, willy@...radead.org,
        ying.huang@...el.com, ziy@...dia.com, minchan@...nel.org,
        apopple@...dia.com, dave.hansen@...ux.intel.com,
        o451686892@...il.com, almasrymina@...gle.com, jhubbard@...dia.com,
        rcampbell@...dia.com, peterx@...hat.com, naoya.horiguchi@....com,
        mhocko@...e.com, riel@...hat.com, linux-mm@...ck.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH 08/16] mm/migration: avoid unneeded nodemask_t
 initialization



On 3/4/2022 5:34 PM, Miaohe Lin wrote:
> Avoid unneeded next_pass and this_pass initialization as they're always
> set before using to save possible cpu cycles when there are plenty of
> nodes in the system.
> 
> Signed-off-by: Miaohe Lin <linmiaohe@...wei.com>
> ---
>   mm/migrate.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/mm/migrate.c b/mm/migrate.c
> index c84eec19072a..abb0c6715e1f 100644
> --- a/mm/migrate.c
> +++ b/mm/migrate.c
> @@ -2378,8 +2378,8 @@ static int establish_migrate_target(int node, nodemask_t *used,
>    */
>   static void __set_migration_target_nodes(void)
>   {
> -	nodemask_t next_pass	= NODE_MASK_NONE;
> -	nodemask_t this_pass	= NODE_MASK_NONE;
> +	nodemask_t next_pass;
> +	nodemask_t this_pass;
>   	nodemask_t used_targets = NODE_MASK_NONE;
>   	int node, best_distance;

LGTM.
Reviewed-by: Baolin Wang <baolin.wang@...ux.alibaba.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ