linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Matthew Wilcox <willy@infradead.org>
To: linux-fsdevel@vger.kernel.org, linux-mm@kvack.org
Subject: [LSF/MM TOPIC] Eliminating tail pages
Date: Mon, 11 Feb 2019 11:09:08 -0800	[thread overview]
Message-ID: <20190211190908.GA21683@bombadil.infradead.org> (raw)


I can't follow simple instructions.

----- Forwarded message from Matthew Wilcox <willy@infradead.org> -----

Date: Mon, 11 Feb 2019 11:07:28 -0800
From: Matthew Wilcox <willy@infradead.org>
To: lsf-pc@lists.linux-foundation.org
Subject: [LSF/MM TOPIC] Eliminating tail pages
User-Agent: Mutt/1.9.2 (2017-12-15)


Tail pages are a pain.  All over the kernel, we call compound_head()
(or occasionally forget to ...).  So what would it take to eliminate them?

I'm doing my best to eliminate them from being stored in the page cache.
That's a nice first step, but the very first thing that functions like
find_get_entry(), find_get_entries(), et al do is convert any large
page they find to a tail page.  So we'll probably need to introduce new
functions which will return head pages and convert users over to them.
I know Kirill has a lot more experience with this.

Another place where we return tail pages is get_user_pages().  Callers of
get_user_pages() expect tail or small pages; they do things like calculate
the offset of the byte within the page by AND with PAGE_MASK.  There'll be
a lot of work to check all the users and convert them to something like

unsigned int page_offset(struct page *page, unsigned long addr);

Another thing to consider is that some architectures have a third-level
page size of 16GB (looking at you, POWER).  So an unsigned int isn't
going to cut it.  Do we want to support pages that large, or do we declare
that there will never be any point in supporting pages larger than 4GB?

There are probably other pitfalls I'm forgetting or have never known.
Something like this will be essential for the glorious future that
Christoph Lameter keeps talking about where we divide the memory up into
parts which are only accessible as 2MB pages and parts which support
legacy 4kB usages.

Useful participants:
Kirill Shutemov
Christoph Lameter
Hugh Dickins

probably also relevant to the DAX crew.

----- End forwarded message -----

             reply	other threads:[~2019-02-11 19:09 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-11 19:09 Matthew Wilcox [this message]
2019-02-12  8:55 ` [LSF/MM TOPIC] Eliminating tail pages 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=20190211190908.GA21683@bombadil.infradead.org \
    --to=willy@infradead.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-mm@kvack.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 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).