lkml.org 
[lkml]   [2019]   [Oct]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH] mm: vmalloc: Use the vmap_area_lock to protect ne_fit_preload_node
Hello, Daniel.

On Wed, Oct 09, 2019 at 08:05:39AM +0200, Daniel Wagner wrote:
> On Tue, Oct 08, 2019 at 06:04:59PM +0200, Uladzislau Rezki wrote:
> > > so, we do not guarantee, instead we minimize number of allocations
> > > with GFP_NOWAIT flag. For example on my 4xCPUs i am not able to
> > > even trigger the case when CPU is not preloaded.
> > >
> > > I can test it tomorrow on my 12xCPUs to see its behavior there.
> > >
> > Tested it on different systems. For example on my 8xCPUs system that
> > runs PREEMPT kernel i see only few GFP_NOWAIT allocations, i.e. it
> > happens when we land to another CPU that was not preloaded.
> >
> > I run the special test case that follows the preload pattern and path.
> > So 20 "unbind" threads run it and each does 1000000 allocations. As a
> > result only 3.5 times among 1000000, during splitting, CPU was not
> > preloaded thus, GFP_NOWAIT was used to obtain an extra object.
> >
> > It is obvious that slightly modified approach still minimizes allocations
> > in atomic context, so it can happen but the number is negligible and can
> > be ignored, i think.
>
> Thanks for doing the tests. In this case I would suggest to get rid of
> the preempt_disable() micro optimization, since there is almost no
> gain in doing so. Do you send a patch? :)
>
I can do it, for sure, in case you do not mind, since it was your
initiative. Otherwise you can upload v2.

--
Vlad Rezki

\
 
 \ /
  Last update: 2019-10-09 11:48    [W:0.038 / U:4.440 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site