From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756502AbdD1FXm (ORCPT ); Fri, 28 Apr 2017 01:23:42 -0400 Received: from mx1.redhat.com ([209.132.183.28]:56920 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752599AbdD1FXe (ORCPT ); Fri, 28 Apr 2017 01:23:34 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 1F27DC04B936 Authentication-Results: ext-mx07.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx07.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=dyoung@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 1F27DC04B936 Date: Fri, 28 Apr 2017 13:23:26 +0800 From: Dave Young To: AKASHI Takahiro , vgoyal@redhat.com, Thiago Jung Bauermann , bhe@redhat.com, kexec@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] kexec: allocate buffer in top-down, if specified, correctly Message-ID: <20170428052326.GC3600@dhcp-128-65.nay.redhat.com> References: <20170426082209.12127-1-takahiro.akashi@linaro.org> <1605356.Vp6YPvtjly@morokweng> <20170428005135.GA3963@fireball> <20170428051950.GB3600@dhcp-128-65.nay.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170428051950.GB3600@dhcp-128-65.nay.redhat.com> User-Agent: Mutt/1.7.1 (2016-10-04) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Fri, 28 Apr 2017 05:23:34 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Correct Vivek's email address On 04/28/17 at 01:19pm, Dave Young wrote: > Vivek, can you help to give some comments about the locate hole isssue > in kexec_file? > > On 04/28/17 at 09:51am, AKASHI Takahiro wrote: > > Thiago, > > > > Thank you for the comment. > > > > 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? > > > > > 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. > > Thing need to make clear is why do we need the change, it might be a > problem for crashkernel=xM,low since that is for softiotlb in case > crashkernel=xM,high being used, otherwise seems current code is fine. > > Need seeking for old memory from Vivek to confirm. > > > > > > This behavior is not consistent with locate_hole(hole_end == -1) function > > > > of kexec-tools. > > > > > > > > This patch fixes the bug, going though all the memory regions anyway. > > > > > > This patch would break powerpc, because at the end of the memory walk kbuf > > > would have the lowest memory hole. > > > > > > If it's not possible to walk resources in reverse order, then this patch needs > > > to change powerpc to always walk memory from bottom to top. > > > > So I would like to hear from x86 guys. > > > > Thanks > > -Takahiro AKASHI > > > > > -- > > > Thiago Jung Bauermann > > > IBM Linux Technology Center > > >