From: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
To: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
Cc: Christoph Lameter <cl@linux-foundation.org>,
Lai Jiangshan <laijs@cn.fujitsu.com>,
mingo@elte.hu, akpm@linux-foundation.org, dipankar@in.ibm.com,
josh@joshtriplett.org, dvhltc@us.ibm.com, niv@us.ibm.com,
tglx@linutronix.de, peterz@infradead.org, rostedt@goodmis.org,
Valdis.Kletnieks@vt.edu, dhowells@redhat.com,
eric.dumazet@gmail.com, Alexey Dobriyan <adobriyan@gmail.com>,
Peter Zijlstra <a.p.zijlstra@chello.nl>,
linux-kernel@vger.kernel.org,
Pekka Enberg <penberg@cs.helsinki.fi>
Subject: Re: [PATCH] tree/tiny rcu: Add debug RCU head option (v2)
Date: Fri, 19 Mar 2010 12:56:38 -0400 [thread overview]
Message-ID: <20100319165637.GA28123@Krystal> (raw)
In-Reply-To: <20100319144434.GA2520@linux.vnet.ibm.com>
* Paul E. McKenney (paulmck@linux.vnet.ibm.com) wrote:
> On Fri, Mar 19, 2010 at 07:34:07AM -0500, Christoph Lameter wrote:
> > 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.
>
> The size increase is strictly under a debug option -- the non-debug
> size remains the same as always. And I expect that in the longer term,
> we will be able to shrink the size back down even with this debug option
> available.
>
> One question: do any of the other allocators care about the size of the
> struct rcu_head? If not, a temporary work-around would be to simply
> prohibit use of this debug option when running with SLUB.
>
> Thanx, Paul
Don't worry about the struct rcu_head size too much. I'm currently working on a
debugobjects implementation. I should have something by the end of the day.
Thanks,
Mathieu
--
Mathieu Desnoyers
Operating System Efficiency R&D Consultant
EfficiOS Inc.
http://www.efficios.com
next prev parent reply other threads:[~2010-03-19 16:56 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-19 1:30 [PATCH] tree/tiny rcu: Add debug RCU head option (v2) Mathieu Desnoyers
2010-03-19 2:08 ` Paul E. McKenney
2010-03-19 2:33 ` Mathieu Desnoyers
2010-03-19 4:13 ` Lai Jiangshan
2010-03-19 5:05 ` Paul E. McKenney
2010-03-19 12:59 ` Mathieu Desnoyers
2010-03-19 13:54 ` Mathieu Desnoyers
2010-03-19 12:34 ` Christoph Lameter
2010-03-19 14:44 ` Paul E. McKenney
2010-03-19 16:56 ` Mathieu Desnoyers [this message]
2010-03-19 17:11 ` Paul E. McKenney
2010-03-22 14:37 ` Christoph Lameter
2010-03-22 15:56 ` Paul E. McKenney
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=20100319165637.GA28123@Krystal \
--to=mathieu.desnoyers@efficios.com \
--cc=Valdis.Kletnieks@vt.edu \
--cc=a.p.zijlstra@chello.nl \
--cc=adobriyan@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=cl@linux-foundation.org \
--cc=dhowells@redhat.com \
--cc=dipankar@in.ibm.com \
--cc=dvhltc@us.ibm.com \
--cc=eric.dumazet@gmail.com \
--cc=josh@joshtriplett.org \
--cc=laijs@cn.fujitsu.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=niv@us.ibm.com \
--cc=paulmck@linux.vnet.ibm.com \
--cc=penberg@cs.helsinki.fi \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.org \
--cc=tglx@linutronix.de \
/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.