All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hugh Dickins <hughd@google.com>
To: Christoph Lameter <cl@linux.com>
Cc: Pekka Enberg <penberg@kernel.org>,
	Eric Dumazet <eric.dumazet@gmail.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	Wu Fengguang <fengguang.wu@intel.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH next/mmotm] slub: partly fix freeze in __slab_free
Date: Thu, 14 Jul 2011 09:14:07 -0700 (PDT)	[thread overview]
Message-ID: <alpine.LSU.2.00.1107140905030.4077@sister.anvils> (raw)
In-Reply-To: <alpine.DEB.2.00.1107131054270.29034@router.home>

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 <cl@linux.com>

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 <hughd@google.com>

> 
> 
> ---
>  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();
> 

  reply	other threads:[~2011-07-14 16:14 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-11 18:58 [PATCH next/mmotm] slub: partly fix freeze in __slab_free Hugh Dickins
2011-07-11 19:39 ` Eric Dumazet
2011-07-11 20:46   ` Hugh Dickins
2011-07-12  6:13   ` Pekka Enberg
2011-07-12 15:11     ` Christoph Lameter
2011-07-12 15:55       ` Christoph Lameter
2011-07-13 11:28         ` Hugh Dickins
2011-07-13 15:47           ` Christoph Lameter
2011-07-13 15:55             ` Christoph Lameter
2011-07-14 16:14               ` Hugh Dickins [this message]
2011-07-14 17:26                 ` Christoph Lameter
2011-07-15 19:22                   ` Hugh Dickins

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.LSU.2.00.1107140905030.4077@sister.anvils \
    --to=hughd@google.com \
    --cc=akpm@linux-foundation.org \
    --cc=cl@linux.com \
    --cc=eric.dumazet@gmail.com \
    --cc=fengguang.wu@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=penberg@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.