[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20170104150947.GP25453@dhcp22.suse.cz>
Date: Wed, 4 Jan 2017 16:09:47 +0100
From: Michal Hocko <mhocko@...nel.org>
To: Vlastimil Babka <vbabka@...e.cz>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
Mel Gorman <mgorman@...e.de>,
Johannes Weiner <hannes@...xchg.org>,
Minchan Kim <minchan@...nel.org>,
Hillf Danton <hillf.zj@...baba-inc.com>, linux-mm@...ck.org,
LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 5/7] mm, vmscan: extract shrink_page_list reclaim
counters into a struct
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
Powered by blists - more mailing lists