linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] remove preempt workaround in slab.c
@ 2002-09-24 20:50 Robert Love
  0 siblings, 0 replies; only message in thread
From: Robert Love @ 2002-09-24 20:50 UTC (permalink / raw)
  To: torvalds; +Cc: linux-kernel

[-- Attachment #1: Type: text/plain, Size: 307 bytes --]

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


[-- Attachment #2: preempt-remove-slab-rml-2.5.38-1.patch --]
[-- Type: text/x-patch, Size: 759 bytes --]

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;

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2002-09-24 20:45 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-09-24 20:50 [PATCH] remove preempt workaround in slab.c Robert Love

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).