lkml.org 
[lkml]   [2008]   [Jan]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 01/23 -v6] printk - dont wakeup klogd with interrupts disabled

On Sat, 26 Jan 2008, Steven Rostedt wrote:
> Correct. The only race that this patch has is that there's a slight chance
> you wont wake up the klogd when you could.
>
> CPU0 CPU1
>
> locks_runqueue(cpu0)
>
> if (!runqueue_is_locked())
> [fails and klogd not woken]
>
>
> But this is rare and pretty harmless. But it can be trivally fixed and
> should be. But I'll rename the API to
>
> current_has_runqueue_lock()
>
> This way we know exactly why it returns what it returns.

Hmm, I'm thinking too much about RT where we can see who owns the locks.
It isn't trivial to see if current has the lock without putting in more
logic into the taking of the rq lock, which is unneeded overhead.

I think the patch as is is good enough then. The worst that can happen is
that we don't wake up klogd, and that should not be too often.

-- Steve



\
 
 \ /
  Last update: 2008-01-26 14:51    [W:0.084 / U:0.196 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site