Re: [PATCH v2] kexec: move machine_kexec_post_load() to public interface

2021-02-22 Thread Eric W. Biederman
Will Deacon  writes:

> On Fri, 19 Feb 2021 14:51:42 -0500, Pavel Tatashin wrote:
>> machine_kexec_post_load() is called after kexec load is finished. It must
>> declared in public header not in kexec_internal.h
>> 
>> Fixes the following compiler warning:
>> 
>> arch/arm64/kernel/machine_kexec.c:62:5: warning: no previous prototype for
>> function 'machine_kexec_post_load' [-Wmissing-prototypes]
>>int machine_kexec_post_load(struct kimage *kimage)
>
> Applied to arm64 (for-next/fixes), thanks!
>
> [1/1] kexec: move machine_kexec_post_load() to public interface
>   https://git.kernel.org/arm64/c/2596b6ae412b

As you have already applied this it seems a bit late,
but I will mention that change could legitimately have the following
tag.

Fixes: de68e4daea90 ("kexec: add machine_kexec_post_load()")

So far arm64 is the only implementation of that hook.

Eric

___
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec


Re: [PATCH v3 1/1] kernel/crash_core: Add crashkernel=auto for vmcore creation

2021-02-22 Thread john . p . donnelly

On 2/17/21 8:02 PM, Baoquan He wrote:

On 02/11/21 at 10:08am, Saeed Mirzamohammadi wrote:

This adds crashkernel=auto feature to configure reserved memory for
vmcore creation. CONFIG_CRASH_AUTO_STR is defined to be set for
different kernel distributions and different archs based on their
needs.

Signed-off-by: Saeed Mirzamohammadi 
Signed-off-by: John Donnelly 
Tested-by: John Donnelly 
---
  Documentation/admin-guide/kdump/kdump.rst |  3 ++-
  .../admin-guide/kernel-parameters.txt |  6 +
  arch/Kconfig  | 24 +++
  kernel/crash_core.c   |  7 ++
  4 files changed, 39 insertions(+), 1 deletion(-)

diff --git a/Documentation/admin-guide/kdump/kdump.rst 
b/Documentation/admin-guide/kdump/kdump.rst
index 2da65fef2a1c..e55cdc404c6b 100644
--- a/Documentation/admin-guide/kdump/kdump.rst
+++ b/Documentation/admin-guide/kdump/kdump.rst
@@ -285,7 +285,8 @@ This would mean:
  2) if the RAM size is between 512M and 2G (exclusive), then reserve 64M
  3) if the RAM size is larger than 2G, then reserve 128M
  
-

+Or you can use crashkernel=auto to choose the crash kernel memory size
+based on the recommended configuration set for each arch.
  
  Boot into System Kernel

  ===
diff --git a/Documentation/admin-guide/kernel-parameters.txt 
b/Documentation/admin-guide/kernel-parameters.txt
index 7d4e523646c3..aa2099465458 100644
--- a/Documentation/admin-guide/kernel-parameters.txt
+++ b/Documentation/admin-guide/kernel-parameters.txt
@@ -736,6 +736,12 @@
a memory unit (amount[KMG]). See also
Documentation/admin-guide/kdump/kdump.rst for an 
example.
  
+	crashkernel=auto

+   [KNL] This parameter will set the reserved memory for
+   the crash kernel based on the value of the 
CRASH_AUTO_STR
+   that is the best effort estimation for each arch. See 
also
+   arch/Kconfig for further details.
+
crashkernel=size[KMG],high
[KNL, X86-64] range could be above 4G. Allow kernel
to allocate physical memory region from top, so could
diff --git a/arch/Kconfig b/arch/Kconfig
index af14a567b493..f87c88ffa2f8 100644
--- a/arch/Kconfig
+++ b/arch/Kconfig
@@ -14,6 +14,30 @@ menu "General architecture-dependent options"
  config CRASH_CORE
bool
  
+if CRASH_CORE

+
+config CRASH_AUTO_STR
+   string "Memory reserved for crash kernel"
+   depends on CRASH_CORE
+   default "1G-64G:128M,64G-1T:256M,1T-:512M"
+   help
+ This configures the reserved memory dependent
+ on the value of System RAM. The syntax is:
+ crashkernel=:[,:,...][@offset]
+ range=start-[end]
+
+ For example:
+ crashkernel=512M-2G:64M,2G-:128M
+
+ This would mean:
+
+ 1) if the RAM is smaller than 512M, then don't reserve anything
+(this is the "rescue" case)
+ 2) if the RAM size is between 512M and 2G (exclusive), then 
reserve 64M
+ 3) if the RAM size is larger than 2G, then reserve 128M
+
+endif # CRASH_CORE


Wondering if this CRASH_CORE ifdeffery is a little redundent here
since CRASH_CORE dependency has been added. Except of this, I like this
patch. As we discussed in private threads, we can try to push it into
mainline and continue improving later.


Hi,

Are we good to move forward with this and apply it now?

Dave Young acked it.

Thank you,

John.

(Note - I am currently not on any vger.kernel.org dlist at the moment so 
please cc me ).








+
  config KEXEC_CORE
select CRASH_CORE
bool
diff --git a/kernel/crash_core.c b/kernel/crash_core.c
index 106e4500fd53..ab0a2b4b1ffa 100644
--- a/kernel/crash_core.c
+++ b/kernel/crash_core.c
@@ -7,6 +7,7 @@
  #include 
  #include 
  #include 
+#include 
  
  #include 

  #include 
@@ -250,6 +251,12 @@ static int __init __parse_crashkernel(char *cmdline,
if (suffix)
return parse_crashkernel_suffix(ck_cmdline, crash_size,
suffix);
+#ifdef CONFIG_CRASH_AUTO_STR
+   if (strncmp(ck_cmdline, "auto", 4) == 0) {
+   ck_cmdline = CONFIG_CRASH_AUTO_STR;
+   pr_info("Using crashkernel=auto, the size chosen is a best effort 
estimation.\n");
+   }
+#endif
/*
 * if the commandline contains a ':', then that's the extended
 * syntax -- if not, it must be the classic syntax
--
2.27.0






___
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec


Re: [PATCH v2] kexec: move machine_kexec_post_load() to public interface

2021-02-22 Thread Will Deacon
On Fri, 19 Feb 2021 14:51:42 -0500, Pavel Tatashin wrote:
> machine_kexec_post_load() is called after kexec load is finished. It must
> declared in public header not in kexec_internal.h
> 
> Fixes the following compiler warning:
> 
> arch/arm64/kernel/machine_kexec.c:62:5: warning: no previous prototype for
> function 'machine_kexec_post_load' [-Wmissing-prototypes]
>int machine_kexec_post_load(struct kimage *kimage)

Applied to arm64 (for-next/fixes), thanks!

[1/1] kexec: move machine_kexec_post_load() to public interface
  https://git.kernel.org/arm64/c/2596b6ae412b

Cheers,
-- 
Will

https://fixes.arm64.dev
https://next.arm64.dev
https://will.arm64.dev

___
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec


Low-Cost Loans for SMEs & Investment Funding.

2021-02-22 Thread Nicholas Toms
My name is Nicholas Toms, an investment portfolio manage. We offer the right 
loan Investment funding with low interest to finance your business or project 
ranging from US$1M to US$2BIllion. Kindly contact me for more details as I am 
open to questions. 

Sincerely, 
Nicholas Toms

___
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec