linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Kirill A. Shutemov" <kirill@shutemov.name>
To: Christopher Lameter <cl@linux.com>
Cc: Dave Chinner <david@fromorbit.com>,
	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: Tue, 15 Aug 2017 00:09:59 +0300	[thread overview]
Message-ID: <20170814210959.r4mdv3y4rdeolyxt@node.shutemov.name> (raw)
In-Reply-To: <alpine.DEB.2.20.1708141307380.32429@nuc-kabylake>

On Mon, Aug 14, 2017 at 01:14:57PM -0500, Christopher Lameter wrote:
> 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.

Nice wish list. Add pony. :)

Any attempt to replace struct page with something more complex will have
severe performance implications. I'll be glad proved otherwise.

-- 
 Kirill A. Shutemov

--
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 21:09 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-10  4:28 How can we share page cache pages for reflinked files? 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
2017-08-14 21:09           ` Kirill A. Shutemov [this message]
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=20170814210959.r4mdv3y4rdeolyxt@node.shutemov.name \
    --to=kirill@shutemov.name \
    --cc=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;
as well as URLs for NNTP newsgroup(s).