Messages in this thread | | | Date | Tue, 10 Apr 2012 18:04:57 +0200 | From | Markus Trippelsdorf <> | Subject | Re: [PATCH] mm: sync rss-counters at the end of exit_mm() |
| |
On 2012.04.10 at 10:34 +0400, Konstantin Khlebnikov wrote: > Hugh Dickins wrote: > > On Mon, 9 Apr 2012, KOSAKI Motohiro wrote: > >> On Mon, Apr 9, 2012 at 4:03 PM, Konstantin Khlebnikov > >> <khlebnikov@openvz.org> wrote: > >>> On task's exit do_exit() calls sync_mm_rss() but this is not enough, > >>> there can be page-faults after this point, for example exit_mm() -> > >>> mm_release() -> put_user() (for processing tsk->clear_child_tid). > >>> Thus there may be some rss-counters delta in current->rss_stat. > >> > >> Seems reasonable. > > > > Yes, I think Konstantin has probably caught it; > > but I'd like to hear confirmation from Markus. > > There is another bug in exec_mmap() > > --- a/fs/exec.c > +++ b/fs/exec.c > @@ -823,8 +823,8 @@ static int exec_mmap(struct mm_struct *mm) > /* Notify parent that we're no longer interested in the old VM */ > tsk = current; > old_mm = current->mm; > - sync_mm_rss(old_mm); > mm_release(tsk, old_mm); > + sync_mm_rss(old_mm); > > if (old_mm) { > /*
FWIW with both patches applied I cannot reproduce the issue anymore.
Thanks.
-- Markus
| |