[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20110502141002.GK18376@redhat.com>
Date: Mon, 2 May 2011 17:10:03 +0300
From: Gleb Natapov <gleb@...hat.com>
To: "Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>
Cc: linux-kernel@...r.kernel.org, avi@...hat.com, mtosatti@...hat.com,
kvm@...r.kernel.org
Subject: Re: [PATCH 1/2] rcu: export rcu_note_context_switch() function
On Mon, May 02, 2011 at 06:36:08AM -0700, Paul E. McKenney wrote:
> On Mon, May 02, 2011 at 01:56:12PM +0300, Gleb Natapov wrote:
> > On Sat, Apr 30, 2011 at 05:59:28AM -0700, Paul E. McKenney wrote:
> > > On Fri, Apr 29, 2011 at 09:02:39PM +0300, Gleb Natapov wrote:
> > > > On Fri, Apr 29, 2011 at 01:39:04AM -0700, Paul E. McKenney wrote:
> > > > > On Fri, Apr 29, 2011 at 01:36:18AM -0700, Paul E. McKenney wrote:
> > > > > > On Thu, Apr 28, 2011 at 12:52:02PM +0300, Gleb Natapov wrote:
> > > > > >
> > > > > > Hmmm.... This is interesting. KVM being a module, we either expand
> > > > > > TINY_RCU's size a bit by making rcu_note_context_switch() be a real
> > > > > > function in rcutiny.c and adding an export, or we expand it by adding
> > > > > > two exports.
> > > > > >
> > > > > > I would like to solve this without making TINY_RCU larger, and preferably
> > > > > > by making it smaller. Any ideas come to mind? (Other than making
> > > > > > KVM depend on CONFIG_SMP, which sounds too much like throwing out the
> > > > > > baby with the bathwater.)
> > > > >
> > > > > Nothing quite like hitting "send" to make an idea show up...
> > > > >
> > > > > In a UP kernel, does it actually help anything to have KVM
> > > > > tell RCU about executing in a guest? If not, could we have a
> > > > > rcu_note_context_switch_kvm() that is a static inline empty function in
> > > > > TINY_RCU and maps to rcu_note_context_switch() for TREE_RCU?
> > > > >
> > > > That will work, but does making rcu_note_context_switch() out of line
> > > > actually increase kernel size? The function is called in two places
> > > > currently, so by making it out of line we make two calling site smaller.
> > > > Will measure it next week.
> > >
> > > One thing to keep in mind... Calling an out-of-line function from
> > > KVM requires an export, each of which significantly increases TINY_RCU's
> > > memory footprint.
> > >
> > > Thanx, Paul
> > >
> > How significantly? As I wrote in other mail I compiled two TINY_RCU
> > kernel with and without the patch and I didn't see memory footprint
> > increase at all. May be I measure it incorrectly, but what I see is that
> > with out of line function + export text section becomes 64 byte bigger, but
> > data section becomes 64 byte smaller:
> >
> > text data bss dec hex filename
> > 4544134 590596 2023424 7158154 6d398a vmlinux inline
> > 4544198 590532 2023424 7158154 6d398a vmlinux.ol out of line
>
> Did you add the exports that would be needed to allow KVM to call
> the functions in the inline case?
>
Yes, this is with and without patch applied. When patch is applied the
function is out of line and exported.
--
Gleb.
--
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