All of lore.kernel.org
 help / color / mirror / Atom feed
From: Joerg Roedel <jroedel@suse.de>
To: Dave Hansen <dave.hansen@intel.com>
Cc: Joerg Roedel <joro@8bytes.org>,
	Dave Hansen <dave.hansen@linux.intel.com>,
	Andy Lutomirski <luto@kernel.org>,
	Peter Zijlstra <peterz@infradead.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>,
	hpa@zytor.com, x86@kernel.org, rjw@rjwysocki.net,
	lenb@kernel.org, james.morse@arm.com, tony.luck@intel.com,
	linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org,
	linux-mm@kvack.org
Subject: Re: [PATCH] x86/mm: Split vmalloc_sync_all()
Date: Mon, 7 Oct 2019 17:48:52 +0200	[thread overview]
Message-ID: <20191007154852.GE4636@suse.de> (raw)
In-Reply-To: <02e99987-10d2-203f-e6ba-e2568fa1af28@intel.com>

Hi Dave,

thanks for your review!

On Mon, Oct 07, 2019 at 08:30:51AM -0700, Dave Hansen wrote:
> On 10/7/19 8:16 AM, Joerg Roedel wrote:
> > @@ -318,7 +328,7 @@ static void dump_pagetable(unsigned long address)
> >  
> >  #else /* CONFIG_X86_64: */
> >  
> > -void vmalloc_sync_all(void)
> > +void vmalloc_sync_mappings(void)
> >  {
> >  	sync_global_pgds(VMALLOC_START & PGDIR_MASK, VMALLOC_END);
> >  }
> 
> FWIW, I generally detest the use of __weak. :)

Yeah, I don't like it either, but in this case it is probably better
than empty stubs in all architectures besides x86 :)

> In this case, it ends up letting us gloss over the fact that we have a
> 32/64-bit asymmetry.  It would probably be nice to actually have a
> 64-bit implementation that comes along with a nice comment.  Maybe this
> in vmalloc_sync_mappings():
> 
> 	/*
> 	 * 64-bit mappings might allocate new p4d/pud pages
> 	 * that need to be propagated to all tasks' PGDs.
> 	 */
> 
> which would pair nicely with:
> 
> void vmalloc_sync_unmappings(void)
> {
> 	/*
> 	 * Unmappings never allocate or free p4d/pud pages.
> 	 * No work is required here.
> 	 */
> }

Yes, that makes, I will add these comments in V2.

Thanks,

	Joerg

      reply	other threads:[~2019-10-07 15:48 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-07 15:16 [PATCH] x86/mm: Split vmalloc_sync_all() Joerg Roedel
2019-10-07 15:30 ` Dave Hansen
2019-10-07 15:48   ` Joerg Roedel [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=20191007154852.GE4636@suse.de \
    --to=jroedel@suse.de \
    --cc=bp@alien8.de \
    --cc=dave.hansen@intel.com \
    --cc=dave.hansen@linux.intel.com \
    --cc=hpa@zytor.com \
    --cc=james.morse@arm.com \
    --cc=joro@8bytes.org \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=luto@kernel.org \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=rjw@rjwysocki.net \
    --cc=tglx@linutronix.de \
    --cc=tony.luck@intel.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.