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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Mon, 19 Oct 2020 10:50:53 +0200
From:   Pankaj Gupta <pankaj.gupta.linux@...il.com>
To:     yanfei.xu@...driver.com
Cc:     Andrew Morton <akpm@...ux-foundation.org>,
        David Hildenbrand <david@...hat.com>,
        Vlastimil Babka <vbabka@...e.cz>,
        Linux MM <linux-mm@...ck.org>,
        LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v2] mm/compaction: Rename 'start_pfn' to
 'iteration_start_pfn' in compact_zone()

> From: Yanfei Xu <yanfei.xu@...driver.com>
>
> There are two 'start_pfn' declared in compact_zone() which have
> different meaning. Rename the second one to 'iteration_start_pfn'
> to prevent trace_mm_compaction_end() from tracing an undesirable
> value.
>
> BTW, remove an useless semicolon.
>
> Acked-by: David Hildenbrand <david@...hat.com>
> Acked-by: Vlastimil Babka <vbabka@...e.cz>
> Signed-off-by: Yanfei Xu <yanfei.xu@...driver.com>
> ---
> v1->v2:
> Rename 'start_pfn' to 'iteration_start_pfn' and change commit messages.
>
>  mm/compaction.c | 7 +++----
>  1 file changed, 3 insertions(+), 4 deletions(-)
>
> diff --git a/mm/compaction.c b/mm/compaction.c
> index 176dcded298e..ccd27c739fd6 100644
> --- a/mm/compaction.c
> +++ b/mm/compaction.c
> @@ -2272,7 +2272,7 @@ compact_zone(struct compact_control *cc, struct capture_control *capc)
>
>         while ((ret = compact_finished(cc)) == COMPACT_CONTINUE) {
>                 int err;
> -               unsigned long start_pfn = cc->migrate_pfn;
> +               unsigned long iteration_start_pfn = cc->migrate_pfn;
>
>                 /*
>                  * Avoid multiple rescans which can happen if a page cannot be
> @@ -2284,7 +2284,7 @@ compact_zone(struct compact_control *cc, struct capture_control *capc)
>                  */
>                 cc->rescan = false;
>                 if (pageblock_start_pfn(last_migrated_pfn) ==
> -                   pageblock_start_pfn(start_pfn)) {
> +                   pageblock_start_pfn(iteration_start_pfn)) {
>                         cc->rescan = true;
>                 }
>
> @@ -2308,8 +2308,7 @@ compact_zone(struct compact_control *cc, struct capture_control *capc)
>                         goto check_drain;
>                 case ISOLATE_SUCCESS:
>                         update_cached = false;
> -                       last_migrated_pfn = start_pfn;
> -                       ;
> +                       last_migrated_pfn = iteration_start_pfn;
>                 }
>
>                 err = migrate_pages(&cc->migratepages, compaction_alloc,

Improves readability.
Acked-by: Pankaj Gupta <pankaj.gupta.linux@...il.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ