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.DEB.2.10.1405141114040.16512@gentwo.org>
Date:	Wed, 14 May 2014 11:16:36 -0500 (CDT)
From:	Christoph Lameter <cl@...ux.com>
To:	Vladimir Davydov <vdavydov@...allels.com>
cc:	hannes@...xchg.org, mhocko@...e.cz, akpm@...ux-foundation.org,
	linux-kernel@...r.kernel.org, linux-mm@...ck.org
Subject: Re: [PATCH RFC 1/3] slub: keep full slabs on list for per memcg
 caches

On Tue, 13 May 2014, Vladimir Davydov wrote:

> Currently full slabs are only kept on per-node lists for debugging, but
> we need this feature to reparent per memcg caches, so let's enable it
> for them too.

That will significantly impact the fastpaths for alloc and free.

Also a pretty significant change the logic of the fastpaths since they
were not designed to handle the full lists. In debug mode all operations
were only performed by the slow paths and only the slow paths so far
supported tracking full slabs.

> @@ -2587,6 +2610,9 @@ static void __slab_free(struct kmem_cache *s, struct page *page,
>
>  			} else { /* Needs to be taken off a list */
>
> +				if (kmem_cache_has_cpu_partial(s) && !prior)
> +					new.frozen = 1;
> +
>  	                        n = get_node(s, page_to_nid(page));

Make this code conditional?

>  				/*
>  				 * Speculatively acquire the list_lock.
> @@ -2606,6 +2632,12 @@ static void __slab_free(struct kmem_cache *s, struct page *page,
>  		object, new.counters,
>  		"__slab_free"));
>
> +	if (unlikely(n) && new.frozen && !was_frozen) {
> +		remove_full(s, n, page);
> +		spin_unlock_irqrestore(&n->list_lock, flags);
> +		n = NULL;
> +	}
> +
>  	if (likely(!n)) {

Here too.

--
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