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.00.1003190730440.9184@router.home>
Date:	Fri, 19 Mar 2010 07:34:07 -0500 (CDT)
From:	Christoph Lameter <cl@...ux-foundation.org>
To:	Lai Jiangshan <laijs@...fujitsu.com>
cc:	Mathieu Desnoyers <mathieu.desnoyers@...icios.com>,
	"Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>, mingo@...e.hu,
	akpm@...ux-foundation.org, dipankar@...ibm.com,
	josh@...htriplett.org, dvhltc@...ibm.com, niv@...ibm.com,
	tglx@...utronix.de, peterz@...radead.org, rostedt@...dmis.org,
	Valdis.Kletnieks@...edu, dhowells@...hat.com,
	eric.dumazet@...il.com, Alexey Dobriyan <adobriyan@...il.com>,
	Peter Zijlstra <a.p.zijlstra@...llo.nl>,
	linux-kernel@...r.kernel.org, Pekka Enberg <penberg@...helsinki.fi>
Subject: Re: [PATCH] tree/tiny rcu: Add debug RCU head option (v2)

On Fri, 19 Mar 2010, Lai Jiangshan wrote:

> but SLUB opposed me, so I did not post it.
>
> @ slub.c
> static void free_slab(struct kmem_cache *s, struct page *page)
> {
> 	if (unlikely(s->flags & SLAB_DESTROY_BY_RCU)) {
> 		/*
> 		 * RCU free overloads the RCU head over the LRU
> 		 */
> 		struct rcu_head *head = (void *)&page->lru;
>
> 		call_rcu(head, rcu_free_slab);
> 	} else
> 		__free_slab(s, page);
> }
>
> I think it is not your patch's fault, but the above code has
> already existed.
>
> In your patch, struct rcu_head::debug will share the same memory of
> the other field of struct page, (especially share the struct page::flags
> which I encountered)

Right. I like the smallness of the RCU structure but if you must
increase its size then we could:

A) put the rcu structure at the end of each page like SLOB
   but that will take away memory that could be used by objects.

B) Move the rcu object up by a word so that it overloads the index field
   in the page struct. That would give another exact fit but will cause
   trouble again if you bloat the structure some more.

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