lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.LSU.2.00.1107140905030.4077@sister.anvils>
Date:	Thu, 14 Jul 2011 09:14:07 -0700 (PDT)
From:	Hugh Dickins <hughd@...gle.com>
To:	Christoph Lameter <cl@...ux.com>
cc:	Pekka Enberg <penberg@...nel.org>,
	Eric Dumazet <eric.dumazet@...il.com>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Wu Fengguang <fengguang.wu@...el.com>,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH next/mmotm] slub: partly fix freeze in __slab_free

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@...ux.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@...gle.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();
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ