lkml.org 
[lkml]   [2005]   [Feb]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Real-Time Preemption and GFP_ATOMIC

* Kevin Hilman <kevin@hilman.org> wrote:

> To produce the following trace, I wrote a simple moudle which just has
> this as its init_module routine:
>
> local_irq_disable();
> p = __get_free_page(GFP_ATOMIC);
> local_irq_enable();

in the PREEMPT_RT kernel almost everything might sleep, so the general
rule is to not call anything 'complex' from an IRQs-off section.
Depending on which is easier in your code, if you want to fix it up for
PREEMPT_RT then either move the GFP_ATOMIC allocation from under the
irqs-off section, or introduce a spinlock for the irqs-off section and
use spin_lock_irqsave(). (that is almost always needed anyway if you
really needed the irqs-off section.)

Ingo
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:10    [W:0.058 / U:0.268 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site