linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: David Hildenbrand <david@redhat.com>
To: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>,
	Bijan Tabatabai <bijan311@gmail.com>
Cc: linux-fsdevel@vger.kernel.org, linux-mm@kvack.org,
	btabatabai@wisc.edu, akpm@linux-foundation.org,
	viro@zeniv.linux.org.uk, brauner@kernel.org, mingo@redhat.com,
	Liam Howlett <liam.howlett@oracle.com>,
	Vlastimil Babka <vbabka@suse.cz>, Jann Horn <jannh@google.com>
Subject: Re: [RFC PATCH 0/4] Add support for File Based Memory Management
Date: Thu, 28 Nov 2024 11:22:59 +0100	[thread overview]
Message-ID: <b517e896-7c04-4f9d-b529-bf9063e69eb4@redhat.com> (raw)
In-Reply-To: <b33f00ed-9c63-48b3-943d-50f517644486@lucifer.local>

On 23.11.24 13:23, Lorenzo Stoakes wrote:
> + VMA guys, it's important to run scripts/get_maintainers.pl on your
> changes so the right people are pinged :)
> 
> On Fri, Nov 22, 2024 at 02:38:26PM -0600, Bijan Tabatabai wrote:
>> This patch set implements file based memory management (FBMM) [1], a
>> research project from the University of Wisconsin-Madison where a process's
>> memory can be transparently managed by memory managers which are written as
>> filesystems. When using FBMM, instead of using the traditional anonymous
>> memory path, a process's memory is managed by mapping files from a memory
>> management filesystem (MFS) into its address space. The MFS implements the
>> memory management related callback functions provided by the VFS to
>> implement the desired memory management functionality. After presenting
>> this work at a conference, a handful of people asked if we were going to
>> upstream the work, so we decided to see if the Linux community would be
>> interested in this functionality as well.
>>
> 
> While it's a cool project, I don't think it's upstreamable in its current
> form - it essentially bypasses core mm functionality and 'does mm'
> somewhere else (which strikes me, in effect, as the entire purpose of the
> series).
> 
> mm is a subsystem that is in constant flux with many assumptions that one
> might make about it being changed, which make it wholly unsuited to having
> its functionality exported like this.
> 
> So in in effect it, by its nature, has to export internals somewhere else,
> and that somewhere else now assumes things about mm that might change at
> any point, additionally bypassing a great deal of highly sensitive and
> purposeful logic.
> 
> This series also adds a lot of if (fbmm) { ... } changes to core logic
> which is really not how we want to do things. hugetlbfs does this kind of
> thing, but it is more or less universally seen as a _bad thing_ and
> something we are trying to refactor.
> 
> So any upstreamable form of this would need to a. be part of mm, b. use
> existing extensible mechanisms or create them, and c. not have _core_ mm
> tasks or activities be performed 'elsewhere'.
> 
> Sadly I think the latter part may make a refactoring in this direction
> infeasible, as it seems to me this is sort of the point of this.
> 
> This also means it's not acceptable to export highly sensitive mm internals
> as you do in patch 3/4. Certainly in 1/4, as a co-maintainer of the mmap
> logic, I can't accept the changes you suggest to brk() and mmap(), sorry.
> 
> There are huge subtleties in much of mm, including very very sensitive lock
> mechanisms, and keeping such things within mm means we can have confidence
> they work, and that fixes resolve issues.
> 
> I hope this isn't too discouraging, the fact you got this functioning is
> amazing and as an out-of-tree research and experimentation project it looks
> really cool, but for me, I don't think this is for upstream.

I agreed with this sentiment. It looks like something a research OS 
might want to consider as it's way of dealing with anonymous memory in 
general, but nothing on squeezes into an existing MM implementation.

I'm also not 100% sure on statements like "Providing this transparency" 
-- what about fork() and COW? What about memory statistics? 
"Transparency" is a strong word :)

-- 
Cheers,

David / dhildenb



      parent reply	other threads:[~2024-11-28 10:23 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-22 20:38 Bijan Tabatabai
2024-11-22 20:38 ` [RFC PATCH 1/4] mm: " Bijan Tabatabai
2024-11-22 20:38 ` [RFC PATCH 2/4] fbmm: Add helper functions for FBMM MM Filesystems Bijan Tabatabai
2024-11-22 20:38 ` [RFC PATCH 3/4] mm: Export functions for writing " Bijan Tabatabai
2024-11-22 20:38 ` [RFC PATCH 4/4] Add base implementation of an MFS Bijan Tabatabai
2024-12-02 15:56   ` Jeff Johnson
2024-11-23 12:23 ` [RFC PATCH 0/4] Add support for File Based Memory Management Lorenzo Stoakes
2024-11-24 16:53   ` Bijan Tabatabai
2024-11-28 10:22   ` David Hildenbrand [this message]

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=b517e896-7c04-4f9d-b529-bf9063e69eb4@redhat.com \
    --to=david@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=bijan311@gmail.com \
    --cc=brauner@kernel.org \
    --cc=btabatabai@wisc.edu \
    --cc=jannh@google.com \
    --cc=liam.howlett@oracle.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=lorenzo.stoakes@oracle.com \
    --cc=mingo@redhat.com \
    --cc=vbabka@suse.cz \
    --cc=viro@zeniv.linux.org.uk \
    /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