From: chenqiwu <qiwuchen55@gmail.com>
To: Matthew Wilcox <willy@infradead.org>
Cc: akpm@linux-foundation.org, david@redhat.com,
richard.weiyang@gmail.com, mhocko@suse.com,
pankaj.gupta.linux@gmail.com, yang.shi@linux.alibaba.com,
cai@lca.pw, bhe@redhat.com, linux-mm@kvack.org,
chenqiwu <chenqiwu@xiaomi.com>
Subject: Re: [RESEND PATCH 3/3] mm/vmscan: make several optimizations for isolate_lru_pages()
Date: Sun, 12 Apr 2020 15:35:16 +0800 [thread overview]
Message-ID: <20200412073516.GA31142@cqw-OptiPlex-7050> (raw)
In-Reply-To: <20200411161021.GD21484@bombadil.infradead.org>
On Sat, Apr 11, 2020 at 09:10:21AM -0700, Matthew Wilcox wrote:
> On Sat, Apr 11, 2020 at 06:11:56PM +0800, qiwuchen55@gmail.com wrote:
> > 1) Simplify the code of initializing some variables.
> > - unsigned long scan, total_scan, nr_pages;
> > + unsigned long scan = 0, total_scan = 0, nr_pages;
> >
> > - total_scan = 0;
> > - scan = 0;
>
> I do not find this to be a simplification.
>
Hi willy,
This slightly simplify the code by definition and initialization
meanwhile instead of separating them into the two steps.
This can save two lines of code.
Qiwu
next prev parent reply other threads:[~2020-04-12 7:35 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-11 10:11 [RESEND PATCH 1/3] mm: Replace zero-length array with flexible-array member qiwuchen55
2020-04-11 10:11 ` [RESEND PATCH 2/3] mm/swapfile: use list_{prev,next}_entry() instead of open-coding qiwuchen55
2020-04-11 10:11 ` [RESEND PATCH 3/3] mm/vmscan: make several optimizations for isolate_lru_pages() qiwuchen55
2020-04-11 16:10 ` Matthew Wilcox
2020-04-12 7:35 ` chenqiwu [this message]
2020-04-12 10:18 ` Matthew Wilcox
2020-04-11 13:54 ` [RESEND PATCH 1/3] mm: Replace zero-length array with flexible-array member Wei Yang
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=20200412073516.GA31142@cqw-OptiPlex-7050 \
--to=qiwuchen55@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=bhe@redhat.com \
--cc=cai@lca.pw \
--cc=chenqiwu@xiaomi.com \
--cc=david@redhat.com \
--cc=linux-mm@kvack.org \
--cc=mhocko@suse.com \
--cc=pankaj.gupta.linux@gmail.com \
--cc=richard.weiyang@gmail.com \
--cc=willy@infradead.org \
--cc=yang.shi@linux.alibaba.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