lkml.org 
[lkml]   [2002]   [Sep]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Subject[PATCH] remove preempt workaround in slab.c
From
Date
Linus,

Before the irqs_disabled() check in preempt_schedule(), we worked around
some locking issues in slab.c. Now that we will never preempt with
interrupts disabled, we can remove those and clean things up.

This is courtesy of Manfred Spraul.

Patch is against current BK, please apply.

Robert Love

diff -urN linux-2.5.38/mm/slab.c linux/mm/slab.c
--- linux-2.5.38/mm/slab.c Mon Sep 23 21:43:41 2002
+++ linux/mm/slab.c Mon Sep 23 21:48:05 2002
@@ -1357,11 +1357,7 @@
cc_entry(cc)[cc->avail++] =
kmem_cache_alloc_one_tail(cachep, slabp);
}
- /*
- * CAREFUL: do not enable preemption yet, the per-CPU
- * entries rely on us being atomic.
- */
- _raw_spin_unlock(&cachep->spinlock);
+ spin_unlock(&cachep->spinlock);

if (cc->avail)
return cc_entry(cc)[--cc->avail];
@@ -1389,8 +1385,6 @@
STATS_INC_ALLOCMISS(cachep);
objp = kmem_cache_alloc_batch(cachep,flags);
local_irq_restore(save_flags);
- /* end of non-preemptible region */
- preempt_enable();
if (!objp)
goto alloc_new_slab_nolock;
return objp;
\
 
 \ /
  Last update: 2005-03-22 13:29    [from the cache]
©2003-2014 Jasper Spaans. Advertise on this site