From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751742AbcF0QiK (ORCPT ); Mon, 27 Jun 2016 12:38:10 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:29393 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751638AbcF0QiH (ORCPT ); Mon, 27 Jun 2016 12:38:07 -0400 X-IBM-Helo: d24dlp02.br.ibm.com X-IBM-MailFrom: bauerman@linux.vnet.ibm.com X-IBM-RcptTo: linux-kernel@vger.kernel.org From: Thiago Jung Bauermann To: Dave Young Cc: kexec@lists.infradead.org, linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org, Eric Biederman Subject: Re: [PATCH v3 3/9] kexec_file: Factor out kexec_locate_mem_hole from kexec_add_buffer. Date: Mon, 27 Jun 2016 13:37:58 -0300 User-Agent: KMail/4.14.3 (Linux/3.13.0-88-generic; KDE/4.14.13; x86_64; ; ) In-Reply-To: <20160627161948.GA5876@dhcp-128-65.nay.redhat.com> References: <1466538521-31216-1-git-send-email-bauerman@linux.vnet.ibm.com> <4923900.bfxGnX6mM2@hactar> <20160627161948.GA5876@dhcp-128-65.nay.redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 16062716-0020-0000-0000-00000218F95B X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 16062716-0021-0000-0000-00002FF0E733 Message-Id: <5428891.iJNV8CI1We@hactar> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2016-06-27_11:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1604210000 definitions=main-1606270171 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Am Dienstag, 28 Juni 2016, 00:19:48 schrieb Dave Young: > On 06/23/16 at 12:37pm, Thiago Jung Bauermann wrote: > > Am Donnerstag, 23 Juni 2016, 01:44:07 schrieb Dave Young: > > What is bad about the description of top_down? > It is not clear enough to me, I personally think the original one in > source code is better: > /* allocate from top of memory hole */ Actually I realized there's some discrepancy in how the x86 code uses top_down and how I need it to work in powerpc. This may be what is confusing about my comment and the existing comment. x86 always walks memory from bottom to top but if top_down is true, in each memory region it will allocate the memory hole in the highest address within that region. I don't know why it is done that way, though. On powerpc, the memory walk itself should be from top to bottom, as well as the memory hole allocation within each memory region. Should I add a separate top_down argument to kexec_locate_mem_hole to control if the memory walk should be from top to bottom, and then the bottom_up member of struct kexec_buf controls where inside each memory region the memory hole will be allocated? -- []'s Thiago Jung Bauermann IBM Linux Technology Center