lkml.org 
[lkml]   [2008]   [Mar]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: use of preempt_count instead of in_atomic() at leds-gpio.c
Date
On Friday 21 March 2008 21:16:48 Michael Buesch wrote:
> On Friday 21 March 2008 20:59:50 Andrew Morton wrote:
> > They could of course be switched to using
> > kmalloc(GFP_ATOMIC)+memcpy()+schedule_task(). That's rather slow, but this
> > is not a performance-sensitive area. But more seriously, this could lead
> > to messages getting lost from a dying machine.
>
> Well, IMO drivers that need to sleep to transmit some data (to whatever,
> the screen or something) are not useful for debugging a crashing kernel anyway.
> Or how high is the possibility that it'd survive the actual sleep in the
> memory allocation? I'd say almost zero.
> So that schedule_task() is not that bad.

and

transmit_data_func()
{
if (!oops_in_progress) {
schedule_transmission_for_later();
} else {
/* We crash anyway, so we don't care about
* possible deadlocks from memory alloc sleeps
* or whatever. */
close_eyes_and_transmit_it_now();
}
}


--
Greetings Michael.


\
 
 \ /
  Last update: 2008-03-21 21:25    [W:0.270 / U:0.944 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site