[<prev] [next>] [day] [month] [year] [list]
Message-ID: <0b6a58f6-630c-aaa0-b3e9-e486cc9ce5fc@intel.com>
Date: Thu, 1 Apr 2021 16:21:52 -0700
From: Dave Hansen <dave.hansen@...el.com>
To: Wei Xu <weixugc@...gle.com>,
Dave Hansen <dave.hansen@...ux.intel.com>
Cc: linux-mm@...ck.org, linux-kernel@...r.kernel.org,
yang.shi@...ux.alibaba.com, shy828301@...il.com,
ying.huang@...el.com, Dan Williams <dan.j.williams@...el.com>,
david@...hat.com, osalvador@...e.de
Subject: Re: [PATCH 04/10] mm/migrate: make migrate_pages() return
nr_succeeded
On 4/1/21 3:35 PM, Wei Xu wrote:
> A small suggestion: Given that migrate_pages() requires that
> *nr_succeeded should be initialized to 0 when it is called due to its
> use of *nr_succeeded in count_vm_events() and trace_mm_migrate_pages(),
> it would be less error-prone if migrate_pages() initializes
> *nr_succeeded itself.
That's a good point, especially if a caller made multiple
migrate_pages() calls without resetting it, which a number of callers
do. That could really have caused some interesting problems. Thanks
for catching that!
I'll do what you suggested.
Powered by blists - more mailing lists