From: Andrew Morton <akpm@osdl.org>
To: hari@in.ibm.com
Cc: linux-kernel@vger.kernel.org, fastboot@osdl.org,
suparna@in.ibm.com, mbligh@aracnet.com, ebiederm@xmission.com,
litke@us.ibm.com
Subject: Re: [PATCH][2/6]Memory preserving reboot using kexec
Date: Wed, 15 Sep 2004 14:22:42 -0700 [thread overview]
Message-ID: <20040915142242.2d3f7cba.akpm@osdl.org> (raw)
In-Reply-To: <20040915125322.GC15450@in.ibm.com>
I'll add these to -mm. Minor things:
> +config BACKUP_BASE
> + int "location of the crash dumps backup region"
> + depends on CRASH_DUMP
> + default 16
> + help
> + This is the location where the second kernel will boot from.
> +
> +config BACKUP_SIZE
> + int "Size of the crash dumps backup region"
> + depends on CRASH_DUMP
> + range 16 64
> + default 32
> + help
> + The size of the second kernel's memory.
You should tell the user the units of the parameter. So
"location of the crash dumps backup region (MB)"
would be nice.
> +++ linux-2.6.9-rc1-hari/include/asm-i386/crash_dump.h 2004-09-15 17:36:30.000000000 +0530
> @@ -0,0 +1,44 @@
> +/* asm-i386/crash_dump.h */
> +#include <linux/bootmem.h>
> +
> +extern unsigned int dump_enabled;
> +
> +void __crash_relocate_mem(unsigned long, unsigned long);
> +unsigned long __init find_max_low_pfn(void);
> +void __init find_max_pfn(void);
> +
> +extern unsigned int crashed;
Should the above declarations be inside CONFIG_CRASH_DUMP? We don't want
to leave them in scope if they don't exist.
> +static inline void crash_machine_kexec(void)
> +{
> + struct kimage *image;
> +
> + if ((!crash_dump_on) || (crashed))
> + return;
> +
> + image = xchg(&kexec_image, 0);
> + if (image) {
> + crashed = 1;
> + device_shutdown();
> + printk(KERN_EMERG "kexec: opening parachute\n");
> + machine_kexec(image);
> + while (1);
> + } else {
> + printk(KERN_EMERG "kexec: No kernel image loaded!\n");
> + }
> +}
I don't see why this is inlined??
> +#ifdef CONFIG_CRASH_DUMP
> +/*
> + * Enable kexec reboot upon panic; for dumping
> + */
> +static ssize_t write_crash_dump_on(struct file *file, const char __user *buf,
> + size_t count, loff_t *ppos)
> +{
> + if (count) {
> + if (get_user(crash_dump_on, buf))
> + return -EFAULT;
> + }
> + return count;
> +}
> +
> +static struct file_operations proc_crash_dump_on_operations = {
> + .write = write_crash_dump_on,
> +};
> +#endif
> +
> struct proc_dir_entry *proc_root_kcore;
>
> static void create_seq_entry(char *name, mode_t mode, struct file_operations *f)
> @@ -663,6 +683,11 @@ void __init proc_misc_init(void)
> if (entry)
> entry->proc_fops = &proc_sysrq_trigger_operations;
> #endif
> +#ifdef CONFIG_CRASH_DUMP
> + entry = create_proc_entry("kexec-dump", S_IWUSR, NULL);
> + if (entry)
> + entry->proc_fops = &proc_crash_dump_on_operations;
> +#endif
> #ifdef CONFIG_LOCKMETER
> entry = create_proc_entry("lockmeter", S_IWUSR | S_IRUGO, NULL);
> if (entry) {
Please do all the above in a crashdump-specific file, not inside proc_misc.c
next prev parent reply other threads:[~2004-09-15 21:22 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-09-15 12:50 kexec based crash dumping Hariprasad Nellitheertha
2004-09-15 12:51 ` [PATCH][1/6]Documentation Hariprasad Nellitheertha
2004-09-15 12:53 ` [PATCH][2/6]Memory preserving reboot using kexec Hariprasad Nellitheertha
2004-09-15 12:54 ` [PATCH][3/6]Routines for copying the dump pages Hariprasad Nellitheertha
2004-09-15 12:55 ` [PATCH][4/6]Register snapshotting before kexec boot Hariprasad Nellitheertha
2004-09-15 12:56 ` [PATCH][5/6]ELF format dump file access Hariprasad Nellitheertha
2004-09-15 12:57 ` [PATCH][6/6]Linear/raw " Hariprasad Nellitheertha
2004-09-15 21:28 ` [PATCH][5/6]ELF " Andrew Morton
2004-09-15 21:29 ` Andrew Morton
2004-09-15 21:31 ` Andrew Morton
2004-09-15 21:27 ` [PATCH][4/6]Register snapshotting before kexec boot Andrew Morton
2004-09-16 8:11 ` [Fastboot] " Dipankar Sarma
2004-09-17 14:53 ` Srivatsa Vaddagiri
2004-09-19 20:17 ` Eric W. Biederman
2004-09-15 21:23 ` [PATCH][3/6]Routines for copying the dump pages Andrew Morton
2004-09-15 21:22 ` Andrew Morton [this message]
2004-09-19 20:37 ` [Fastboot] Re: [PATCH][2/6]Memory preserving reboot using kexec Eric W. Biederman
2004-09-20 13:49 ` Hariprasad Nellitheertha
2004-09-20 19:53 ` Eric W. Biederman
2004-09-15 17:33 ` [Fastboot] kexec based crash dumping Eric W. Biederman
-- strict thread matches above, loose matches on Subject: below --
2004-08-17 12:04 [RFC]Kexec " Hariprasad Nellitheertha
2004-08-17 12:05 ` [PATCH][1/6]Documentation Hariprasad Nellitheertha
2004-08-17 12:07 ` [PATCH][2/6]Memory preserving reboot using kexec Hariprasad Nellitheertha
2004-08-17 16:01 ` Dave Hansen
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=20040915142242.2d3f7cba.akpm@osdl.org \
--to=akpm@osdl.org \
--cc=ebiederm@xmission.com \
--cc=fastboot@osdl.org \
--cc=hari@in.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=litke@us.ibm.com \
--cc=mbligh@aracnet.com \
--cc=suparna@in.ibm.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
Powered by JetHome