All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: Huang Ying <ying.huang@intel.com>
Cc: nigel@nigel.suspend2.net,
	Kexec Mailing List <kexec@lists.infradead.org>,
	linux-kernel@vger.kernel.org, "Rafael J. Wysocki" <rjw@sisk.pl>,
	"Eric W. Biederman" <ebiederm@xmission.com>,
	Pavel Machek <pavel@ucw.cz>,
	Andrew Morton <akpm@linux-foundation.org>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	mingo@elte.hu, Vivek Goyal <vgoyal@redhat.com>
Subject: Re: [PATCH -v2 6/8] kexec jump: fix for lockdep
Date: Mon, 11 Aug 2008 08:09:54 +0200	[thread overview]
Message-ID: <1218434994.10800.16.camel@twins> (raw)
In-Reply-To: <1218416396.30464.9.camel@caritas-dev.intel.com>

On Mon, 2008-08-11 at 08:59 +0800, Huang Ying wrote:
> On Fri, 2008-08-08 at 12:13 +0200, Peter Zijlstra wrote:
> > On Fri, 2008-08-08 at 14:52 +0800, Huang Ying wrote:
> > > Replace local_irq_disable() with raw_local_irq_disable() to prevent
> > > lockdep complain.
> > Uhhm, please provide more information - just using raw_* to silence
> > lockdep is generally the wrong thing to do.
> 
> In traditional kexec, the new kernel will replace current one, so the
> irq is simply disabled. But now jumping back from kexeced kernel is
> supported, so the irq should be enabled again.
> 
> The code sequence of irq during kexec jump is as follow:
> 
> local_irq_disable(); /* in kernel_kexec() */
> local_irq_disable(); /* in machine_kexec() */
> local_irq_enable(); /* in kernel_kexec() */
> 
> The disable and enable is not match. Maybe another method is to use
> local_irq_save(), local_irq_restore() pair in machine_kexec(), so the
> disable and enable is matched.

And its the machine kernel's lockdep instance that goes complain?

whichever annotation gets used - and I think I can agree that raw_*
might be approriate there, this should be accompanied with a rather
elaborate changelog and preferably a comment in the code too. Without
such we'll be wondering in the years to come WTH happens here.



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

WARNING: multiple messages have this Message-ID (diff)
From: Peter Zijlstra <peterz@infradead.org>
To: Huang Ying <ying.huang@intel.com>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>,
	Pavel Machek <pavel@ucw.cz>,
	nigel@nigel.suspend2.net, "Rafael J. Wysocki" <rjw@sisk.pl>,
	Andrew Morton <akpm@linux-foundation.org>,
	Vivek Goyal <vgoyal@redhat.com>,
	mingo@elte.hu, Linus Torvalds <torvalds@linux-foundation.org>,
	linux-kernel@vger.kernel.org,
	Kexec Mailing List <kexec@lists.infradead.org>
Subject: Re: [PATCH -v2 6/8] kexec jump: fix for lockdep
Date: Mon, 11 Aug 2008 08:09:54 +0200	[thread overview]
Message-ID: <1218434994.10800.16.camel@twins> (raw)
In-Reply-To: <1218416396.30464.9.camel@caritas-dev.intel.com>

On Mon, 2008-08-11 at 08:59 +0800, Huang Ying wrote:
> On Fri, 2008-08-08 at 12:13 +0200, Peter Zijlstra wrote:
> > On Fri, 2008-08-08 at 14:52 +0800, Huang Ying wrote:
> > > Replace local_irq_disable() with raw_local_irq_disable() to prevent
> > > lockdep complain.
> > Uhhm, please provide more information - just using raw_* to silence
> > lockdep is generally the wrong thing to do.
> 
> In traditional kexec, the new kernel will replace current one, so the
> irq is simply disabled. But now jumping back from kexeced kernel is
> supported, so the irq should be enabled again.
> 
> The code sequence of irq during kexec jump is as follow:
> 
> local_irq_disable(); /* in kernel_kexec() */
> local_irq_disable(); /* in machine_kexec() */
> local_irq_enable(); /* in kernel_kexec() */
> 
> The disable and enable is not match. Maybe another method is to use
> local_irq_save(), local_irq_restore() pair in machine_kexec(), so the
> disable and enable is matched.

And its the machine kernel's lockdep instance that goes complain?

whichever annotation gets used - and I think I can agree that raw_*
might be approriate there, this should be accompanied with a rather
elaborate changelog and preferably a comment in the code too. Without
such we'll be wondering in the years to come WTH happens here.



  reply	other threads:[~2008-08-11  6:09 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-08  6:52 [PATCH -v2 6/8] kexec jump: fix for lockdep Huang Ying
2008-08-08  6:52 ` Huang Ying
2008-08-08 10:13 ` Peter Zijlstra
2008-08-08 10:13   ` Peter Zijlstra
2008-08-11  0:59   ` Huang Ying
2008-08-11  0:59     ` Huang Ying
2008-08-11  6:09     ` Peter Zijlstra [this message]
2008-08-11  6:09       ` Peter Zijlstra
2008-08-11  6:32       ` Huang Ying
2008-08-11  6:32         ` Huang Ying

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=1218434994.10800.16.camel@twins \
    --to=peterz@infradead.org \
    --cc=akpm@linux-foundation.org \
    --cc=ebiederm@xmission.com \
    --cc=kexec@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=nigel@nigel.suspend2.net \
    --cc=pavel@ucw.cz \
    --cc=rjw@sisk.pl \
    --cc=torvalds@linux-foundation.org \
    --cc=vgoyal@redhat.com \
    --cc=ying.huang@intel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.