Re: [PATCH] kernel/async.c:introduce async_schedule*_atomic

From: Cornelia Huck
Date: Tue May 12 2009 - 13:19:03 EST


On Tue, 12 May 2009 18:52:29 +0200,
Frederic Weisbecker <fweisbec@xxxxxxxxx> wrote:

> This division would make more sense indeed.
>
> - async_schedule_inatomic() would be nosync() and would use
> GFP_ATOMIC. I guess the case where we want to run
> a job synchronously from atomic in case of async failure is too rare
> (non-existent?).

It would add complexity for those callers providing a function that is
safe to be called in both contexts.

> - async_schedule_nosync() would be only nosync() and would use
> GFP_KERNEL
>
> I'm not sure the second case will ever be used though.

It might make sense for the "just fail if we cannot get memory" case.

>
> Another alternative would be to define a single async_schedule_nosync()
> which also takes a gfp flag.

Wouldn't async_schedule() then need a gfp flag as well?
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/