mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 03:01:39 -04:00
[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 <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
0d8d4d42f2
commit
d59dd4620f
11 changed files with 31 additions and 31 deletions
|
|
@ -229,7 +229,7 @@ repeat_alloc:
|
|||
/* Now start performing page reclaim */
|
||||
gfp_temp = gfp_mask;
|
||||
prepare_to_wait(&pool->wait, &wait, TASK_UNINTERRUPTIBLE);
|
||||
mb();
|
||||
smp_mb();
|
||||
if (!pool->curr_nr)
|
||||
io_schedule();
|
||||
finish_wait(&pool->wait, &wait);
|
||||
|
|
@ -250,7 +250,7 @@ void mempool_free(void *element, mempool_t *pool)
|
|||
{
|
||||
unsigned long flags;
|
||||
|
||||
mb();
|
||||
smp_mb();
|
||||
if (pool->curr_nr < pool->min_nr) {
|
||||
spin_lock_irqsave(&pool->lock, flags);
|
||||
if (pool->curr_nr < pool->min_nr) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue