Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1515819

Re: [RFC][PATCH] mm: merge as soon as possible when pcp alloc/free

From Xishi Qiu <qiuxishi@huawei.com>
Newsgroups linux.kernel
Subject Re: [RFC][PATCH] mm: merge as soon as possible when pcp alloc/free
Date 2016-11-07 02:50 +0100
Message-ID <sAHeq-4Id-5@gated-at.bofh.it> (permalink)
References <sA4d3-5pK-11@gated-at.bofh.it> <sA8qm-7TT-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On 2016/11/5 20:29, Anshuman Khandual wrote:

> On 11/05/2016 01:27 PM, Xishi Qiu wrote:
>> Usually the memory of android phones is very small, so after a long
>> running, the fragment is very large. Kernel stack which called by
>> alloc_thread_stack_node() usually alloc 16K memory, and it failed
>> frequently.
>>
>> However we have CONFIG_VMAP_STACK now, but it do not support arm64,
>> and maybe it has some regression because of vmalloc, it need to
>> find an area and create page table dynamically, this will take a short
>> time.
>>
>> I think we can merge as soon as possible when pcp alloc/free to reduce
>> fragment. The pcp page is hot page, so free it will cause cache miss,
>> I use perf to test it, but it seems the regression is not so much, maybe
>> it need to test more. Any reply is welcome.
> 
> The idea of PCP is to have a fast allocation mechanism which does not depend
> on an interrupt safe spin lock for every allocation. I am not very familiar
> with this part of code but the following documentation from Mel Gorman kind
> of explains that the this type of fragmentation problem which you might be
> observing as one of the limitations of PCP mechanism.
> 
> https://www.kernel.org/doc/gorman/html/understand/understand009.html
> "Per CPU page list" sub header.
> 

"The last potential problem is that buddies of newly freed pages could exist
in other pagesets leading to possible fragmentation problems."
So we should not change it, and this is a known issue, right?

Thanks,
Xishi Qiu

> 
> .
> 

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[RFC][PATCH] mm: merge as soon as possible when pcp alloc/free Xishi Qiu <qiuxishi@huawei.com> - 2016-11-05 09:10 +0100
  Re: [RFC][PATCH] mm: merge as soon as possible when pcp alloc/free Anshuman Khandual <khandual@linux.vnet.ibm.com> - 2016-11-05 13:40 +0100
    Re: [RFC][PATCH] mm: merge as soon as possible when pcp alloc/free Xishi Qiu <qiuxishi@huawei.com> - 2016-11-07 02:50 +0100
      Re: [RFC][PATCH] mm: merge as soon as possible when pcp alloc/free Anshuman Khandual <khandual@linux.vnet.ibm.com> - 2016-11-07 06:00 +0100
  Re: [RFC][PATCH] mm: merge as soon as possible when pcp alloc/free Andrew Morton <akpm@linux-foundation.org> - 2016-11-08 00:50 +0100
    Re: [RFC][PATCH] mm: merge as soon as possible when pcp alloc/free Mel Gorman <mgorman@techsingularity.net> - 2016-11-08 12:20 +0100

csiph-web