From: David Hildenbrand <david@redhat.com>
To: yanfei.xu@windriver.com, akpm@linux-foundation.org
Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mm/compaction: Remove some useless code in compact_zone()
Date: Wed, 14 Oct 2020 14:28:23 +0200 [thread overview]
Message-ID: <dc40599d-e964-3a53-f3e7-94c03d3a162c@redhat.com> (raw)
In-Reply-To: <20201014072349.34494-1-yanfei.xu@windriver.com>
On 14.10.20 09:23, yanfei.xu@windriver.com wrote:
> From: Yanfei Xu <yanfei.xu@windriver.com>
>
> start_pfn has been declared at the begin of compact_zone(), it's
> no need to declare it again. And remove an useless semicolon.
>
> Signed-off-by: Yanfei Xu <yanfei.xu@windriver.com>
> ---
> mm/compaction.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/mm/compaction.c b/mm/compaction.c
> index 176dcded298e..5e69c1f94d96 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;
> + start_pfn = cc->migrate_pfn;
There is a user in
trace_mm_compaction_end(start_pfn, cc->migrate_pfn, cc->free_pfn,
end_pfn, sync, ret);
we would now trace a different value, no?
>
> /*
> * Avoid multiple rescans which can happen if a page cannot be
> @@ -2309,7 +2309,6 @@ compact_zone(struct compact_control *cc, struct capture_control *capc)
> case ISOLATE_SUCCESS:
> update_cached = false;
> last_migrated_pfn = start_pfn;
> - ;
Huh, how does something like that happen :)
--
Thanks,
David / dhildenb
next prev parent reply other threads:[~2020-10-14 12:28 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-14 7:23 [PATCH] mm/compaction: Remove some useless code in compact_zone() yanfei.xu
2020-10-14 12:28 ` David Hildenbrand [this message]
2020-10-16 15:05 ` Vlastimil Babka
2020-10-19 7:32 ` Xu, Yanfei
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=dc40599d-e964-3a53-f3e7-94c03d3a162c@redhat.com \
--to=david@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=yanfei.xu@windriver.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).