lkml.org 
[lkml]   [2006]   [Feb]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] add execute_in_process_context() API
Andi Kleen <ak@suse.de> wrote:
>
> James Bottomley <James.Bottomley@SteelEye.com> writes:
>
> In general this seems like a lot of code for a simple problem.
> It might be simpler to just put the work structure into the parent
> object and do the workqueue unconditionally
>

That apparently would have really bad performance problems. If we're
!in_interrupt() we want to do the work synchronously.

But yes, if we can embed the work_struct inside the structure which the
callback will operate on

> > + if (unlikely(!wqw)) {
> > + printk(KERN_ERR "Failed to allocate memory\n");
> > + WARN_ON(1);
>
> WARN_ON for GFP_ATOMIC failure is bad. It is not really a bug.

it will solve this problem. (And I think is is a problem: if the
allocation fails, we leak things?)

-
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: 2006-02-08 09:21    [W:0.044 / U:0.448 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site