From: HATAYAMA Daisuke <d.hatayama@jp.fujitsu.com>
To: Yinghai Lu <yinghai@kernel.org>
Cc: Thomas Gleixner <tglx@linutronix.de>, Ingo Molnar <mingo@elte.hu>,
"H. Peter Anvin" <hpa@zytor.com>, WANG Chao <chaowang@redhat.com>,
Vivek Goyal <vgoyal@redhat.com>,
"Eric W. Biederman" <ebiederm@xmission.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 1/4] x86, kdump: Set crashkernel_low automatically
Date: Thu, 04 Apr 2013 17:11:28 +0900 [thread overview]
Message-ID: <515D35B0.8020107@jp.fujitsu.com> (raw)
In-Reply-To: <1365035906-3208-2-git-send-email-yinghai@kernel.org>
(2013/04/04 9:38), Yinghai Lu wrote:
> Index: linux-2.6/lib/swiotlb.c
> ===================================================================
> --- linux-2.6.orig/lib/swiotlb.c
> +++ linux-2.6/lib/swiotlb.c
> @@ -105,9 +105,9 @@ setup_io_tlb_npages(char *str)
> if (!strcmp(str, "force"))
> swiotlb_force = 1;
>
> - return 1;
> + return 0;
> }
> -__setup("swiotlb=", setup_io_tlb_npages);
> +early_param("swiotlb", setup_io_tlb_npages);
> /* make io_tlb_overflow tunable too? */
>
> unsigned long swiotlb_nr_tbl(void)
> @@ -115,6 +115,18 @@ unsigned long swiotlb_nr_tbl(void)
> return io_tlb_nslabs;
> }
> EXPORT_SYMBOL_GPL(swiotlb_nr_tbl);
> +
> +/* default to 64MB */
> +#define IO_TLB_DEFAULT_SIZE (64UL<<20)
> +unsigned long swiotlb_size_or_default(void)
> +{
> + unsigned long size;
> +
> + size = io_tlb_nslabs << IO_TLB_SHIFT;
> +
> + return size ? size : (IO_TLB_DEFAULT_SIZE);
> +}
> +
> /* Note that this doesn't work with highmem page */
> static dma_addr_t swiotlb_virt_to_bus(struct device *hwdev,
> volatile void *address)
> @@ -188,8 +200,7 @@ int __init swiotlb_init_with_tbl(char *t
> void __init
> swiotlb_init(int verbose)
> {
> - /* default to 64MB */
> - size_t default_size = 64UL<<20;
> + size_t default_size = IO_TLB_DEFAULT_SIZE;
> unsigned char *vstart;
> unsigned long bytes;
The variable default_size seems no longer necessary. IO_TLB_DEFAULT_SIZE
should be used directly.
>
> Index: linux-2.6/Documentation/kernel-parameters.txt
> ===================================================================
> --- linux-2.6.orig/Documentation/kernel-parameters.txt
> +++ linux-2.6/Documentation/kernel-parameters.txt
> @@ -596,9 +596,6 @@ bytes respectively. Such letter suffixes
> is selected automatically. Check
> Documentation/kdump/kdump.txt for further details.
>
> - crashkernel_low=size[KMG]
> - [KNL, x86] parts under 4G.
> -
> crashkernel=range1:size1[,range2:size2,...][@offset]
> [KNL] Same as above, but depends on the memory
> in the running system. The syntax of range is
> @@ -606,6 +603,18 @@ bytes respectively. Such letter suffixes
> a memory unit (amount[KMG]). See also
> Documentation/kdump/kdump.txt for an example.
>
> + crashkernel_low=size[KMG]
> + [KNL, x86_64] range under 4G. When crashkernel= is
> + passed, kernel allocate physical memory region
> + above 4G, that cause second kernel crash on system
> + that need swiotlb later. Kernel would try to allocate
> + some region below 4G automatically. This one let
> + user to specify own low range under 4G for second
> + kernel instead.
In fact, swiotlb caused the 2nd kernel to fail to boot this time, but in
general, other components that require low memory can cause the same
situation. I think it better to avoid the description that only swiotlb
can cause the 2nd kernel to fail to boot.
So, how about this?
... that cause second kernel crash on system that require some amount of
low memory, e.g. swiotlb that requires at least 72MB low memory at
default. Kernel would ...
> + 0: to disable low allocation on systems that do not
> + need swiotlb, that will save 72M low ram in first
> + kernel.
> +
Similarly, I think it better not to say swiotlb thing here. Just:
0: to disable automatic low memory allocation.
Thanks.
HATAYAMA, Daisuke
next prev parent reply other threads:[~2013-04-04 8:11 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-04 0:38 [PATCH -v2 0/4] x86, kdump: Fix crashkernel high with old kexec-tools Yinghai Lu
2013-04-04 0:38 ` [PATCH v2 1/4] x86, kdump: Set crashkernel_low automatically Yinghai Lu
2013-04-04 8:11 ` HATAYAMA Daisuke [this message]
2013-04-04 16:45 ` Yinghai Lu
2013-04-04 14:11 ` Vivek Goyal
2013-04-04 16:28 ` Yinghai Lu
2013-04-04 0:38 ` [PATCH v2 3/4] kexec: use Crash kernel for Crash kernel low Yinghai Lu
2013-04-04 0:38 ` [PATCH v2 2/4] x86, kdump: Retore crashkernel= to allocate low Yinghai Lu
2013-04-04 14:16 ` Vivek Goyal
2013-04-04 16:56 ` Yinghai Lu
2013-04-04 0:38 ` [PATCH v2 4/4] x86, kdump: Change crashkernel_high/low= to crashkernel=;high/low Yinghai Lu
2013-04-04 6:55 ` HATAYAMA Daisuke
2013-04-04 17:33 ` Yinghai Lu
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=515D35B0.8020107@jp.fujitsu.com \
--to=d.hatayama@jp.fujitsu.com \
--cc=chaowang@redhat.com \
--cc=ebiederm@xmission.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=tglx@linutronix.de \
--cc=vgoyal@redhat.com \
--cc=yinghai@kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.