linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: John Kacur <jkacur@redhat.com>
To: lkml <linux-kernel@vger.kernel.org>
Cc: Thomas Gleixner <tglx@linutronix.de>, Ingo Molnar <mingo@elte.hu>,
	Andrew Morton <akpm@linux-foundation.org>,
	KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>,
	Rik van Riel <riel@redhat.com>,
	Johannes Weiner <hannes@cmpxchg.org>,
	Minchan Kim <minchan.kim@gmail.com>,
	linux-mm@kvack.org, Steven@kvack.org,
	"Rostedt <rostedt"@goodmis.org, John Kacur <jkacur@redhat.com>
Subject: [RFC][PATCH] vmscan: Unbalanced local_irq_disable and enable
Date: Wed,  3 Feb 2010 20:53:20 +0100	[thread overview]
Message-ID: <1265226801-6199-1-git-send-email-jkacur@redhat.com> (raw)

I was inspecting this code as I was trying to port some -rt patches to 
2.6.33-rcX and it looks quite unusual. It is possible that it is working as
designed and there is nothing wrong with it, so I would like your comments.

Normally a call to local_irq_disable() would be balanced by a call to
local_irq_enable(). Furthermore a call to spin_lock() would be balanced by
a call to spin_unlock() and not to spin_unlock_irq()

However, the call to spin_unlock_irq() will call local_irq_enable()
so that will take care of the unbalanced local_irq_disable.
Still it seems strange.

The patch that I am providing here, is what I think the code SHOULD look like
just based on inspection, it is not at all well testing, I'm just providing
it to illustrate what at least looks wrong with the current code.

Thanks

John Kacur (1):
  vmscan: balance local_irq_disable() and local_irq_enable()

 mm/vmscan.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

             reply	other threads:[~2010-02-03 19:53 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-03 19:53 John Kacur [this message]
2010-02-03 19:53 ` [RFC][PATCH] vmscan: balance local_irq_disable() and local_irq_enable() John Kacur
2010-02-03 20:09   ` Steven Rostedt
2010-02-03 20:12     ` John Kacur
2010-02-04  0:22       ` KOSAKI Motohiro
2010-02-05 16:05         ` John Kacur

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=1265226801-6199-1-git-send-email-jkacur@redhat.com \
    --to=jkacur@redhat.com \
    --cc="Rostedt <rostedt"@goodmis.org \
    --cc=Steven@kvack.org \
    --cc=akpm@linux-foundation.org \
    --cc=hannes@cmpxchg.org \
    --cc=kosaki.motohiro@jp.fujitsu.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=minchan.kim@gmail.com \
    --cc=mingo@elte.hu \
    --cc=riel@redhat.com \
    --cc=tglx@linutronix.de \
    /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).