linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Michal Hocko <mhocko@kernel.org>
To: Vlastimil Babka <vbabka@suse.cz>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Mel Gorman <mgorman@suse.de>,
	Johannes Weiner <hannes@cmpxchg.org>,
	Minchan Kim <minchan@kernel.org>,
	Hillf Danton <hillf.zj@alibaba-inc.com>,
	linux-mm@kvack.org, LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 5/7] mm, vmscan: extract shrink_page_list reclaim counters into a struct
Date: Wed, 4 Jan 2017 16:09:47 +0100	[thread overview]
Message-ID: <20170104150947.GP25453@dhcp22.suse.cz> (raw)
In-Reply-To: <01c9e2c9-3a04-48cd-cf0e-265db33d1a24@suse.cz>

On Wed 04-01-17 15:51:43, Vlastimil Babka wrote:
[...]
> > @@ -1266,11 +1270,13 @@ static unsigned long shrink_page_list(struct list_head *page_list,
> >  	list_splice(&ret_pages, page_list);
> >  	count_vm_events(PGACTIVATE, pgactivate);
> >  
> > -	*ret_nr_dirty += nr_dirty;
> > -	*ret_nr_congested += nr_congested;
> > -	*ret_nr_unqueued_dirty += nr_unqueued_dirty;
> > -	*ret_nr_writeback += nr_writeback;
> > -	*ret_nr_immediate += nr_immediate;
> > +	if (stat) {
> > +		stat->nr_dirty = nr_dirty;
> > +		stat->nr_congested = nr_congested;
> > +		stat->nr_unqueued_dirty = nr_unqueued_dirty;
> > +		stat->nr_writeback = nr_writeback;
> > +		stat->nr_immediate = nr_immediate;
> > +	}
> 
> This change of '+=' to '=' raised my eybrows, but it seems both callers
> don't care so this is indeed no functional change and potentially faster.

Yes, I was quite surprised as well, maybe we had a code which relied on
the aggregated numbers in the past but I didn't bother to go over git
logs to check. There is no such user anymore...
 

-- 
Michal Hocko
SUSE Labs

  reply	other threads:[~2017-01-04 15:09 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-04 10:19 [PATCH 0/7 v2] vm, vmscan: enahance vmscan tracepoints Michal Hocko
2017-01-04 10:19 ` [PATCH 1/7] mm, vmscan: remove unused mm_vmscan_memcg_isolate Michal Hocko
2017-01-04 10:19 ` [PATCH 2/7] mm, vmscan: add active list aging tracepoint Michal Hocko
2017-01-04 12:52   ` Vlastimil Babka
2017-01-04 13:16     ` Michal Hocko
2017-01-04 13:34       ` Vlastimil Babka
2017-01-04 13:52   ` Michal Hocko
2017-01-05  5:41     ` Minchan Kim
2017-01-04 10:19 ` [PATCH 3/7] mm, vmscan: show the number of skipped pages in mm_vmscan_lru_isolate Michal Hocko
2017-01-04 10:19 ` [PATCH 4/7] mm, vmscan: show LRU name in mm_vmscan_lru_isolate tracepoint Michal Hocko
2017-01-05  6:04   ` Minchan Kim
2017-01-05 10:16     ` Michal Hocko
2017-01-05 14:56       ` Mel Gorman
2017-01-05 15:17         ` Michal Hocko
2017-01-04 10:19 ` [PATCH 5/7] mm, vmscan: extract shrink_page_list reclaim counters into a struct Michal Hocko
2017-01-04 14:51   ` Vlastimil Babka
2017-01-04 15:09     ` Michal Hocko [this message]
2017-01-04 10:19 ` [PATCH 6/7] mm, vmscan: enhance mm_vmscan_lru_shrink_inactive tracepoint Michal Hocko
2017-01-04 10:19 ` [PATCH 7/7] mm, vmscan: add mm_vmscan_inactive_list_is_low tracepoint Michal Hocko
2017-01-04 10:30 ` [PATCH 0/7 v2] vm, vmscan: enahance vmscan tracepoints Michal Hocko
2017-01-05  8:25 ` Vlastimil Babka
2017-01-05 10:39 ` Michal Hocko
  -- strict thread matches above, loose matches on Subject: below --
2016-12-28 15:30 [PATCH 0/7] " Michal Hocko
2016-12-28 15:30 ` [PATCH 5/7] mm, vmscan: extract shrink_page_list reclaim counters into a struct Michal Hocko
2016-12-29  8:00   ` Hillf Danton

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=20170104150947.GP25453@dhcp22.suse.cz \
    --to=mhocko@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=hannes@cmpxchg.org \
    --cc=hillf.zj@alibaba-inc.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mgorman@suse.de \
    --cc=minchan@kernel.org \
    --cc=vbabka@suse.cz \
    /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).