From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755393Ab1GNQO2 (ORCPT ); Thu, 14 Jul 2011 12:14:28 -0400 Received: from smtp-out.google.com ([74.125.121.67]:47514 "EHLO smtp-out.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755271Ab1GNQO0 (ORCPT ); Thu, 14 Jul 2011 12:14:26 -0400 DomainKey-Signature: a=rsa-sha1; s=beta; d=google.com; c=nofws; q=dns; h=dkim-signature:date:from:x-x-sender:to:cc:subject: in-reply-to:message-id:references:user-agent:mime-version:content-type:x-system-of-record; b=rdulsfoMyMPTejOpIsrCmoxhCw6Gd5H2JrN4geAmAKKAbDvztd72HsUYillhjR4sf ED65DKbJBTemWePrhwxXA== Date: Thu, 14 Jul 2011 09:14:07 -0700 (PDT) From: Hugh Dickins X-X-Sender: hugh@sister.anvils To: Christoph Lameter cc: Pekka Enberg , Eric Dumazet , Andrew Morton , Wu Fengguang , linux-kernel@vger.kernel.org Subject: Re: [PATCH next/mmotm] slub: partly fix freeze in __slab_free In-Reply-To: Message-ID: References: <1310413167.2860.3.camel@edumazet-laptop> <4E1BE5F9.10401@kernel.org> User-Agent: Alpine 2.00 (LSU 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-System-Of-Record: true Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 13 Jul 2011, Christoph Lameter wrote: > > Subject: slub: disable interrupts in cmpxchg_double_slab when falling back to pagelock. > > Disable interrupts when falling back to the use of the page lock in > cmpxchg_double_slab(). > > Becomes necessary since __slab_free will call cmpxchg_double_slab without disabling > interrupts. > > A bit bad because the invocations from the allocation path of cmpxchg_double_slab > occur with interrupts already disabled (but there are plans to enable > interrupts there as well in the future). > > Signed-off-by: Christoph Lameter Success, thank you: I ran my load for 22 hours on the ppc64, no problem this time, where before it froze in 2.5 hours. I was running rc6-mm1 plus this patch, plus (my transcription of) your mm_types.h struct page patch, plus Fengguang's redirty_tail patch; leaving out my "*new = page" patch which kicked this thread off. Feel free to add Tested-by: Hugh Dickins > > > --- > mm/slub.c | 5 +++++ > 1 file changed, 5 insertions(+) > > Index: linux-2.6/mm/slub.c > =================================================================== > --- linux-2.6.orig/mm/slub.c 2011-07-13 10:51:07.867138834 -0500 > +++ linux-2.6/mm/slub.c 2011-07-13 10:51:20.957138752 -0500 > @@ -368,14 +368,19 @@ static inline bool cmpxchg_double_slab(s > } else > #endif > { > + unsigned long flags; > + > + local_irq_save(flags); > slab_lock(page); > if (page->freelist == freelist_old && page->counters == counters_old) { > page->freelist = freelist_new; > page->counters = counters_new; > slab_unlock(page); > + local_irq_restore(flags); > return 1; > } > slab_unlock(page); > + local_irq_restore(flags); > } > > cpu_relax(); >