lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Fri, 12 Feb 2016 15:24:18 +0300
From:	Andrey Ryabinin <aryabinin@...tuozzo.com>
To:	Andrew Morton <akpm@...ux-foundation.org>,
	Tim Chen <tim.c.chen@...ux.intel.com>
CC:	<linux-mm@...ck.org>, <linux-kernel@...r.kernel.org>,
	Andi Kleen <ak@...ux.intel.com>,
	Mel Gorman <mgorman@...hsingularity.net>,
	Vladimir Davydov <vdavydov@...tuozzo.com>,
	Konstantin Khlebnikov <koct9i@...il.com>
Subject: Re: [RFC PATCH 3/3] mm: increase scalability of global memory
 commitment accounting

On 02/11/2016 11:51 PM, Andrew Morton wrote:
> On Wed, 10 Feb 2016 16:24:16 -0800 Tim Chen <tim.c.chen@...ux.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.
> 

We call it only once per mmap() or munmap(), so there is nothing to improve.

> Exactly which mmap.c callsite is causing this issue?
> 


mmap_region() (or do_brk()) ->
	security_vm_enough_memory() ->
		__vm_enough_memory() ->
			vm_acct_memory()

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ