Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1738962

Re: [PATCHv2] mm: Account pud page tables

From Michal Hocko <mhocko@kernel.org>
Newsgroups linux.kernel
Subject Re: [PATCHv2] mm: Account pud page tables
Date 2017-09-25 14:00 +0200
Message-ID <utAdk-5RX-17@gated-at.bofh.it> (permalink)
References <utwjn-3iD-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Mon 25-09-17 10:39:13, Kirill A. Shutemov wrote:
> On machine with 5-level paging support a process can allocate
> significant amount of memory and stay unnoticed by oom-killer and
> memory cgroup. The trick is to allocate a lot of PUD page tables.
> We don't account PUD page tables, only PMD and PTE.
> 
> We already addressed the same issue for PMD page tables, see
> dc6c9a35b66b ("mm: account pmd page tables to the process").
> Introduction 5-level paging bring the same issue for PUD page tables.
> 
> The patch expands accounting to PUD level.

OK, we definitely need this or something like that but I really do not
like how much code we actually need for each pte level for accounting.
Do we really need to distinguish each level? Do we have any arch that
would use a different number of pages to back pte/pmd/pud?

> Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
> Cc: Michal Hocko <mhocko@suse.com>
> Cc: Vlastimil Babka <vbabka@suse.cz>
> ---
>  Documentation/sysctl/vm.txt   |  8 ++++----
>  arch/powerpc/mm/hugetlbpage.c |  1 +
>  arch/sparc/mm/hugetlbpage.c   |  1 +
>  fs/proc/task_mmu.c            |  5 ++++-
>  include/linux/mm.h            | 34 ++++++++++++++++++++++++++++++++--
>  include/linux/mm_types.h      |  3 +++
>  kernel/fork.c                 |  4 ++++
>  mm/debug.c                    |  6 ++++--
>  mm/memory.c                   | 15 +++++++++------
>  mm/oom_kill.c                 |  8 +++++---
>  10 files changed, 67 insertions(+), 18 deletions(-)
-- 
Michal Hocko
SUSE Labs

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCHv2] mm: Account pud page tables "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com> - 2017-09-25 09:50 +0200
  Re: [PATCHv2] mm: Account pud page tables Michal Hocko <mhocko@kernel.org> - 2017-09-25 14:00 +0200
    Re: [PATCHv2] mm: Account pud page tables "Kirill A. Shutemov" <kirill@shutemov.name> - 2017-09-25 15:10 +0200
      Re: [PATCHv2] mm: Account pud page tables Michal Hocko <mhocko@kernel.org> - 2017-09-25 16:00 +0200
        Re: [PATCHv2] mm: Account pud page tables "Kirill A. Shutemov" <kirill@shutemov.name> - 2017-09-26 11:50 +0200
          Re: [PATCHv2] mm: Account pud page tables Michal Hocko <mhocko@kernel.org> - 2017-09-26 12:20 +0200
  Re: [PATCHv2] mm: Account pud page tables Michal Hocko <mhocko@kernel.org> - 2017-09-26 12:20 +0200

csiph-web