From: Scott Wood <scottwood@freescale.com>
To: Pranith Kumar <bobby.prani@gmail.com>
Cc: "open list:S390" <linux-s390@vger.kernel.org>,
Lai Jiangshan <laijs@cn.fujitsu.com>,
Christian Borntraeger <borntraeger@de.ibm.com>,
"open list:LINUX FOR POWERPC..." <linuxppc-dev@lists.ozlabs.org>,
Heiko Carstens <heiko.carstens@de.ibm.com>,
Josh Triplett <josh@joshtriplett.org>,
Steven Rostedt <rostedt@goodmis.org>,
open list <linux-kernel@vger.kernel.org>,
Tiejun Chen <tiejun.chen@windriver.com>,
Jens Freimann <jfrei@linux.vnet.ibm.com>,
Paul Mackerras <paulus@samba.org>,
Anton Blanchard <anton@samba.org>,
Andy Fleming <afleming@freescale.com>,
Martin Schwidefsky <schwidefsky@de.ibm.com>,
"supporter:S390" <linux390@de.ibm.com>,
"Paul E. McKenney" <paulmck@linux.vnet.ibm.com>,
Daniel Walter <dwalter@google.com>,
Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Subject: Re: [PATCH] srcu: Isolate srcu sections using CONFIG_SRCU
Date: Tue, 30 Dec 2014 13:44:32 -0600 [thread overview]
Message-ID: <1419968672.4961.4.camel@freescale.com> (raw)
In-Reply-To: <CAJhHMCDan+qaaZjVUucA-sUS8A3vSTYuVHg8XQv4rsHXxAzKLw@mail.gmail.com>
On Mon, 2014-12-29 at 23:32 -0500, Pranith Kumar wrote:
> On Mon, Dec 29, 2014 at 5:03 AM, Martin Schwidefsky
> <schwidefsky@de.ibm.com> wrote:
> > On Sat, 27 Dec 2014 12:17:43 -0500
> > Pranith Kumar <bobby.prani@gmail.com> wrote:
> >
> >> @@ -65,10 +65,13 @@
> >> #include <asm/kexec.h>
> >> #include <asm/mmu_context.h>
> >> #include <asm/code-patching.h>
> >> -#include <asm/kvm_ppc.h>
> >> #include <asm/hugetlb.h>
> >> #include <asm/epapr_hcalls.h>
> >>
> >> +#if IS_ENABLED(CONFIG_KVM)
> >> +#include <asm/kvm_ppc.h>
> >> +#endif
> >> +
> >> #ifdef DEBUG
> >> #define DBG(fmt...) udbg_printf(fmt)
> >> #else
> >
> > I always cringe when I see an include protected by an #ifdef.
> > Is this really necessary? All that is done in asm-offsets.c is
> > to calculate offsets, the code where the two offsets in question
> > are used (entry64.S) does have the #ifdef for CONFIG_KVM.
>
> I agree that this is not the ideal way to do this. But, it has been
> the way things were already being done. If you see
> arch/powerpc/kernel/asm-offsets.c, there are quite some includes which
> are within ifdefs.
asm-offsets.c is unusual in that respect, and I think most of those
ifdefs could go away without breaking anything (head_booke.h is not a
normal header file, and kvm_book3s.h should just be removed as it will
be pulled in by kvm_ppc.h if applicable).
> I've considered other alternatives (though not in-depth) and found
> that they will require quite some refactoring. One simple idea is to
> move this #ifdef to within kvm_ppc.h. That should make the inclusion
> of this file a no-op in all the places where this is being included
> without KVM being enabled. But I am not 100% sure of that approach.
>
> Any suggestions are welcome.
As I suggested elsewhere in the thread, why not be more fine-grained in
what you ifdef in the srcu header? How will that require excessive
refactoring?
Or, just stick with the linker error.
I also wonder if this is worthwhile just to save around 2000 bytes.
What other core synchronization mechanisms are optional? What
real-world configs will actually have this disabled?
-Scott
WARNING: multiple messages have this Message-ID (diff)
From: Scott Wood <scottwood@freescale.com>
To: Pranith Kumar <bobby.prani@gmail.com>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>,
Benjamin Herrenschmidt <benh@kernel.crashing.org>,
Paul Mackerras <paulus@samba.org>,
"Michael Ellerman" <mpe@ellerman.id.au>,
Heiko Carstens <heiko.carstens@de.ibm.com>,
"supporter:S390" <linux390@de.ibm.com>,
Lai Jiangshan <laijs@cn.fujitsu.com>,
"Paul E. McKenney" <paulmck@linux.vnet.ibm.com>,
Josh Triplett <josh@joshtriplett.org>,
Steven Rostedt <rostedt@goodmis.org>,
"Mathieu Desnoyers" <mathieu.desnoyers@efficios.com>,
Anton Blanchard <anton@samba.org>,
Andy Fleming <afleming@freescale.com>,
Tiejun Chen <tiejun.chen@windriver.com>,
Daniel Walter <dwalter@google.com>,
"Jens Freimann" <jfrei@linux.vnet.ibm.com>,
Christian Borntraeger <borntraeger@de.ibm.com>,
"open list:LINUX FOR POWERPC..." <linuxppc-dev@lists.ozlabs.org>,
open list <linux-kernel@vger.kernel.org>,
"open list:S390" <linux-s390@vger.kernel.org>
Subject: Re: [PATCH] srcu: Isolate srcu sections using CONFIG_SRCU
Date: Tue, 30 Dec 2014 13:44:32 -0600 [thread overview]
Message-ID: <1419968672.4961.4.camel@freescale.com> (raw)
In-Reply-To: <CAJhHMCDan+qaaZjVUucA-sUS8A3vSTYuVHg8XQv4rsHXxAzKLw@mail.gmail.com>
On Mon, 2014-12-29 at 23:32 -0500, Pranith Kumar wrote:
> On Mon, Dec 29, 2014 at 5:03 AM, Martin Schwidefsky
> <schwidefsky@de.ibm.com> wrote:
> > On Sat, 27 Dec 2014 12:17:43 -0500
> > Pranith Kumar <bobby.prani@gmail.com> wrote:
> >
> >> @@ -65,10 +65,13 @@
> >> #include <asm/kexec.h>
> >> #include <asm/mmu_context.h>
> >> #include <asm/code-patching.h>
> >> -#include <asm/kvm_ppc.h>
> >> #include <asm/hugetlb.h>
> >> #include <asm/epapr_hcalls.h>
> >>
> >> +#if IS_ENABLED(CONFIG_KVM)
> >> +#include <asm/kvm_ppc.h>
> >> +#endif
> >> +
> >> #ifdef DEBUG
> >> #define DBG(fmt...) udbg_printf(fmt)
> >> #else
> >
> > I always cringe when I see an include protected by an #ifdef.
> > Is this really necessary? All that is done in asm-offsets.c is
> > to calculate offsets, the code where the two offsets in question
> > are used (entry64.S) does have the #ifdef for CONFIG_KVM.
>
> I agree that this is not the ideal way to do this. But, it has been
> the way things were already being done. If you see
> arch/powerpc/kernel/asm-offsets.c, there are quite some includes which
> are within ifdefs.
asm-offsets.c is unusual in that respect, and I think most of those
ifdefs could go away without breaking anything (head_booke.h is not a
normal header file, and kvm_book3s.h should just be removed as it will
be pulled in by kvm_ppc.h if applicable).
> I've considered other alternatives (though not in-depth) and found
> that they will require quite some refactoring. One simple idea is to
> move this #ifdef to within kvm_ppc.h. That should make the inclusion
> of this file a no-op in all the places where this is being included
> without KVM being enabled. But I am not 100% sure of that approach.
>
> Any suggestions are welcome.
As I suggested elsewhere in the thread, why not be more fine-grained in
what you ifdef in the srcu header? How will that require excessive
refactoring?
Or, just stick with the linker error.
I also wonder if this is worthwhile just to save around 2000 bytes.
What other core synchronization mechanisms are optional? What
real-world configs will actually have this disabled?
-Scott
next prev parent reply other threads:[~2014-12-30 19:44 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-27 17:17 [PATCH] srcu: Isolate srcu sections using CONFIG_SRCU Pranith Kumar
2014-12-27 17:17 ` Pranith Kumar
2014-12-27 17:17 ` [PATCH] powerpc/powernv: Select CONFIG_PRINTK to fix build failure Pranith Kumar
2014-12-29 9:01 ` Michael Ellerman
2014-12-29 9:01 ` Michael Ellerman
2014-12-30 5:46 ` Pranith Kumar
2014-12-30 5:46 ` Pranith Kumar
2014-12-29 10:03 ` [PATCH] srcu: Isolate srcu sections using CONFIG_SRCU Martin Schwidefsky
2014-12-29 10:03 ` Martin Schwidefsky
2014-12-30 4:32 ` Pranith Kumar
2014-12-30 4:32 ` Pranith Kumar
2014-12-30 19:44 ` Scott Wood [this message]
2014-12-30 19:44 ` Scott Wood
2014-12-29 23:05 ` Scott Wood
2014-12-29 23:05 ` Scott Wood
2014-12-30 5:06 ` Pranith Kumar
2014-12-30 5:06 ` Pranith Kumar
-- strict thread matches above, loose matches on Subject: below --
2014-12-09 18:48 Pranith Kumar
2014-12-09 20:12 ` Mathieu Desnoyers
2014-12-10 0:41 ` Paul E. McKenney
2014-12-09 14:16 Pranith Kumar
2014-12-09 17:02 ` Paul E. McKenney
2014-12-08 20:23 Pranith Kumar
2014-12-08 15:55 Pranith Kumar
2014-12-08 18:10 ` 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=1419968672.4961.4.camel@freescale.com \
--to=scottwood@freescale.com \
--cc=afleming@freescale.com \
--cc=anton@samba.org \
--cc=bobby.prani@gmail.com \
--cc=borntraeger@de.ibm.com \
--cc=dwalter@google.com \
--cc=heiko.carstens@de.ibm.com \
--cc=jfrei@linux.vnet.ibm.com \
--cc=josh@joshtriplett.org \
--cc=laijs@cn.fujitsu.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-s390@vger.kernel.org \
--cc=linux390@de.ibm.com \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mathieu.desnoyers@efficios.com \
--cc=paulmck@linux.vnet.ibm.com \
--cc=paulus@samba.org \
--cc=rostedt@goodmis.org \
--cc=schwidefsky@de.ibm.com \
--cc=tiejun.chen@windriver.com \
/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.