[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAB4K4y7tkuXZQ=fAubWKVdbCZS4Zp0aYd0FK-Q6rzovjk0YUeg@mail.gmail.com>
Date: Thu, 29 Dec 2011 16:05:55 +0530
From: Ajeet Yadav <ajeet.yadav.77@...il.com>
To: Phillip Lougher <phillip@...ashfs.org.uk>,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] Squashfs: wake all waiting for unused cache entry
>From 4c7393143e4c2dfa7b5af87afc0e41842e8aba73 Mon Sep 17 00:00:00 2001
From: Ajeet Yadav <ajeet.yadav.77@...il.com>
Date: Thu, 29 Dec 2011 16:04:45 +0530
Subject: [PATCH] Squashfs: wake all waiting for unused cache entry
Current implementation considers the case where different
blocks are waiting for unused cache entry, but it does not
consider the case where all / most of the waits are for the
same block, in that case, its good to wait for only one entry
and allow all other waits to use the newly allocated cache
entry.
While debugging we found that the wait is mostly for the same
block, hence its good to use wake_up_all().
Signed-off-by: Ajeet Yadav <ajeet.yadav.77@...il.com>
---
fs/squashfs/cache.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/fs/squashfs/cache.c b/fs/squashfs/cache.c
index 30111a2..f035415 100644
--- a/fs/squashfs/cache.c
+++ b/fs/squashfs/cache.c
@@ -191,10 +191,10 @@ void squashfs_cache_put(struct
squashfs_cache_entry *entry)
cache->unused++;
/*
* If there's any processes waiting for a block to become
- * available, wake one up.
+ * available, wake them.
*/
if (cache->num_waiters)
- wake_up(&cache->wait_queue);
+ wake_up_all(&cache->wait_queue);
}
spin_unlock(&cache->lock);
}
--
1.6.0.3
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists