From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755851AbcHXLrn (ORCPT ); Wed, 24 Aug 2016 07:47:43 -0400 Received: from mx1.redhat.com ([209.132.183.28]:36004 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753386AbcHXLrl (ORCPT ); Wed, 24 Aug 2016 07:47:41 -0400 Reply-To: xlpang@redhat.com Subject: Re: [PATCH v2 1/2] kexec: Introduce "/sys/kernel/kexec_crash_low_size" References: <1471398657-20237-1-git-send-email-xlpang@redhat.com> <20160817082034.GA11837@dhcp-128-65.nay.redhat.com> <20160824082031.GA13889@dhcp-128-65.nay.redhat.com> To: Dave Young , Yinghai Lu Cc: Baoquan He , Xunlei Pang , "kexec@lists.infradead.org" , Linux Kernel Mailing List , "Eric W. Biederman" , Andrew Morton , Vivek Goyal From: Xunlei Pang Message-ID: <57BD86E5.30704@redhat.com> Date: Wed, 24 Aug 2016 19:37:09 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-Version: 1.0 In-Reply-To: <20160824082031.GA13889@dhcp-128-65.nay.redhat.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Wed, 24 Aug 2016 11:36:51 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2016/08/24 at 16:20, Dave Young wrote: > On 08/23/16 at 06:11pm, Yinghai Lu wrote: >> On Wed, Aug 17, 2016 at 1:20 AM, Dave Young wrote: >>> On 08/17/16 at 09:50am, Xunlei Pang wrote: >>>> "/sys/kernel/kexec_crash_size" only handles crashk_res, it >>>> is fine in most cases, but sometimes we have crashk_low_res. >>>> For example, when "crashkernel=size[KMG],high" combined with >>>> "crashkernel=size[KMG],low" is used for 64-bit x86. >>>> >>>> Like crashk_res, we introduce the corresponding sysfs file >>>> "/sys/kernel/kexec_crash_low_size" for crashk_low_res. >>>> >>>> So, the exact total reserved memory is the sum of the two. >>>> >>>> crashk_low_res can also be shrunk via this new interface, >>>> and users should be aware of what they are doing. >> ... >>>> @@ -218,6 +238,7 @@ static struct attribute * kernel_attrs[] = { >>>> #ifdef CONFIG_KEXEC_CORE >>>> &kexec_loaded_attr.attr, >>>> &kexec_crash_loaded_attr.attr, >>>> + &kexec_crash_low_size_attr.attr, >>>> &kexec_crash_size_attr.attr, >>>> &vmcoreinfo_attr.attr, >>>> #endif >> would be better if you can use attribute_group .is_visible to control showing of >> crash_low_size only when the crash_base is above 4G. > I have same feeling that it looks odd to show low in sysfs in case no > crashkernel=,high being used. Even if crashkernel=,high is used only in > x86 the resource crashk_low is in common code. What do you think to move > it to x86? If want to put some restriction on it, I'd prefer to move crashk_low to arch x86, to make it x86-specific. We can show the interface unconditionally. If it isn't used, its size is 0, it doesn't matter. Regards, Xunlei > > Thanks > Dave > >> Thanks >> >> Yinghai >> >> _______________________________________________ >> kexec mailing list >> kexec@lists.infradead.org >> http://lists.infradead.org/mailman/listinfo/kexec