linux-api.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Matthew Wilcox <willy@infradead.org>
To: linux-mm@kvack.org
Cc: Matthew Wilcox <mawilcox@microsoft.com>,
	Martin Schwidefsky <schwidefsky@de.ibm.com>,
	linux-kernel@vger.kernel.org,
	Fengguang Wu <fengguang.wu@intel.com>,
	linux-api@vger.kernel.org
Subject: [PATCH v4 0/4] Record additional page allocation reasons
Date: Thu,  1 Mar 2018 13:15:19 -0800	[thread overview]
Message-ID: <20180301211523.21104-1-willy@infradead.org> (raw)

From: Matthew Wilcox <mawilcox@microsoft.com>

Rework how the _map_count field in struct page is used to record why
the page was allocated.  We now have about twenty bits available, and
I've taken two of them to mark pages allocated for page tables and
through vmalloc.  They are reported by the page-types tool as g and
V respectively.

Changes since v3:
 - Ack from Martin on s390 changes
 - Fix up some comments
 - Removed check for PageType from fs/proc/page.c; page_mapped() handles
   this just fine.
 - Added KPF_VMALLOC and KPF_PGTABLE (hence cc'ing linux-api)
 - Set KPF_VMALLOC and KPF_PGTABLE in fs/proc/page.c
 - Interpret KPF_VMALLOC and KPF_PGTABLE in tools/vm/page-flags.c
 - Set PageTable on tile's extra pages

Matthew Wilcox (4):
  s390: Use _refcount for pgtables
  mm: Split page_type out from _map_count
  mm: Mark pages allocated through vmalloc
  mm: Mark pages in use for page tables

 arch/s390/mm/pgalloc.c                 | 21 +++++++------
 arch/tile/mm/pgtable.c                 |  3 ++
 fs/proc/page.c                         |  4 +++
 include/linux/mm.h                     |  2 ++
 include/linux/mm_types.h               | 13 +++++---
 include/linux/page-flags.h             | 57 ++++++++++++++++++++++------------
 include/uapi/linux/kernel-page-flags.h |  3 +-
 kernel/crash_core.c                    |  1 +
 mm/page_alloc.c                        | 13 +++-----
 mm/vmalloc.c                           |  2 ++
 scripts/tags.sh                        |  6 ++--
 tools/vm/page-types.c                  |  2 ++
 12 files changed, 82 insertions(+), 45 deletions(-)

-- 
2.16.1

             reply	other threads:[~2018-03-01 21:15 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-01 21:15 Matthew Wilcox [this message]
2018-03-01 21:15 ` [PATCH v4 1/4] s390: Use _refcount for pgtables Matthew Wilcox
2018-03-01 21:15 ` [PATCH v4 2/4] mm: Split page_type out from _map_count Matthew Wilcox
2018-03-02  8:18   ` Kirill A. Shutemov
2018-03-01 21:15 ` [PATCH v4 3/4] mm: Mark pages allocated through vmalloc Matthew Wilcox
2018-03-02  8:20   ` Kirill A. Shutemov
2018-03-01 21:15 ` [PATCH v4 4/4] mm: Mark pages in use for page tables Matthew Wilcox
2018-03-02  8:21   ` 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=20180301211523.21104-1-willy@infradead.org \
    --to=willy@infradead.org \
    --cc=fengguang.wu@intel.com \
    --cc=linux-api@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mawilcox@microsoft.com \
    --cc=schwidefsky@de.ibm.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).