From: Randy Dunlap <rdunlap@infradead.org>
To: paulmck@linux.vnet.ibm.com
Cc: Rik van Riel <riel@redhat.com>,
akpm@linux-foundation.org, linux-kernel@vger.kernel.org,
Richard Weinberger <richard@nod.at>,
linux-next@vger.kernel.org, umgwanakikbuti@gmail.com
Subject: Re: mmotm 2014-04-24-13-07 uploaded
Date: Sun, 27 Apr 2014 13:40:17 -0700 [thread overview]
Message-ID: <535D6B31.3040604@infradead.org> (raw)
In-Reply-To: <535D3E0F.2090905@infradead.org>
On 04/27/14 10:27, Randy Dunlap wrote:
> On 04/26/14 23:26, Paul E. McKenney wrote:
>> On Fri, Apr 25, 2014 at 01:52:30PM -0700, Randy Dunlap wrote:
>>> On 04/25/14 13:44, Randy Dunlap wrote:
>>>> On 04/25/14 07:04, Rik van Riel wrote:
>>>>> On Thu, 24 Apr 2014 15:40:29 -0700
>>>>> Randy Dunlap <rdunlap@infradead.org> wrote:
>>>>>
>>>>>
>>>>>> uml on x86_64 defconfig:
>>>>>>
>>>>>> drivers/built-in.o: In function `__handle_sysrq':
>>>>>> drivers/tty/sysrq.c:514: undefined reference to `rcu_sysrq_start'
>>>>>> drivers/tty/sysrq.c:558: undefined reference to `rcu_sysrq_end'
>>>>>
>>>>> Randy, does the patch below fix it?
>>>
>>> CONFIG_TINY_RCU=y
>>>
>>> tiny.c does not provide these functions... Paul...
>>>
>>>> Hm, no, it does not. I'll look into it.
>>>>
>>>>> Mike, this patch should also address your concerns.
>>>>>
>>>>> Andrew, this can be a -fix patch for the sysctl-rcu patch,
>>>>> assuming it fixes things :)
>>>>>
>>>>> Signed-off-by: Rik van Riel <riel@redhat.com
>>>>> ---
>>>>> drivers/tty/sysrq.c | 1 +
>>>>> kernel/rcu/update.c | 3 ++-
>>>>> 2 files changed, 3 insertions(+), 1 deletion(-)
>>>>>
>>>>> diff --git a/drivers/tty/sysrq.c b/drivers/tty/sysrq.c
>>>>> index dd53af9..0867433 100644
>>>>> --- a/drivers/tty/sysrq.c
>>>>> +++ b/drivers/tty/sysrq.c
>>>>> @@ -46,6 +46,7 @@
>>>>> #include <linux/jiffies.h>
>>>>> #include <linux/syscalls.h>
>>>>> #include <linux/of.h>
>>>>> +#include <linux/rcupdate.h>
>>>>>
>>>>> #include <asm/ptrace.h>
>>>>> #include <asm/irq_regs.h>
>>>>> diff --git a/kernel/rcu/update.c b/kernel/rcu/update.c
>>>>> index 2ac3289..d22309c 100644
>>>>> --- a/kernel/rcu/update.c
>>>>> +++ b/kernel/rcu/update.c
>>>>> @@ -322,7 +322,8 @@ int rcu_jiffies_till_stall_check(void)
>>>>>
>>>>> void rcu_sysrq_start(void)
>>>>> {
>>>>> - rcu_cpu_stall_suppress = 2;
>>>>> + if (!rcu_cpu_stall_suppress)
>>>>> + rcu_cpu_stall_suppress = 2;
>>>>> }
>>>>>
>>>>> void rcu_sysrq_end(void)
>>
>> You would think that I would have learned by now that RCU requires a bit
>> more care... Anyway, patch containing only the APIs that -should- work
>> is below. Currently testing it on the usual set of configs.
>>
>> Thanx, Paul
>>
>> ------------------------------------------------------------------------
>>
>> rcu: Provide API to suppress stall warnings while sysrc runs
>>
>> Some sysrq handlers can run for a long time, because they dump a lot
>> of data onto a serial console. Having RCU stall warnings pop up in
>> the middle of them only makes the problem worse.
>>
>> This commit provides rcu_sysrq_start() and rcu_sysrq_end() APIs to
>> temporarily suppress RCU CPU stall warnings while a sysrq request is
>> handled.
>>
>> Signed-off-by: Rik van Riel <riel@redhat.com>
>> [ paulmck: Fix TINY_RCU build error. ]
>> Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
I guess that you want static inline on those functions...
> Still on uml on x86_64 defconfig:
>
> LD init/built-in.o
> init/version.o: In function `rcu_sysrq_start':
> include/linux/rcupdate.h:258: multiple definition of `rcu_sysrq_start'
> init/main.o:include/linux/rcupdate.h:258: first defined here
> init/version.o: In function `rcu_sysrq_end':
> include/linux/rcupdate.h:261: multiple definition of `rcu_sysrq_end'
> init/main.o:include/linux/rcupdate.h:261: first defined here
> init/mounts.o: In function `rcu_sysrq_start':
> include/linux/rcupdate.h:258: multiple definition of `rcu_sysrq_start'
> init/main.o:include/linux/rcupdate.h:258: first defined here
> init/mounts.o: In function `rcu_sysrq_end':
> include/linux/rcupdate.h:261: multiple definition of `rcu_sysrq_end'
> init/main.o:include/linux/rcupdate.h:261: first defined here
> init/noinitramfs.o: In function `rcu_sysrq_start':
> include/linux/rcupdate.h:258: multiple definition of `rcu_sysrq_start'
> init/main.o:include/linux/rcupdate.h:258: first defined here
> init/noinitramfs.o: In function `rcu_sysrq_end':
> include/linux/rcupdate.h:261: multiple definition of `rcu_sysrq_end'
> init/main.o:include/linux/rcupdate.h:261: first defined here
> init/init_task.o: In function `rcu_sysrq_start':
> include/linux/rcupdate.h:258: multiple definition of `rcu_sysrq_start'
> init/main.o:include/linux/rcupdate.h:258: first defined here
> init/init_task.o: In function `rcu_sysrq_end':
> include/linux/rcupdate.h:261: multiple definition of `rcu_sysrq_end'
> init/main.o:include/linux/rcupdate.h:261: first defined here
> make[2]: *** [init/built-in.o] Error 1
>
>
>
>>
>> diff --git a/include/linux/rcupdate.h b/include/linux/rcupdate.h
>> index a6f2664a1b77..3f53c96b3b77 100644
>> --- a/include/linux/rcupdate.h
>> +++ b/include/linux/rcupdate.h
>> @@ -248,6 +248,18 @@ void rcu_idle_exit(void);
>> void rcu_irq_enter(void);
>> void rcu_irq_exit(void);
>>
>> +#ifdef CONFIG_RCU_STALL_COMMON
>> +void rcu_sysrq_start(void);
>> +void rcu_sysrq_end(void);
>> +#else /* #ifdef CONFIG_RCU_STALL_COMMON */
>> +void rcu_sysrq_start(void)
>> +{
>> +}
>> +void rcu_sysrq_end(void)
>> +{
>> +}
>> +#endif /* #else #ifdef CONFIG_RCU_STALL_COMMON */
>> +
>> #ifdef CONFIG_RCU_USER_QS
>> void rcu_user_enter(void);
>> void rcu_user_exit(void);
>> diff --git a/kernel/rcu/update.c b/kernel/rcu/update.c
>> index ed7a0d72562c..a2aeb4df0f60 100644
>> --- a/kernel/rcu/update.c
>> +++ b/kernel/rcu/update.c
>> @@ -320,6 +320,18 @@ int rcu_jiffies_till_stall_check(void)
>> return till_stall_check * HZ + RCU_STALL_DELAY_DELTA;
>> }
>>
>> +void rcu_sysrq_start(void)
>> +{
>> + if (!rcu_cpu_stall_suppress)
>> + rcu_cpu_stall_suppress = 2;
>> +}
>> +
>> +void rcu_sysrq_end(void)
>> +{
>> + if (rcu_cpu_stall_suppress == 2)
>> + rcu_cpu_stall_suppress = 0;
>> +}
>> +
>> static int rcu_panic(struct notifier_block *this, unsigned long ev, void *ptr)
>> {
>> rcu_cpu_stall_suppress = 1;
>>
>
>
--
~Randy
next prev parent reply other threads:[~2014-04-27 20:40 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-24 20:08 mmotm 2014-04-24-13-07 uploaded akpm
2014-04-24 22:40 ` Randy Dunlap
2014-04-25 2:49 ` Paul E. McKenney
2014-04-25 11:37 ` Rik van Riel
2014-04-25 13:25 ` Rik van Riel
2014-04-25 14:04 ` Rik van Riel
2014-04-25 20:44 ` Randy Dunlap
2014-04-25 20:52 ` Randy Dunlap
2014-04-27 6:26 ` Paul E. McKenney
2014-04-27 17:27 ` Randy Dunlap
2014-04-27 20:40 ` Randy Dunlap [this message]
2014-04-28 0:26 ` Paul E. McKenney
2014-04-28 13:55 ` Paul E. McKenney
2014-04-28 17:17 ` Randy Dunlap
2014-04-28 17:21 ` Richard Weinberger
2014-04-28 20:06 ` Paul E. McKenney
2014-04-28 20:32 ` Randy Dunlap
2014-04-28 21:15 ` Paul E. McKenney
2014-04-28 21:59 ` Randy Dunlap
2014-04-29 12:07 ` Rik van Riel
2014-04-29 16:36 ` Paul E. McKenney
2014-04-29 17:31 ` Rik van Riel
2014-04-29 17:45 ` Paul E. McKenney
2014-04-28 21:39 ` Paul E. McKenney
2014-04-28 23:05 ` Andrew Morton
2014-04-28 23:42 ` Stephen Rothwell
2014-04-24 22:51 ` mmotm 2014-04-24-13-07 uploaded (regulator/arizona-ldo1.c) Randy Dunlap
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=535D6B31.3040604@infradead.org \
--to=rdunlap@infradead.org \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-next@vger.kernel.org \
--cc=paulmck@linux.vnet.ibm.com \
--cc=richard@nod.at \
--cc=riel@redhat.com \
--cc=umgwanakikbuti@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).