diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-01-09 15:32:26 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-01-09 15:32:26 -0800 |
commit | 9a100a4464917b5ffff3a8ce1c2758088fd9bb32 (patch) | |
tree | 2c0e42dd23907dbdff147fa0097ccc2ef7be9ae1 /kernel | |
parent | 0d34052dfeba307ebc18d2f672e80e3f419714d4 (diff) | |
parent | cdb80f630be5cbc23d82331f24dc4704f75b64f4 (diff) | |
download | blackbird-op-linux-9a100a4464917b5ffff3a8ce1c2758088fd9bb32.tar.gz blackbird-op-linux-9a100a4464917b5ffff3a8ce1c2758088fd9bb32.zip |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/arjan/linux-2.6-async-2
* git://git.kernel.org/pub/scm/linux/kernel/git/arjan/linux-2.6-async-2:
async: make async a command line option for now
partial revert of asynchronous inode delete
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/async.c | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/kernel/async.c b/kernel/async.c index 64cc916299a5..f286e9f2b736 100644 --- a/kernel/async.c +++ b/kernel/async.c @@ -65,6 +65,8 @@ static LIST_HEAD(async_pending); static LIST_HEAD(async_running); static DEFINE_SPINLOCK(async_lock); +static int async_enabled = 0; + struct async_entry { struct list_head list; async_cookie_t cookie; @@ -169,7 +171,7 @@ static async_cookie_t __async_schedule(async_func_ptr *ptr, void *data, struct l * If we're out of memory or if there's too much work * pending already, we execute synchronously. */ - if (!entry || atomic_read(&entry_count) > MAX_WORK) { + if (!async_enabled || !entry || atomic_read(&entry_count) > MAX_WORK) { kfree(entry); spin_lock_irqsave(&async_lock, flags); newcookie = next_cookie++; @@ -316,8 +318,18 @@ static int async_manager_thread(void *unused) static int __init async_init(void) { - kthread_run(async_manager_thread, NULL, "async/mgr"); + if (async_enabled) + kthread_run(async_manager_thread, NULL, "async/mgr"); return 0; } +static int __init setup_async(char *str) +{ + async_enabled = 1; + return 1; +} + +__setup("fastboot", setup_async); + + core_initcall(async_init); |