lkml.org 
[lkml]   [2018]   [Jun]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 1/7] mm: allocate mm_cpumask dynamically based on nr_cpu_ids
From
Date
On Fri, 2018-06-22 at 08:10 -0700, Dave Hansen wrote:
> On 06/20/2018 12:56 PM, Rik van Riel wrote:
> > /*
> > - * FIXME! The "sizeof(struct mm_struct)" currently
> > includes the
> > - * whole struct cpumask for the OFFSTACK case. We could
> > change
> > - * this to *only* allocate as much of it as required by
> > the
> > - * maximum number of CPU's we can ever have. The
> > cpumask_allocation
> > - * is at the end of the structure, exactly for that
> > reason.
> > + * The mm_cpumask is located at the end of mm_struct, and
> > is
> > + * dynamically sized based on nr_cpu_ids.
> > */
> > + mm_size = sizeof(struct mm_struct) + cpumask_size();
> > +
> > mm_cachep = kmem_cache_create_usercopy("mm_struct",
> > - sizeof(struct mm_struct),
> > ARCH_MIN_MMSTRUCT_ALIGN,
> > + mm_size, ARCH_MIN_MMSTRUCT_ALIGN,
>
> Could you add a bit to that comment, like "dynamically sized based on
> nr_cpu_ids" ... which is sized based on the number of possible CPUs.
>
> I found myself wondering how that interacts with hotplug.

Improved in my tree for v2. Thank you.

--
All Rights Reversed.[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2018-06-22 19:46    [W:0.082 / U:0.224 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site