From: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>
To: akpm@linux-foundation.org
Cc: kirill.shutemov@linux.intel.com, gxt@mprc.pku.edu.cn,
james.hogan@imgtec.com, linux@arm.linux.org.uk, nm@ti.com,
tyler.baker@linaro.org, mm-commits@vger.kernel.org,
linux-mm@kvack.org
Subject: RE: + mm-fix-false-positive-warning-on-exit-due-mm_nr_pmdsmm.patch added to -mm tree
Date: Mon, 9 Feb 2015 16:40:20 +0200 (EET) [thread overview]
Message-ID: <20150209144020.BA6726F9@black.fi.intel.com> (raw)
In-Reply-To: <54c69dbb.9IbFgxgVUFfaIvqP%akpm@linux-foundation.org>
akpm@ wrote:
>
> The patch titled
> Subject: mm: fix false-positive warning on exit due mm_nr_pmds(mm)
> has been added to the -mm tree. Its filename is
> mm-fix-false-positive-warning-on-exit-due-mm_nr_pmdsmm.patch
>
> This patch should soon appear at
> http://ozlabs.org/~akpm/mmots/broken-out/mm-fix-false-positive-warning-on-exit-due-mm_nr_pmdsmm.patch
> and later at
> http://ozlabs.org/~akpm/mmotm/broken-out/mm-fix-false-positive-warning-on-exit-due-mm_nr_pmdsmm.patch
>
> Before you just go and hit "reply", please:
> a) Consider who else should be cc'ed
> b) Prefer to cc a suitable mailing list as well
> c) Ideally: find the original patch on the mailing list and do a
> reply-to-all to that, adding suitable additional cc's
>
> *** Remember to use Documentation/SubmitChecklist when testing your code ***
>
> The -mm tree is included into linux-next and is updated
> there every 3-4 working days
>
> ------------------------------------------------------
> From: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>
> Subject: mm: fix false-positive warning on exit due mm_nr_pmds(mm)
>
> The problem is that we check nr_ptes/nr_pmds in exit_mmap() which happens
> *before* pgd_free(). And if an arch does pte/pmd allocation in
> pgd_alloc() and frees them in pgd_free() we see offset in counters by the
> time of the checks.
>
> We tried to workaround this by offsetting expected counter value according
> to FIRST_USER_ADDRESS for both nr_pte and nr_pmd in exit_mmap(). But it
> doesn't work in some cases:
>
> 1. ARM with LPAE enabled also has non-zero USER_PGTABLES_CEILING, but
> upper addresses occupied with huge pmd entries, so the trick with
> offsetting expected counter value will get really ugly: we will have
> to apply it nr_pmds, but not nr_ptes.
>
> 2. Metag has non-zero FIRST_USER_ADDRESS, but doesn't do allocation
> pte/pmd page tables allocation in pgd_alloc(), just setup a pgd entry
> which is allocated at boot and shared accross all processes.
>
> The proposal is to move the check to check_mm() which happens *after*
> pgd_free() and do proper accounting during pgd_alloc() and pgd_free()
> which would bring counters to zero if nothing leaked.
>
> Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
> Reported-by: Tyler Baker <tyler.baker@linaro.org>
> Tested-by: Nishanth Menon <nm@ti.com>
> Cc: Russell King <linux@arm.linux.org.uk>
> Cc: James Hogan <james.hogan@imgtec.com>
> Cc: Guan Xuetao <gxt@mprc.pku.edu.cn>
> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
> ---
Small fix up for the patch.
prev parent reply other threads:[~2015-02-09 14:40 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-26 20:04 + mm-fix-false-positive-warning-on-exit-due-mm_nr_pmdsmm.patch added to -mm tree akpm
2015-01-29 15:35 ` Kirill A. Shutemov
2015-01-29 15:37 ` Kirill A. Shutemov
2015-02-09 14:40 ` Kirill A. Shutemov [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20150209144020.BA6726F9@black.fi.intel.com \
--to=kirill.shutemov@linux.intel.com \
--cc=akpm@linux-foundation.org \
--cc=gxt@mprc.pku.edu.cn \
--cc=james.hogan@imgtec.com \
--cc=linux-mm@kvack.org \
--cc=linux@arm.linux.org.uk \
--cc=mm-commits@vger.kernel.org \
--cc=nm@ti.com \
--cc=tyler.baker@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.