aboutsummaryrefslogtreecommitdiffstats
path: root/mm/mempool.c
diff options
context:
space:
mode:
authorakpm@osdl.org <akpm@osdl.org>2005-05-01 11:58:47 -0400
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-05-01 11:58:47 -0400
commitd59dd4620fb8d6422555a9e2b82a707718e68327 (patch)
tree78205657d24efcaa3f8314064951ac3814ed95a7 /mm/mempool.c
parent0d8d4d42f2d00eb65262b49f4edd4cf7ef4eb6fc (diff)
[PATCH] use smp_mb/wmb/rmb where possible
Replace a number of memory barriers with smp_ variants. This means we won't take the unnecessary hit on UP machines. Signed-off-by: Anton Blanchard <anton@samba.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'mm/mempool.c')
-rw-r--r--mm/mempool.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/mm/mempool.c b/mm/mempool.c
index e9a0a6337b21..c9f3d4620428 100644
--- a/mm/mempool.c
+++ b/mm/mempool.c
@@ -229,7 +229,7 @@ repeat_alloc:
229 /* Now start performing page reclaim */ 229 /* Now start performing page reclaim */
230 gfp_temp = gfp_mask; 230 gfp_temp = gfp_mask;
231 prepare_to_wait(&pool->wait, &wait, TASK_UNINTERRUPTIBLE); 231 prepare_to_wait(&pool->wait, &wait, TASK_UNINTERRUPTIBLE);
232 mb(); 232 smp_mb();
233 if (!pool->curr_nr) 233 if (!pool->curr_nr)
234 io_schedule(); 234 io_schedule();
235 finish_wait(&pool->wait, &wait); 235 finish_wait(&pool->wait, &wait);
@@ -250,7 +250,7 @@ void mempool_free(void *element, mempool_t *pool)
250{ 250{
251 unsigned long flags; 251 unsigned long flags;
252 252
253 mb(); 253 smp_mb();
254 if (pool->curr_nr < pool->min_nr) { 254 if (pool->curr_nr < pool->min_nr) {
255 spin_lock_irqsave(&pool->lock, flags); 255 spin_lock_irqsave(&pool->lock, flags);
256 if (pool->curr_nr < pool->min_nr) { 256 if (pool->curr_nr < pool->min_nr) {