linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Christopher Lameter <cl@linux.com>
To: Dave Chinner <david@fromorbit.com>
Cc: Matthew Wilcox <willy@infradead.org>,
	linux-fsdevel@vger.kernel.org, linux-mm@kvack.org
Subject: Re: How can we share page cache pages for reflinked files?
Date: Mon, 14 Aug 2017 13:14:57 -0500 (CDT)	[thread overview]
Message-ID: <alpine.DEB.2.20.1708141307380.32429@nuc-kabylake> (raw)
In-Reply-To: <20170814064838.GB21024@dastard>

On Mon, 14 Aug 2017, Dave Chinner wrote:

> > Use XFS+reflink+DAX on top of this loop device.  Now there's only one
> > copy of each page in RAM.
>
> Yes, I can see how that could work. Crazy, out of the box, abuses
> DAX for non-DAX purposes and uses stuff we haven't enabled yet
> because nobody has done the work to validate it. Full points for
> creativity! :)

Another not so crazy solution is to break the 1-1 relation between page
structs and pages. We already have issues with huge pages where one struct
page may represent 2m of memmory using 512 or so page struct.

Therer are also constantly attempts to expand struct page.

So how about an m->n relationship? Any page (may it be 4k, 2m or 1G) has
one page struct for each mapping that it is a member of?

Maybe a the page state could consist of a base struct that describes
the page state and then 1..n  pieces of mapping information? In the future
other state info could be added to the end if we allow dynamic sizing of
page structs.

This would also allow the inevitable creeping page struct bloat to get
completely out of control.


--
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>

  reply	other threads:[~2017-08-14 18:15 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-10  4:28 Dave Chinner
2017-08-10  5:57 ` Kirill A. Shutemov
2017-08-10  9:01   ` Dave Chinner
2017-08-10 13:31     ` Kirill A. Shutemov
2017-08-11  3:59       ` Dave Chinner
2017-08-11 12:57         ` Kirill A. Shutemov
2017-08-10 16:11 ` Matthew Wilcox
2017-08-10 19:17   ` Vivek Goyal
2017-08-10 21:20     ` Matthew Wilcox
2017-08-11  4:25   ` Dave Chinner
2017-08-11 17:08     ` Matthew Wilcox
2017-08-11 18:04       ` Christoph Hellwig
2017-08-14  6:48       ` Dave Chinner
2017-08-14 18:14         ` Christopher Lameter [this message]
2017-08-14 21:09           ` Kirill A. Shutemov
2017-08-15 15:11             ` Christopher Lameter

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=alpine.DEB.2.20.1708141307380.32429@nuc-kabylake \
    --to=cl@linux.com \
    --cc=david@fromorbit.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=willy@infradead.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