[PATCH] Squashfs: wake all waiting for unused cache entry

From: Ajeet Yadav
Date: Thu Dec 29 2011 - 05:15:58 EST

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
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@xxxxxxxxx>
fs/squashfs/cache.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/fs/squashfs/cache.c b/fs/squashfs/cache.c
index 30111a2..44ceecf 100644
--- a/fs/squashfs/cache.c
+++ b/fs/squashfs/cache.c
@@ -194,7 +194,7 @@ void squashfs_cache_put(struct squashfs_cache_entry *entry)
* available, wake one up.
if (cache->num_waiters)
- wake_up(&cache->wait_queue);
+ wake_up_all(&cache->wait_queue);
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/