linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Mike Rapoport <rppt@linux.ibm.com>
To: Chen Zhou <chenzhou10@huawei.com>
Cc: tglx@linutronix.de, mingo@redhat.com, bp@alien8.de,
	ebiederm@xmission.com, catalin.marinas@arm.com,
	will.deacon@arm.com, akpm@linux-foundation.org,
	ard.biesheuvel@linaro.org, horms@verge.net.au,
	takahiro.akashi@linaro.org, linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, kexec@lists.infradead.org,
	linux-mm@kvack.org, wangkefeng.wang@huawei.com
Subject: Re: [PATCH v3 3/4] arm64: kdump: support more than one crash kernel regions
Date: Mon, 15 Apr 2019 08:04:18 +0300	[thread overview]
Message-ID: <20190415050417.GB6167@rapoport-lnx> (raw)
In-Reply-To: <b5206f0c-d711-427e-256a-98b2e30c1ab0@huawei.com>

Hi,

On Mon, Apr 15, 2019 at 10:05:18AM +0800, Chen Zhou wrote:
> Hi Mike,
> 
> On 2019/4/14 20:10, Mike Rapoport wrote:
> >>
> >> solution A: 	phys_addr_t start[INIT_MEMBLOCK_RESERVED_REGIONS * 2];
> >> 		phys_addr_t end[INIT_MEMBLOCK_RESERVED_REGIONS * 2];
> >> start, end is physical addr
> >>
> >> solution B: 	int start_rgn[INIT_MEMBLOCK_REGIONS], end_rgn[INIT_MEMBLOCK_REGIONS];
> >> start_rgn, end_rgn is rgn index		
> >>
> >> Solution B do less remove operations and with no warning comparing to solution A.
> >> I think solution B is better, could you give some suggestions?
> >  
> > Solution B is indeed better that solution A, but I'm still worried by
> > relatively large arrays on stack and the amount of loops :(
> > 
> > The very least we could do is to call memblock_cap_memory_range() to drop
> > the memory before and after the ranges we'd like to keep.
> 
> 1. relatively large arrays
> As my said above, the start_rgn, end_rgn is rgn index, we could use unsigned char type.

Let's stick to int for now

> 2. loops
> Loops always exist, and the solution with fewer loops may be just encapsulated well.

Of course the loops are there, I just hoped we could get rid of the nested
loop and get away with single passes in all the cases.
Apparently it's not the case :(

> Thanks,
> Chen Zhou
> 

-- 
Sincerely yours,
Mike.


  reply	other threads:[~2019-04-15  5:04 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-09 10:28 [PATCH v3 0/4] support reserving crashkernel above 4G on arm64 kdump Chen Zhou
2019-04-09 10:28 ` [PATCH v3 1/4] x86: kdump: move reserve_crashkernel_low() into kexec_core.c Chen Zhou
2019-04-10  7:09   ` Ingo Molnar
2019-04-11 12:32     ` Chen Zhou
2019-04-12  7:00       ` Ingo Molnar
2019-04-09 10:28 ` [PATCH v3 2/4] arm64: kdump: support reserving crashkernel above 4G Chen Zhou
2019-04-09 10:28 ` [PATCH v3 3/4] arm64: kdump: support more than one crash kernel regions Chen Zhou
2019-04-10 13:09   ` Mike Rapoport
2019-04-11 12:17     ` Chen Zhou
2019-04-13  8:14       ` Chen Zhou
2019-04-14 12:10       ` Mike Rapoport
2019-04-15  2:05         ` Chen Zhou
2019-04-15  5:04           ` Mike Rapoport [this message]
2019-04-14 12:13   ` Mike Rapoport
2019-04-15  2:27     ` Chen Zhou
2019-04-15  4:55       ` Mike Rapoport
2019-04-09 10:28 ` [PATCH v3 4/4] kdump: update Documentation about crashkernel on arm64 Chen Zhou

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=20190415050417.GB6167@rapoport-lnx \
    --to=rppt@linux.ibm.com \
    --cc=akpm@linux-foundation.org \
    --cc=ard.biesheuvel@linaro.org \
    --cc=bp@alien8.de \
    --cc=catalin.marinas@arm.com \
    --cc=chenzhou10@huawei.com \
    --cc=ebiederm@xmission.com \
    --cc=horms@verge.net.au \
    --cc=kexec@lists.infradead.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mingo@redhat.com \
    --cc=takahiro.akashi@linaro.org \
    --cc=tglx@linutronix.de \
    --cc=wangkefeng.wang@huawei.com \
    --cc=will.deacon@arm.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