LKML Archive on
help / color / mirror / Atom feed
From: Tomasz Chmielewski <>
To: Vivek Goyal <>
Cc: LKML <>,
	Kexec Mailing List <>,
	Horms <>
Subject: Re: why kexec insists on syncing with recent kernels?
Date: Thu, 07 Feb 2008 17:59:14 +0100	[thread overview]
Message-ID: <> (raw)
In-Reply-To: <>

Vivek Goyal schrieb:
> On Thu, Feb 07, 2008 at 03:13:30PM +0100, Tomasz Chmielewski wrote:
>> According to kernel/kexec.c:
>>  * kexec does not sync, or unmount filesystems so if you need
>>  * that to happen you need to do that yourself.
> In latest kexec code I do see it syncing. But it does not unmount the
> filesystems. So this comment looks like partially wrong.
>> I saw this was true with 2.6.18 kernel (i.e., it didn't sync), but kexec 
>> syncs with recent kernels (I checked and 2.6.24):
>> # kexec -e
>> md: stopping all md devices
>> sd 2:0:0:0: [sdb] Synchronizing SCSI cache
> Which kexec-tools you are using? 

# kexec -v
kexec 1.101 released 15 February 2005

> syncing is initiated by user space so changing kernel will not have
> any effect (as long as user space is same). I think just that message
> are spitted by kernel, so probably 2.6.18 did not spit any message and
> 2.6.24 does.

Yes and no.
I just booted 2.6.24 on a diskless system (Mandriva) I normally use with 
2.6.18 kernel, did kexec -e... And it executed the kernel immediately, 
without any syncing.
On Debian, with the same 2.6.24 kernel, it does sync.

So what user space part does the syncing (and how to prevent it)?


>> The way kexec works now makes rebooting unreliable again:
>> - network interfaces are brought down,
>> - kernel tries to sync - it never will, as we're booted off network, which 
>> is down
> Kexec has got an option -x --no-ifdown, which will not bring the network
> down. Try that. "kexec- -e -x"

It does seem to help, thanks.

Why it has to be the last option specified?

I tried -f option before (don't call shutdown), but it didn't help.

>> Any ideas why kexec insists on syncing?
> To me it makes sense. Just making sure that cache changes make to the file
> system before you boot into new kernel.
> In latest kexec-tools, I do see sync() is done first and then network
> interfaces are brought down. 
> Try latest kexec tools from:

Good to have a newer version, I'll try that, too.

Tomasz Chmielewski

  reply	other threads:[~2008-02-07 16:59 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-07 14:13 Tomasz Chmielewski
2008-02-07 16:37 ` Vivek Goyal
2008-02-07 16:59   ` Tomasz Chmielewski [this message]
2008-02-08 16:04     ` Vivek Goyal
2008-02-08 17:04       ` Randy Dunlap
2008-02-08 17:19         ` Tomasz Chmielewski
2008-02-08 17:26           ` Vivek Goyal
2008-02-11 12:36           ` Geert Uytterhoeven
2008-02-08  8:53 ` Geert Uytterhoeven

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:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \ \ \
    --subject='Re: why kexec insists on syncing with recent kernels?' \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

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).