From: Cyrill Gorcunov <gorcunov@gmail.com>
To: Dave Hansen <dave.hansen@linux.intel.com>
Cc: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>,
Andrew Morton <akpm@linux-foundation.org>,
Hugh Dickins <hughd@google.com>,
linux-mm@kvack.org, Pavel Emelyanov <xemul@openvz.org>,
linux-kernel@vger.kernel.org,
Benjamin Herrenschmidt <benh@kernel.crashing.org>
Subject: Re: [PATCH 1/2] mm: rename mm->nr_ptes to mm->nr_pgtables
Date: Wed, 14 Jan 2015 12:45:38 +0300 [thread overview]
Message-ID: <20150114094538.GD2253@moon> (raw)
In-Reply-To: <54B592D6.4090406@linux.intel.com>
On Tue, Jan 13, 2015 at 01:49:10PM -0800, Dave Hansen wrote:
> On 01/13/2015 01:43 PM, Cyrill Gorcunov wrote:
> > On Tue, Jan 13, 2015 at 09:14:15PM +0200, Kirill A. Shutemov wrote:
> >> We're going to account pmd page tables too. Let's rename mm->nr_pgtables
> >> to something more generic.
> >>
> >> Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
> >> --- a/fs/proc/task_mmu.c
> >> +++ b/fs/proc/task_mmu.c
> >> @@ -64,7 +64,7 @@ void task_mem(struct seq_file *m, struct mm_struct *mm)
> >> data << (PAGE_SHIFT-10),
> >> mm->stack_vm << (PAGE_SHIFT-10), text, lib,
> >> (PTRS_PER_PTE * sizeof(pte_t) *
> >> - atomic_long_read(&mm->nr_ptes)) >> 10,
> >> + atomic_long_read(&mm->nr_pgtables)) >> 10,
> >
> > This implies that (PTRS_PER_PTE * sizeof(pte_t)) = (PTRS_PER_PMD * sizeof(pmd_t))
> > which might be true for all archs, right?
>
> I wonder if powerpc is OK on this front today. This diagram:
>
> http://linux-mm.org/PageTableStructure
>
> says that they use a 128-byte "pte" table when mapping 16M pages. I
> wonder if they bump mm->nr_ptes for these.
It looks like this doesn't matter. The statistics here prints the size
of summary memory occupied for pte_t entries, here PTRS_PER_PTE * sizeof(pte_t)
is only valid for, once we start accounting pmd into same counter it implies
that PTRS_PER_PTE == PTRS_PER_PMD, which is not true for all archs
(if I understand the idea of accounting here right).
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
WARNING: multiple messages have this Message-ID (diff)
From: Cyrill Gorcunov <gorcunov@gmail.com>
To: Dave Hansen <dave.hansen@linux.intel.com>
Cc: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>,
Andrew Morton <akpm@linux-foundation.org>,
Hugh Dickins <hughd@google.com>,
linux-mm@kvack.org, Pavel Emelyanov <xemul@openvz.org>,
linux-kernel@vger.kernel.org,
Benjamin Herrenschmidt <benh@kernel.crashing.org>
Subject: Re: [PATCH 1/2] mm: rename mm->nr_ptes to mm->nr_pgtables
Date: Wed, 14 Jan 2015 12:45:38 +0300 [thread overview]
Message-ID: <20150114094538.GD2253@moon> (raw)
In-Reply-To: <54B592D6.4090406@linux.intel.com>
On Tue, Jan 13, 2015 at 01:49:10PM -0800, Dave Hansen wrote:
> On 01/13/2015 01:43 PM, Cyrill Gorcunov wrote:
> > On Tue, Jan 13, 2015 at 09:14:15PM +0200, Kirill A. Shutemov wrote:
> >> We're going to account pmd page tables too. Let's rename mm->nr_pgtables
> >> to something more generic.
> >>
> >> Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
> >> --- a/fs/proc/task_mmu.c
> >> +++ b/fs/proc/task_mmu.c
> >> @@ -64,7 +64,7 @@ void task_mem(struct seq_file *m, struct mm_struct *mm)
> >> data << (PAGE_SHIFT-10),
> >> mm->stack_vm << (PAGE_SHIFT-10), text, lib,
> >> (PTRS_PER_PTE * sizeof(pte_t) *
> >> - atomic_long_read(&mm->nr_ptes)) >> 10,
> >> + atomic_long_read(&mm->nr_pgtables)) >> 10,
> >
> > This implies that (PTRS_PER_PTE * sizeof(pte_t)) = (PTRS_PER_PMD * sizeof(pmd_t))
> > which might be true for all archs, right?
>
> I wonder if powerpc is OK on this front today. This diagram:
>
> http://linux-mm.org/PageTableStructure
>
> says that they use a 128-byte "pte" table when mapping 16M pages. I
> wonder if they bump mm->nr_ptes for these.
It looks like this doesn't matter. The statistics here prints the size
of summary memory occupied for pte_t entries, here PTRS_PER_PTE * sizeof(pte_t)
is only valid for, once we start accounting pmd into same counter it implies
that PTRS_PER_PTE == PTRS_PER_PMD, which is not true for all archs
(if I understand the idea of accounting here right).
next prev parent reply other threads:[~2015-01-14 9:45 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-13 19:14 [PATCH 0/2] Account PMD page tables to the process Kirill A. Shutemov
2015-01-13 19:14 ` Kirill A. Shutemov
2015-01-13 19:14 ` [PATCH 1/2] mm: rename mm->nr_ptes to mm->nr_pgtables Kirill A. Shutemov
2015-01-13 19:14 ` Kirill A. Shutemov
2015-01-13 20:36 ` Dave Hansen
2015-01-13 20:36 ` Dave Hansen
2015-01-13 20:41 ` Kirill A. Shutemov
2015-01-13 20:41 ` Kirill A. Shutemov
2015-01-13 21:35 ` Dave Hansen
2015-01-13 21:35 ` Dave Hansen
2015-01-13 21:43 ` Cyrill Gorcunov
2015-01-13 21:43 ` Cyrill Gorcunov
2015-01-13 21:49 ` Dave Hansen
2015-01-13 21:49 ` Dave Hansen
2015-01-14 9:45 ` Cyrill Gorcunov [this message]
2015-01-14 9:45 ` Cyrill Gorcunov
2015-01-14 14:33 ` Kirill A. Shutemov
2015-01-14 14:33 ` Kirill A. Shutemov
2015-01-14 14:48 ` Cyrill Gorcunov
2015-01-14 14:48 ` Cyrill Gorcunov
2015-01-13 19:14 ` [PATCH 2/2] mm: account pmd page tables to the process Kirill A. Shutemov
2015-01-13 19:14 ` Kirill A. Shutemov
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=20150114094538.GD2253@moon \
--to=gorcunov@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=benh@kernel.crashing.org \
--cc=dave.hansen@linux.intel.com \
--cc=hughd@google.com \
--cc=kirill.shutemov@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=xemul@openvz.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.