lkml.org 
[lkml]   [2012]   [Jan]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 3/3] mm: adjust rss counters for migration entiries
On Wed, 11 Jan 2012 12:23:11 +0400
Konstantin Khlebnikov <khlebnikov@openvz.org> wrote:

> KAMEZAWA Hiroyuki wrote:
> > On Fri, 06 Jan 2012 21:38:56 +0400
> > Konstantin Khlebnikov<khlebnikov@openvz.org> 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@openvz.org>
> >
> > 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.
> >
>
> No, there only one new bug-check in 1st patch, this is non-fatal warning.
> I didn't hide this check under CONFIG_VM_DEBUG because it rather small and
> rss counters covers whole page-table management, this is very good invariant.
> Currently I can trigger this warning only on this rare race -- extremely loaded
> memory compaction catches this every several seconds.
>
> 1/3 bug-check
> 2/3 fix preparation
> 3/3 bugfix in two places:
> do rss++ in copy_one_pte()
> do rss-- in zap_pte_range()
>

Hmm, ok, I read wrong.

So, I think you should post the patch with [BUGFIX] and
report 'what happens' and 'what is the bug' , 'what you fixed' explicitly.

As...
==
This patch series fixes per-mm rss counter accounting bug. When pages are
heavily migrated, the rss counters will go wrong by fork() and unmap()
because they ignores migration_pte_entries.
This rarelly happens but will make rss counter incorrect.

This seires of patches will fix the issue by adding proper accounting of
migration_pte_entries in unmap() and fork(). This series includes
bug check code, too.
==

If [BUGFIX], people will have more interests.

Anyway, thank you for bugfix.

-Kame



\
 
 \ /
  Last update: 2012-01-11 09:45    [W:0.056 / U:0.016 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site