Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1355535

Re: [PATCH 03/11] x86/mm/hotplug: Don't remove PGD entries in remove_pagetable()

From Andy Lutomirski <luto@amacapital.net>
Newsgroups linux.kernel
Subject Re: [PATCH 03/11] x86/mm/hotplug: Don't remove PGD entries in remove_pagetable()
Date 2016-03-11 03:00 +0100
Message-ID <rbkwW-7et-15@gated-at.bofh.it> (permalink)
References <qbpfr-5Ff-1@gated-at.bofh.it> <qbpfs-5Ff-27@gated-at.bofh.it> <r1rgl-2Ho-9@gated-at.bofh.it> <rb2A2-36O-11@gated-at.bofh.it> <rb5xU-53y-7@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Thu, Mar 10, 2016 at 1:56 AM, Ingo Molnar <mingo@kernel.org> wrote:
>
> * Andy Lutomirski <luto@amacapital.net> wrote:
>
>> On Fri, Feb 12, 2016 at 11:04 AM, Andy Lutomirski <luto@amacapital.net> wrote:
>> > On Mon, Sep 21, 2015 at 11:23 PM, Ingo Molnar <mingo@kernel.org> wrote:
>> >> So when memory hotplug removes a piece of physical memory from pagetable
>> >> mappings, it also frees the underlying PGD entry.
>> >>
>> >> This complicates PGD management, so don't do this. We can keep the
>> >> PGD mapped and the PUD table all clear - it's only a single 4K page
>> >> per 512 GB of memory hotplugged.
>> >
>> > Ressurecting an ancient thread: I want this particular change to make
>> > it (much) easier to make vmapped stacks work correctly.  Could it be
>> > applied by itself?
>> >
>>
>> It's incomplete.  pageattr.c has another instance of the same thing.
>> I'll see if I can make it work, but I may end up doing something a
>> little different.
>
> If so then mind picking up (and fixing ;-) tip:WIP.x86/mm in its entirety? It's
> well tested so shouldn't have too many easy to hit bugs. Feel free to rebase and
> restructure it, it's a WIP tree.

I'll chew on this one patch a bit and see where the whole things go.
If I can rebase the rest on top, I'll use them.

BTW, how are current kernels possibly correct when this code runs?  We
zap a pgd from the init pgd.  I can't find any code that would try to
propagate that zapped pgd to other pgds.  Then, if we hotplug in some
more memory or claim the slot for vmap, we'll install a new pgd entry,
and we might access *that* through a different pgd.  There vmalloc
fault fixup won't help because the MMU will chase a stale pointer in
the old pgd.

So we might actually need this patch sooner rather than later.

>
> I keep getting distracted with other things but I'd hate if this got dropped on
> the floor.
>
> Thanks,
>
>         Ingo



-- 
Andy Lutomirski
AMA Capital Management, LLC

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

Re: [PATCH 03/11] x86/mm/hotplug: Don't remove PGD entries in remove_pagetable() Andy Lutomirski <luto@amacapital.net> - 2016-03-10 07:50 +0100
  Re: [PATCH 03/11] x86/mm/hotplug: Don't remove PGD entries in  remove_pagetable() Ingo Molnar <mingo@kernel.org> - 2016-03-10 11:00 +0100
    Re: [PATCH 03/11] x86/mm/hotplug: Don't remove PGD entries in remove_pagetable() Andy Lutomirski <luto@amacapital.net> - 2016-03-11 03:00 +0100

csiph-web