Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 24 Aug 2019 19:15:03 +0300
From:      Konstantin Belousov <kostikbel@gmail.com>
To:        Conrad Meyer <cem@freebsd.org>
Cc:        src-committers <src-committers@freebsd.org>, svn-src-all <svn-src-all@freebsd.org>, svn-src-head <svn-src-head@freebsd.org>
Subject:   Re: svn commit: r351456 - head/sys/amd64/amd64
Message-ID:  <20190824161503.GA71821@kib.kiev.ua>
In-Reply-To: <CAG6CVpWN56eRRUgCubK3F750zoDun8ZocLaot5w0H4Emrq9=xQ@mail.gmail.com>
References:  <201908241528.x7OFSemm026182@repo.freebsd.org> <CAG6CVpWN56eRRUgCubK3F750zoDun8ZocLaot5w0H4Emrq9=xQ@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, Aug 24, 2019 at 08:49:42AM -0700, Conrad Meyer wrote:
> Hi Konstantin,
> 
> What is the motivation for this change?  The commit message doesn't
> really describe why it was done.
Really it does. There is no point to request allocations for e.g.
doublefault stack to be at the local domain, because this stack is only
used once.  Doublefault is definitely a machine halt situation, it does
not matter if it generates inter-socket traffic to handle.

Same for boot stacks, and for mce.

The change avoids unnecessary constraints.

> 
> Thanks,
> Conrad
> 
> On Sat, Aug 24, 2019 at 8:28 AM Konstantin Belousov <kib@freebsd.org> wrote:
> >
> > Author: kib
> > Date: Sat Aug 24 15:28:40 2019
> > New Revision: 351456
> > URL: https://svnweb.freebsd.org/changeset/base/351456
> >
> > Log:
> >   Do not constrain allocations for doublefault, boot, and mce stacks.
> >
> >   All these stacks are used only once (doublefault, boot) or very rare
> >   (mce).
> >
> >   Reviewed by:  markj
> >   Tested by:    pho
> >   Sponsored by: The FreeBSD Foundation
> >   Differential revision:        https://reviews.freebsd.org/D21320
> >
> > Modified:
> >   head/sys/amd64/amd64/mp_machdep.c
> >
> > Modified: head/sys/amd64/amd64/mp_machdep.c
> > ==============================================================================
> > --- head/sys/amd64/amd64/mp_machdep.c   Sat Aug 24 15:25:53 2019        (r351455)
> > +++ head/sys/amd64/amd64/mp_machdep.c   Sat Aug 24 15:28:40 2019        (r351456)
> > @@ -475,13 +475,11 @@ native_start_all_aps(void)
> >                         domain = acpi_pxm_get_cpu_locality(apic_id);
> >  #endif
> >                 /* allocate and set up an idle stack data page */
> > -               bootstacks[cpu] = (void *)kmem_malloc_domainset(
> > -                   DOMAINSET_FIXED(domain), kstack_pages * PAGE_SIZE,
> > +               bootstacks[cpu] = (void *)kmem_malloc(kstack_pages * PAGE_SIZE,
> >                     M_WAITOK | M_ZERO);
> > -               doublefault_stack = (char *)kmem_malloc_domainset(
> > -                   DOMAINSET_FIXED(domain), PAGE_SIZE, M_WAITOK | M_ZERO);
> > -               mce_stack = (char *)kmem_malloc_domainset(
> > -                   DOMAINSET_FIXED(domain), PAGE_SIZE, M_WAITOK | M_ZERO);
> > +               doublefault_stack = (char *)kmem_malloc(PAGE_SIZE, M_WAITOK |
> > +                   M_ZERO);
> > +               mce_stack = (char *)kmem_malloc(PAGE_SIZE, M_WAITOK | M_ZERO);
> >                 nmi_stack = (char *)kmem_malloc_domainset(
> >                     DOMAINSET_FIXED(domain), PAGE_SIZE, M_WAITOK | M_ZERO);
> >                 dbg_stack = (char *)kmem_malloc_domainset(
> >



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20190824161503.GA71821>