lkml.org 
[lkml]   [2016]   [Feb]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [RFC PATCH 3/3] mm: increase scalability of global memory commitment accounting
From
Date
On Thu, 2016-02-11 at 12:51 -0800, Andrew Morton wrote:
> On Wed, 10 Feb 2016 16:24:16 -0800 Tim Chen <tim.c.chen@linux.intel.com> wrote:
>
> > On Wed, 2016-02-10 at 13:28 -0800, Andrew Morton wrote:
> >
> > >
> > > If a process is unmapping 4MB then it's pretty crazy for us to be
> > > hitting the percpu_counter 32 separate times for that single operation.
> > >
> > > Is there some way in which we can batch up the modifications within the
> > > caller and update the counter less frequently? Perhaps even in a
> > > single hit?
> >
> > I think the problem is the batch size is too small and we overflow
> > the local counter into the global counter for 4M allocations.
>
> That's one way of looking at the issue. The other way (which I point
> out above) is that we're calling vm_[un]_acct_memory too frequently
> when mapping/unmapping 4M segments.
>
> Exactly which mmap.c callsite is causing this issue?

I suspect it is __vm_enough_memory called from do_brk or mmap_region in
Andrey's test case.

Tim

\
 
 \ /
  Last update: 2016-02-11 22:41    [W:0.087 / U:1.152 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site