lkml.org 
[lkml]   [2018]   [Jul]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/7] mm: allocate mm_cpumask dynamically based on nr_cpu_ids

* Rik van Riel <riel@surriel.com> wrote:

> On Mon, 2018-07-16 at 00:59 +0200, Ingo Molnar wrote:
> > * Rik van Riel <riel@surriel.com> wrote:
> >
> > > The mm_struct always contains a cpumask bitmap, regardless of
> > > CONFIG_CPUMASK_OFFSTACK. That means the first step can be to
> > > simplify things, and simply have one bitmask at the end of the
> > > mm_struct for the mm_cpumask.
> > >
> > > This does necessitate moving everything else in mm_struct into
> > > an anonymous sub-structure, which can be randomized when struct
> > > randomization is enabled.
> > >
> > > The second step is to determine the correct size for the
> > > mm_struct slab object from the size of the mm_struct
> > > (excluding the cpu bitmap) and the size the cpumask.
> > >
> > > For init_mm we can simply allocate the maximum size this
> > > kernel is compiled for, since we only have one init_mm
> > > in the system, anyway.
> > >
> > > Pointer magic by Mike Galbraith, to evade -Wstringop-overflow
> > > getting confused by the dynamically sized array.
> > >
> > > Signed-off-by: Rik van Riel <riel@surriel.com>
> > > Signed-off-by: Mike Galbraith <efault@gmx.de>
> >
> > Is this an Acked-by in disguise, or did this patch route via Mike?
>
> Mike found an issue with the patch and sent a
> fix, so I added his S-o-b to this patch as
> well.

Makes sense - I'd suggest such a SoB chain:

Signed-off-by: Rik van Riel <riel@surriel.com>
[ Fixed crash. ]
Signed-off-by: Mike Galbraith <efault@gmx.de>
Signed-off-by: Rik van Riel <riel@surriel.com>

... it's a bit non-standard but we've used it in similar cases and it makes the
routing and evolution of the patch pretty clear.

Thanks,

Ingo

\
 
 \ /
  Last update: 2018-07-16 03:08    [W:0.068 / U:3.460 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site