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


Groups > linux.kernel > #1633108

Re: [PATCH] kexec: allocate buffer in top-down, if specified, correctly

From Thiago Jung Bauermann <bauerman@linux.vnet.ibm.com>
Newsgroups linux.kernel
Subject Re: [PATCH] kexec: allocate buffer in top-down, if specified, correctly
Date 2017-04-28 21:40 +0200
Message-ID <tBjUe-3ze-15@gated-at.bofh.it> (permalink)
References <tAquJ-87M-3@gated-at.bofh.it> <tAZLQ-6S4-11@gated-at.bofh.it> <tB2qm-8uf-9@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Am Freitag, 28. April 2017, 09:51:39 BRT schrieb AKASHI Takahiro:
> On Thu, Apr 27, 2017 at 07:00:04PM -0300, Thiago Jung Bauermann wrote:
> > Hello,
> > 
> > Am Mittwoch, 26. April 2017, 17:22:09 BRT schrieb AKASHI Takahiro:
> > > The current kexec_locate_mem_hole(kbuf.top_down == 1) stops searching at
> > > the first memory region that has enough space for requested size even if
> > > some of higher regions may also have.
> > 
> > kexec_locate_mem_hole expects arch_kexec_walk_mem to walk memory from top
> > to bottom if top_down is true. That is what powerpc's version does.
> 
> Ah, I haven't noticed that, but x86 doesn't have arch_kexec_walk_mem and
> how can it work for x86?

Looking at v4.9's kexec_add_buffer, the logic has been this way before I 
factored kexec_locate_mem_hole out of it. So x86 has been behaving this way 
for a while.

> > Isn't it possible to walk resources from top to bottom?
> 
> Yes, it will be, but it seems to me that such a behavior is not intuitive
> and even confusing if it doesn't come with explicit explanation.

Yes, I should have put a comment pointing out that assumption.

-- 
Thiago Jung Bauermann
IBM Linux Technology Center

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


Thread

[PATCH] kexec: allocate buffer in top-down, if specified, correctly AKASHI Takahiro <takahiro.akashi@linaro.org> - 2017-04-26 10:30 +0200
  Re: [PATCH] kexec: allocate buffer in top-down, if specified, correctly Thiago Jung Bauermann <bauerman@linux.vnet.ibm.com> - 2017-04-28 00:10 +0200
    Re: [PATCH] kexec: allocate buffer in top-down, if specified,  correctly AKASHI Takahiro <takahiro.akashi@linaro.org> - 2017-04-28 03:00 +0200
      Re: [PATCH] kexec: allocate buffer in top-down, if specified,  correctly Dave Young <dyoung@redhat.com> - 2017-04-28 07:30 +0200
      Re: [PATCH] kexec: allocate buffer in top-down, if specified,  correctly Dave Young <dyoung@redhat.com> - 2017-04-28 07:30 +0200
      Re: [PATCH] kexec: allocate buffer in top-down, if specified, correctly Thiago Jung Bauermann <bauerman@linux.vnet.ibm.com> - 2017-04-28 21:40 +0200
  Re: [PATCH] kexec: allocate buffer in top-down, if specified,  correctly Dave Young <dyoung@redhat.com> - 2017-04-28 06:50 +0200

csiph-web