From: Peter Zijlstra <peterz@infradead.org>
To: Matthew Wilcox <matthew@wil.cx>
Cc: Petr Tesarik <ptesarik@suse.cz>,
linux-kernel@vger.kernel.org, linux-ia64@vger.kernel.org,
tee@sgi.com, Ingo Molnar <mingo@elte.hu>
Subject: Re: [PATCH 1/2] Allow rwlocks to re-enable interrupts
Date: Wed, 22 Oct 2008 19:19:43 +0000 [thread overview]
Message-ID: <1224703183.20069.55.camel@twins> (raw)
In-Reply-To: <20081022190510.GH26094@parisc-linux.org>
On Wed, 2008-10-22 at 13:05 -0600, Matthew Wilcox wrote:
> On Wed, Oct 22, 2008 at 07:24:31PM +0200, Peter Zijlstra wrote:
> > > No problem. I could then also use it for _spin_lock_irqsave, if the
> > > answer to the above question is use CONFIG_LOCK_STAT there as well.
> >
> > If you create LOCK_CONTEDED_FLAGS() the whole issue goes away nicely.
Gah, I looked at it again, and that #ifdef isn't only to select between
LOCK_CONTENDED and not, but we can't actually have the re-enable for
anything lockdep.
So I was wrong.
> Should it also be used for _spin_lock_irq()? I'm puzzled why it's only
> used for _irqsave().
Right, not sure how this maze is done.
The thing is, with spin_lock_irq() you know the irq state and can do the
enable unconditionally - then again, with ticket locks we cannot do it
at all.
The _flags() version needs the flags to see if irqs was enabled before
we entered the op, if it wasn't we cannot go around enabling them.
> (should _spin_lock_bh() re-enable BHs while waiting? Is it just not big
> enough of a deal?)
Doubt it.. dunno.. personally I'd rather see softirqs die sooner rather
than later.
WARNING: multiple messages have this Message-ID (diff)
From: Peter Zijlstra <peterz@infradead.org>
To: Matthew Wilcox <matthew@wil.cx>
Cc: Petr Tesarik <ptesarik@suse.cz>,
linux-kernel@vger.kernel.org, linux-ia64@vger.kernel.org,
tee@sgi.com, Ingo Molnar <mingo@elte.hu>
Subject: Re: [PATCH 1/2] Allow rwlocks to re-enable interrupts
Date: Wed, 22 Oct 2008 21:19:43 +0200 [thread overview]
Message-ID: <1224703183.20069.55.camel@twins> (raw)
In-Reply-To: <20081022190510.GH26094@parisc-linux.org>
On Wed, 2008-10-22 at 13:05 -0600, Matthew Wilcox wrote:
> On Wed, Oct 22, 2008 at 07:24:31PM +0200, Peter Zijlstra wrote:
> > > No problem. I could then also use it for _spin_lock_irqsave, if the
> > > answer to the above question is use CONFIG_LOCK_STAT there as well.
> >
> > If you create LOCK_CONTEDED_FLAGS() the whole issue goes away nicely.
Gah, I looked at it again, and that #ifdef isn't only to select between
LOCK_CONTENDED and not, but we can't actually have the re-enable for
anything lockdep.
So I was wrong.
> Should it also be used for _spin_lock_irq()? I'm puzzled why it's only
> used for _irqsave().
Right, not sure how this maze is done.
The thing is, with spin_lock_irq() you know the irq state and can do the
enable unconditionally - then again, with ticket locks we cannot do it
at all.
The _flags() version needs the flags to see if irqs was enabled before
we entered the op, if it wasn't we cannot go around enabling them.
> (should _spin_lock_bh() re-enable BHs while waiting? Is it just not big
> enough of a deal?)
Doubt it.. dunno.. personally I'd rather see softirqs die sooner rather
than later.
next prev parent reply other threads:[~2008-10-22 19:19 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-22 8:33 [PATCH 0/2] enable irqs when waiting for rwlocks Petr Tesarik
2008-10-22 8:33 ` Petr Tesarik
2008-10-22 8:34 ` [PATCH 1/2] Allow rwlocks to re-enable interrupts Petr Tesarik
2008-10-22 8:34 ` Petr Tesarik
2008-10-22 8:45 ` Peter Zijlstra
2008-10-22 8:45 ` Peter Zijlstra
2008-10-22 8:58 ` Petr Tesarik
2008-10-22 8:58 ` Petr Tesarik
2008-10-22 17:24 ` Peter Zijlstra
2008-10-22 17:24 ` Peter Zijlstra
2008-10-22 19:05 ` Matthew Wilcox
2008-10-22 19:05 ` Matthew Wilcox
2008-10-22 19:19 ` Peter Zijlstra [this message]
2008-10-22 19:19 ` Peter Zijlstra
2008-10-22 17:31 ` [PATCH 0/2] enable irqs when waiting for rwlocks Rick Jones
2008-10-22 17:31 ` Rick Jones
2008-10-23 14:12 ` Robin Holt
2008-10-23 14:12 ` Robin Holt
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=1224703183.20069.55.camel@twins \
--to=peterz@infradead.org \
--cc=linux-ia64@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=matthew@wil.cx \
--cc=mingo@elte.hu \
--cc=ptesarik@suse.cz \
--cc=tee@sgi.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.