Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1317640

Re: [RFC][PATCH 2/3] slub: Don't limit debugging to slow paths

From Paul Bolle <pebolle@tiscali.nl>
Newsgroups linux.kernel
Subject Re: [RFC][PATCH 2/3] slub: Don't limit debugging to slow paths
Date 2016-01-26 09:50 +0100
Message-ID <qV7u2-1y3-11@gated-at.bofh.it> (permalink)
References <qV0sy-46L-5@gated-at.bofh.it> <qV0sz-46L-25@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On ma, 2016-01-25 at 17:15 -0800, Laura Abbott wrote:
> --- a/init/Kconfig
> +++ b/init/Kconfig
 
> +config SLUB_DEBUG_FASTPATH
> +	bool "Allow SLUB debugging to utilize the fastpath"
> +	depends on SLUB_DEBUG
> +	help
> +	  SLUB_DEBUG forces all allocations to utilize the slow path which
> +	  is a performance penalty. Turning on this option lets the debugging
> +	  use the fast path. This helps the performance when debugging
> +	  features are turned on. If you aren't planning on utilizing any
> +	  of the SLUB_DEBUG features, you should say N here.
> +
> +	  If unsure, say N

> --- a/mm/slub.c
> +++ b/mm/slub.c

> +#ifdef SLUB_DEBUG_FASTPATH

I have no clue what your patch does, but I could spot this should
probably be
	#ifdef CONFIG_SLUB_DEBUG_FASTPATH

> +static noinline int alloc_debug_processing_fastpath(struct kmem_cache
> *s,
> +					struct kmem_cache_cpu *c,
> +					struct page *page,
> +					void *object, unsigned long
> tid,
> +					unsigned long addr)
> +{
> +	unsigned long flags;
> +	int ret = 0;
> +
> +	preempt_disable();
> +	local_irq_save(flags);
> +
> +	/*
> +	 * We've now disabled preemption and IRQs but we still need
> +	 * to check that this is the right CPU
> +	 */
> +	if (!this_cpu_cmpxchg_double(s->cpu_slab->freelist, s
> ->cpu_slab->tid,
> +				c->freelist, tid,
> +				c->freelist, tid))
> +		goto out;
> +
> +	ret = alloc_debug_processing(s, page, object, addr);
> +
> +out:
> +	local_irq_restore(flags);
> +	preempt_enable();
> +	return ret;
> +}
> +#else
> +static noinline int alloc_debug_processing_fastpath(struct kmem_cache
> *s,
> +					struct kmem_cache_cpu *c,
> +					struct page *page,
> +					void *object, unsigned long
> tid,
> +					unsigned long addr)
> +{
> +	return 1;
> +}
> +#endif

Thanks,


Paul Bolle

Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

[RFC][PATCH 0/3] Speed up SLUB poisoning + disable checks Laura Abbott <labbott@fedoraproject.org> - 2016-01-26 02:20 +0100
  [RFC][PATCH 1/3] slub: Drop lock at the end of free_debug_processing Laura Abbott <labbott@fedoraproject.org> - 2016-01-26 02:20 +0100
    Re: [RFC][PATCH 1/3] slub: Drop lock at the end of  free_debug_processing Christoph Lameter <cl@linux.com> - 2016-01-26 17:20 +0100
  [RFC][PATCH 2/3] slub: Don't limit debugging to slow paths Laura Abbott <labbott@fedoraproject.org> - 2016-01-26 02:20 +0100
    Re: [RFC][PATCH 2/3] slub: Don't limit debugging to slow paths Paul Bolle <pebolle@tiscali.nl> - 2016-01-26 09:50 +0100
  Re: [RFC][PATCH 0/3] Speed up SLUB poisoning + disable checks Joonsoo Kim <iamjoonsoo.kim@lge.com> - 2016-01-26 08:10 +0100
    Re: [RFC][PATCH 0/3] Speed up SLUB poisoning + disable checks Christoph Lameter <cl@linux.com> - 2016-01-26 16:10 +0100
      Re: [RFC][PATCH 0/3] Speed up SLUB poisoning + disable checks Joonsoo Kim <js1304@gmail.com> - 2016-01-26 16:30 +0100
  Re: [RFC][PATCH 0/3] Speed up SLUB poisoning + disable checks Christoph Lameter <cl@linux.com> - 2016-01-26 16:00 +0100

csiph-web