lkml.org 
[lkml]   [2009]   [Sep]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [tip:core/printk] ratelimit: Fix/allow use in atomic contexts



On Tue, 22 Sep 2009, tip-bot for Ingo Molnar wrote:
>
> ratelimit: Fix/allow use in atomic contexts
>
> I'd like to use printk_ratelimit() in NMI context, but it's not
> robust right now due to spinlock usage in lib/ratelimit.c. If an
> NMI is unlucky enough to hit just that spot we might lock up trying
> to take the spinlock again.
>
> Fix that by using a trylock variant. If we contend on that lock we
> can genuinely skip the message because the state is just being
> accessed by another CPU (or by this CPU).

Ack to both this and the patch leading up to it. Looks sane and simple.

Linus


\
 
 \ /
  Last update: 2009-10-18 23:28    [W:0.039 / U:0.332 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site