On Fri, 06 Jan 2012 21:38:56 +0400
Konstantin Khlebnikov<khlebnikov@xxxxxxxxxx> wrote:
Memory migration fill pte with migration entry and it didn't update rss counters.
Then it replace migration entry with new page (or old one if migration was failed).
But between this two passes this pte can be unmaped, or task can fork child and
it will get copy of this migration entry. Nobody account this into rss counters.
This patch properly adjust rss counters for migration entries in zap_pte_range()
and copy_one_pte(). Thus we avoid extra atomic operations on migration fast-path.
Signed-off-by: Konstantin Khlebnikov<khlebnikov@xxxxxxxxxx>
It's better to show wheter this is a bug-fix or not in changelog.
IIUC, the bug-fix is the 1st harf of this patch + patch [2/3].
Your new bug-check code is in patch[1/3] and 2nd half of this patch.
I think it's better to do bug-fix 1st and add bug-check later.
So, could you reorder patches to bug-fix and new-bug-check ?
To the logic itself,
Acked-by: KAMEZAWA Hiroyuki<kamezawa.hiroyu@xxxxxxxxxxxxxx>
Please CC when you repost.