linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: David Hildenbrand <david@redhat.com>
To: "lipeifeng@oppo.com" <lipeifeng@oppo.com>,
	Vlastimil Babka <vbabka@suse.cz>,
	peifengl55 <peifengl55@gmail.com>,
	schwidefsky <schwidefsky@de.ibm.com>,
	"heiko.carstens" <heiko.carstens@de.ibm.com>,
	zhangshiming <zhangshiming@oppo.com>,
	zhouhuacai <zhouhuacai@oppo.com>,
	guoweichao <guoweichao@oppo.com>, guojian <guojian@oppo.com>
Cc: linux-s390 <linux-s390@vger.kernel.org>,
	linux-kernel <linux-kernel@vger.kernel.org>,
	linux-mm <linux-mm@kvack.org>
Subject: Re: [RFC] mm: support multi_freearea to the reduction of external fragmentation
Date: Wed, 28 Apr 2021 11:04:34 +0200	[thread overview]
Message-ID: <ebc8310e-05ea-0a2a-bcdd-9072e5bf0f86@redhat.com> (raw)
In-Reply-To: <2021042812031720737751@oppo.com>

>  >> Essentially CONFIG_SPARSEMEM, whereby we can have huge holes in physical
>  >> memory layout and memory areas coming/going with memory hot(un)plug.
>  >> Usually we manage all metadata per section. For example, pageblocks are
>  >> allocated per section. We avoid arrays that depend on the
>  >> initial/maximum physical memory size.
> 
> CONFIG_SPRSEMEM has been opened in some of our product with 
> Qcom-platform and
> MTK platform. AFAIK, multi_freearea would not bring problem to 
> it?because the patch
> just manage the physical memory of zone to serveral section(free_area) 
> and adjust the
> the range of pages-PFN for buddy-alloc-pages by the alloction-order. 
> With memory
> hot(un)plug, we would initialize the members of "multi_freearea" in zone.

 From your description only I cannot tell how that would really work. 
Your description of 1) indicated that we are dealing with an array to 
manage memory segments, and arrays are a bad data structure when it 
comes to sparsity.

> 
> The patch has been merged in the baseline of our product that has been 
> sold all over the
> world with Linux-4.4/4.9/4.19 so that i don't think there will be too 
> much risk. Of course,
> i might be wrong.

Just always keep in mind that upstream Linux has a very broad community. 
What might be "good enough" for smartphones might not be well suited for 
servers, VMs, embedded devices, other archs ... just imagine the RAM 
size differences, sparse layout, dynamic memory changes, ...

Adding additional complexity to the buddy has to have a compelling 
benefit; keep in mind that any complexity we introduce has to be 
maintained in the long term.

Having that said, starting with small steps is IMHO the right approach.

-- 
Thanks,

David / dhildenb



  reply	other threads:[~2021-04-28  9:04 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-14  2:38 [RFC] mm: support multi_freearea to the reduction of external fragmentation lipeifeng
2021-04-16 11:06 ` Vlastimil Babka
2021-04-19  2:37   ` lipeifeng
2021-04-22  9:37     ` David Hildenbrand
2021-04-22  9:29   ` David Hildenbrand
2021-04-26  3:19     ` lipeifeng
2021-04-26  8:37       ` David Hildenbrand
2021-04-26 10:19         ` lipeifeng
2021-04-27 12:46           ` David Hildenbrand
2021-04-28  4:03             ` lipeifeng
2021-04-28  9:04               ` David Hildenbrand [this message]
2021-04-28 10:53                 ` lipeifeng

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ebc8310e-05ea-0a2a-bcdd-9072e5bf0f86@redhat.com \
    --to=david@redhat.com \
    --cc=guojian@oppo.com \
    --cc=guoweichao@oppo.com \
    --cc=heiko.carstens@de.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=linux-s390@vger.kernel.org \
    --cc=lipeifeng@oppo.com \
    --cc=peifengl55@gmail.com \
    --cc=schwidefsky@de.ibm.com \
    --cc=vbabka@suse.cz \
    --cc=zhangshiming@oppo.com \
    --cc=zhouhuacai@oppo.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).