[PATCH 5/5] kexec: X86: Pass memory ranges via e820 table instead of memmap= boot parameter

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Sorry, my first answer was an html mail, please ignore.
For some reason my mailer switches to html in rare cases, even
default is text...:

On Friday, April 12, 2013 05:56:08 PM Zhang Yanfei wrote:
> ? 2013?04?11? 20:26, Thomas Renninger ??:

...
> > +	 * Ignore usable memory ranges for kdump kernel smaller
> > +	 * than 100k to avoid too much ranges passed
> > +	 * Save the new ranges (exluding lower than 100k ranges) in tmp_map
> > +	 * and store the number of elements in tmp_map_ranges
> > +	 */
> > +	for (m = 0, i = 0; i < CRASH_MAX_MEMMAP_NR; i++) {
> > +		unsigned long startk, endk;
> > +		startk = (usable_mem[i].start/1024);
> > +		endk = ((usable_mem[i].end + 1)/1024);
> > +		if (!startk && !endk)
> > +			/* All regions traversed. */
> > +			break;
> > +
> > +		/* A region is not worth adding if region size < 100K. It eats
> > +		 * up precious command line length. */
> 
> Now you are passing the e820 table directly instead of the commandline, so
> does this comment make sense now?
Yes.
There is some specific data generated for the crash kernel in the 
crashkernel=... area 
which must not get used/overridden by crash
kernel usage.
There are some small areas between them which could get used again:

> +             if ((endk - startk) < min_sizek) {
> +                     dbgprintf("Removing: %luk - %luk\n", startk, endk);
> +                     continue;
In my tests I saw:
Removing: 900552k - 900556k
Removing: 901115k - 901120k
And adding a 4k and a 5k usable memory range is really not worth it.
Also the e820 table is restricted to 128 entries and especially uefi
systems reach them quickly.
The (originally) usable memory ranges are cut out and not passed
(everything is exactly the same as in memmap= case), but usable
memory ranges for the crash kernel are added.
On my system the original BIOS/bootloader e820 table has 21 entries
and the (now) kexec modified ones also have 21. This may vary.
But it's good to not add that much and easier break the 128 e820 tables
work rule.

Hopefully this still reads someone, otherwise I'll send something
if I get further:
I currently try make up a uefi memory map area and point to it by
filling:
struct efi_info {
        uint32_t efi_loader_signature;
        uint32_t efi_systab;
        uint32_t efi_memdesc_size;
        uint32_t efi_memdesc_version;
        uint32_t efi_memmap;
        uint32_t efi_memmap_size;
        uint32_t efi_systab_hi;
        uint32_t efi_memmap_hi;
};
passed via boot loader structure (zero page).
This would break the 128 e820 entries restriction and lots of memory ranges
on UEFI systems would not be an issue anymore.

       Thomas



[Index of Archives]     [LM Sensors]     [Linux Sound]     [ALSA Users]     [ALSA Devel]     [Linux Audio Users]     [Linux Media]     [Kernel]     [Gimp]     [Yosemite News]     [Linux Media]

  Powered by Linux