NVDIMM Device and Persistent Memory development
 help / color / mirror / Atom feed
From: "Edgecombe, Rick P" <rick.p.edgecombe@intel.com>
To: "hch@infradead.org" <hch@infradead.org>
Cc: "x86@kernel.org" <x86@kernel.org>,
	"keescook@chromium.org" <keescook@chromium.org>,
	"linux-sgx@vger.kernel.org" <linux-sgx@vger.kernel.org>,
	"luto@kernel.org" <luto@kernel.org>,
	"linux-cxl@vger.kernel.org" <linux-cxl@vger.kernel.org>,
	"dave.hansen@linux.intel.com" <dave.hansen@linux.intel.com>,
	"debug@rivosinc.com" <debug@rivosinc.com>,
	"io-uring@vger.kernel.org" <io-uring@vger.kernel.org>,
	"akpm@linux-foundation.org" <akpm@linux-foundation.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"Liam.Howlett@oracle.com" <Liam.Howlett@oracle.com>,
	"mingo@redhat.com" <mingo@redhat.com>,
	"kirill.shutemov@linux.intel.com"
	<kirill.shutemov@linux.intel.com>,
	"christophe.leroy@csgroup.eu" <christophe.leroy@csgroup.eu>,
	"linux-mm@kvack.org" <linux-mm@kvack.org>,
	"linux-s390@vger.kernel.org" <linux-s390@vger.kernel.org>,
	"tglx@linutronix.de" <tglx@linutronix.de>,
	"sparclinux@vger.kernel.org" <sparclinux@vger.kernel.org>,
	"hpa@zytor.com" <hpa@zytor.com>,
	"bpf@vger.kernel.org" <bpf@vger.kernel.org>,
	"peterz@infradead.org" <peterz@infradead.org>,
	"nvdimm@lists.linux.dev" <nvdimm@lists.linux.dev>,
	"linux-fsdevel@vger.kernel.org" <linux-fsdevel@vger.kernel.org>,
	"bp@alien8.de" <bp@alien8.de>,
	"Williams, Dan J" <dan.j.williams@intel.com>,
	"broonie@kernel.org" <broonie@kernel.org>
Subject: Re: [PATCH] mm: Remove mm argument from mm_get_unmapped_area()
Date: Tue, 7 May 2024 13:51:13 +0000	[thread overview]
Message-ID: <98f3fb04ebfcf52ffb60867cf024838d94b83907.camel@intel.com> (raw)
In-Reply-To: <ZjkC1KgTTbR4qzhC@infradead.org>

On Mon, 2024-05-06 at 09:18 -0700, Christoph Hellwig wrote:
> > On Mon, May 06, 2024 at 09:07:47AM -0700, Rick Edgecombe wrote:
> > > >         if (flags & MAP_FIXED) {
> > > >                 /* Ok, don't mess with it. */
> > > > -               return mm_get_unmapped_area(current->mm, NULL,
> > > > orig_addr, > > len, pgoff, flags);
> > > > +               return current_get_unmapped_area(NULL, orig_addr, len, >
> > > > > pgoff, flags);
> > 
> > The old name seems preferable because it's not as crazy long.  In fact
> > just get_unmapped_area would be even better, but that's already taken
> > by something else.

Ok.

> > 
> > Can we maybe take a step back and sort out the mess of the various
> > _get_unmapped_area helpers?
> > 
> > e.g. mm_get_unmapped_area_vmflags just wraps
> > arch_get_unmapped_area_topdown_vmflags and
> > arch_get_unmapped_area_vmflags, and we might as well merge all three
> > by moving the MMF_TOPDOWN into two actual implementations?
> > 
> > And then just update all the implementations to always pass the
> > vm_flags instead of having separate implementations with our without
> > the flags.
> > 
> > And then make __get_unmapped_area static in mmap.c nad move the
> > get_unmapped_area wrappers there.  And eventually write some
> > documentation for the functions based on the learnings who actually
> > uses what..

The rest of the series[0] is in the mm-tree/linux-next currently. Are you
suggesting we not do this patch, and leave the rest you describe here for the
future? I think the removal of the indirect branch is at least a positive step
forward.


[0]
https://lore.kernel.org/lkml/20240326021656.202649-1-rick.p.edgecombe@intel.com/

  reply	other threads:[~2024-05-07 13:51 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-06 16:07 [PATCH] mm: Remove mm argument from mm_get_unmapped_area() Rick Edgecombe
2024-05-06 16:18 ` Christoph Hellwig
2024-05-07 13:51   ` Edgecombe, Rick P [this message]
2024-05-06 16:32 ` Liam R. Howlett
2024-05-07 13:51   ` Edgecombe, Rick P
2024-05-07 16:06     ` Liam R. Howlett
2024-05-07 22:38 ` Jarkko Sakkinen

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=98f3fb04ebfcf52ffb60867cf024838d94b83907.camel@intel.com \
    --to=rick.p.edgecombe@intel.com \
    --cc=Liam.Howlett@oracle.com \
    --cc=akpm@linux-foundation.org \
    --cc=bp@alien8.de \
    --cc=bpf@vger.kernel.org \
    --cc=broonie@kernel.org \
    --cc=christophe.leroy@csgroup.eu \
    --cc=dan.j.williams@intel.com \
    --cc=dave.hansen@linux.intel.com \
    --cc=debug@rivosinc.com \
    --cc=hch@infradead.org \
    --cc=hpa@zytor.com \
    --cc=io-uring@vger.kernel.org \
    --cc=keescook@chromium.org \
    --cc=kirill.shutemov@linux.intel.com \
    --cc=linux-cxl@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=linux-s390@vger.kernel.org \
    --cc=linux-sgx@vger.kernel.org \
    --cc=luto@kernel.org \
    --cc=mingo@redhat.com \
    --cc=nvdimm@lists.linux.dev \
    --cc=peterz@infradead.org \
    --cc=sparclinux@vger.kernel.org \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.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 read-only IMAP folder(s) and NNTP newsgroup(s).