From: Johannes Weiner <hannes@cmpxchg.org>
To: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Cc: linux-mm@kvack.org, Peter Zijlstra <peterz@infradead.org>,
Andrew Morton <akpm@linux-foundation.org>,
Thomas Gleixner <tglx@linutronix.de>
Subject: Re: [PATCH v2] mm: workingset: replace IRQ-off check with a lockdep assert.
Date: Mon, 11 Feb 2019 13:53:18 -0500 [thread overview]
Message-ID: <20190211185318.GA13953@cmpxchg.org> (raw)
In-Reply-To: <20190211113829.sqf6bdi4c4cdd3rp@linutronix.de>
On Mon, Feb 11, 2019 at 12:38:29PM +0100, Sebastian Andrzej Siewior wrote:
> Commit
>
> 68d48e6a2df57 ("mm: workingset: add vmstat counter for shadow nodes")
>
> introduced an IRQ-off check to ensure that a lock is held which also
> disabled interrupts. This does not work the same way on -RT because none
> of the locks, that are held, disable interrupts.
> Replace this check with a lockdep assert which ensures that the lock is
> held.
>
> Cc: Peter Zijlstra <peterz@infradead.org>
> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
I'm not against checking for the lock, but if IRQs aren't disabled,
what ensures __mod_lruvec_state() is safe? I'm guessing it's because
preemption is disabled and irq handlers are punted to process context.
That said, it seems weird to me that
spin_lock_irqsave();
BUG_ON(!irqs_disabled());
spin_unlock_irqrestore();
would trigger. Wouldn't it make sense to have a raw_irqs_disabled() or
something and keep the irqs_disabled() abstraction layer intact?
next prev parent reply other threads:[~2019-02-11 18:53 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-11 9:57 [PATCH] " Sebastian Andrzej Siewior
2019-02-11 11:38 ` [PATCH v2] " Sebastian Andrzej Siewior
2019-02-11 18:53 ` Johannes Weiner [this message]
2019-02-11 19:13 ` Sebastian Andrzej Siewior
2019-02-11 19:17 ` Matthew Wilcox
2019-02-11 19:41 ` Sebastian Andrzej Siewior
2019-02-11 21:02 ` Johannes Weiner
2019-02-13 9:27 ` Sebastian Andrzej Siewior
2019-02-13 14:56 ` Johannes Weiner
2019-08-21 11:21 ` Sebastian Andrzej Siewior
2019-08-21 15:21 ` Johannes Weiner
2019-02-11 17:07 ` [PATCH] " kbuild test robot
2019-02-11 17:37 ` kbuild test robot
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=20190211185318.GA13953@cmpxchg.org \
--to=hannes@cmpxchg.org \
--cc=akpm@linux-foundation.org \
--cc=bigeasy@linutronix.de \
--cc=linux-mm@kvack.org \
--cc=peterz@infradead.org \
--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