mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Stefan Richter <stefanr@s5r6.in-berlin.de>
To: Ingo Molnar <mingo@elte.hu>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>,
	Andrew Morton <akpm@linux-foundation.org>,
	linux-kernel@vger.kernel.org, Jay Fenlason <fenlason@redhat.com>
Subject: Re: On "ratelimit: Use per ratelimit context locking"
Date: Tue, 29 Dec 2009 02:56:04 +0100	[thread overview]
Message-ID: <4B3961B4.9000405@s5r6.in-berlin.de> (raw)
In-Reply-To: <20091228095314.GI24690@elte.hu>

Ingo Molnar wrote:
> There used to be a global lock:
> 
>   static DEFINE_SPINLOCK(ratelimit_lock);
> 
> which is now per ratelimit context. The case i was after was to use the 
> ratelimit state from NMI context. With NMIs we can lock up if an NMI hits when 
> some other code uses the ratelimit code. It's a small but existing race 
> window.

Ah, I see.

> OTOH, IRQ context use of printk ratelimit was safe before (and after) this 
> commit - so i think your code should be safe too.

Thanks for the explanation; that's reassuring.
-- 
Stefan Richter
-=====-==--= ==-- ===-=
http://arcgraph.de/sr/

      reply	other threads:[~2009-12-29  2:02 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-20 11:39 Stefan Richter
2009-12-28  9:53 ` Ingo Molnar
2009-12-29  1:56   ` Stefan Richter [this message]

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=4B3961B4.9000405@s5r6.in-berlin.de \
    --to=stefanr@s5r6.in-berlin.de \
    --cc=a.p.zijlstra@chello.nl \
    --cc=akpm@linux-foundation.org \
    --cc=fenlason@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    /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

all inboxes | Powered by JetHome®