linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Pavel Machek <pavel@ucw.cz>
To: Sang Yan <sangyan@huawei.com>
Cc: kexec@lists.infradead.org, ebiederm@xmission.com,
	linux-kernel@vger.kernel.org, xiexiuqi@huawei.com,
	guohanjun@huawei.com, zhuling8@huawei.com,
	luanjianhai@huawei.com, luchunhua@huawei.com
Subject: Re: [PATCH 1/2] kexec: Add quick kexec support for kernel
Date: Mon, 17 Aug 2020 15:42:24 +0200	[thread overview]
Message-ID: <20200817134224.GA8381@bug> (raw)
In-Reply-To: <20200814055239.47348-1-sangyan@huawei.com>

Hi!

> +config QUICK_KEXEC
> +	bool "Support for quick kexec"
> +	depends on KEXEC_CORE
> +	help
> +	  Say y here to enable this feature.

?

> +	  It use reserved memory to accelerate kexec, just like crash

uses

> +	  kexec, load new kernel and initrd to reserved memory, and
> +	  boot new kernel on that memory. It will save the time of
> +	  relocating kernel.

loads a new.... boots new... 

>  	IORES_DESC_DEVICE_PRIVATE_MEMORY	= 6,
>  	IORES_DESC_RESERVED			= 7,
>  	IORES_DESC_SOFT_RESERVED		= 8,
> +#ifdef CONFIG_QUICK_KEXEC
> +	IORES_DESC_QUICK_KEXEC			= 9,
> +#endif
>  };

Remove ifdef.

>  /*
> diff --git a/include/linux/kexec.h b/include/linux/kexec.h
> index 9e93bef52968..976bf9631070 100644
> --- a/include/linux/kexec.h
> +++ b/include/linux/kexec.h
> @@ -269,9 +269,12 @@ struct kimage {
>  	unsigned long control_page;
>  
>  	/* Flags to indicate special processing */
> -	unsigned int type : 1;
> +	unsigned int type : 2;
>  #define KEXEC_TYPE_DEFAULT 0
>  #define KEXEC_TYPE_CRASH   1
> +#ifdef CONFIG_QUICK_KEXEC
> +#define KEXEC_TYPE_QUICK   2
> +#endif
>  	unsigned int preserve_context : 1;

Here, too.

> +++ b/include/uapi/linux/kexec.h
> @@ -12,6 +12,9 @@
>  /* kexec flags for different usage scenarios */
>  #define KEXEC_ON_CRASH		0x00000001
>  #define KEXEC_PRESERVE_CONTEXT	0x00000002
> +#ifdef CONFIG_QUICK_KEXEC
> +#define KEXEC_QUICK		0x00000004
> +#endif
>  #define KEXEC_ARCH_MASK		0xffff0000

And here.

									Pavel

  parent reply	other threads:[~2020-08-17 13:42 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-14  5:52 [PATCH 1/2] kexec: Add quick kexec support for kernel Sang Yan
2020-08-14  5:52 ` [PATCH 2/2] arm64: Reserve memory for quick kexec Sang Yan
2020-08-16  4:11   ` kernel test robot
2020-08-14  6:58 ` [PATCH 1/2] kexec: Add quick kexec support for kernel Dave Young
2020-08-14  8:21   ` Sang Yan
2020-08-14 11:24     ` Dave Young
2020-08-14 19:22       ` Pavel Tatashin
2020-08-17 12:14         ` James Morse
2020-08-19 12:37           ` Dave Young
2020-08-14 15:17 ` Eric W. Biederman
2020-08-17 13:42 ` Pavel Machek [this message]
2020-08-18  6:49   ` Sang Yan

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=20200817134224.GA8381@bug \
    --to=pavel@ucw.cz \
    --cc=ebiederm@xmission.com \
    --cc=guohanjun@huawei.com \
    --cc=kexec@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luanjianhai@huawei.com \
    --cc=luchunhua@huawei.com \
    --cc=sangyan@huawei.com \
    --cc=xiexiuqi@huawei.com \
    --cc=zhuling8@huawei.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).