linux-rt-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: Nicholas Mc Guire <der.herr@hofr.at>,
	linux-rt-users@vger.kernel.org,
	Peter Zijlstra <peterz@infradead.org>,
	Andreas Platschek <platschek@ict.tuwien.ac.at>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 1/3] make migrate disable/enable conditioned on softirq_nestcnt transition
Date: Sun, 15 Dec 2013 15:46:39 +0100	[thread overview]
Message-ID: <20131215144639.GG31090@linutronix.de> (raw)
In-Reply-To: <20131205194530.1c086844@gandalf.local.home>

* Steven Rostedt | 2013-12-05 19:45:30 [-0500]:

>On Fri, 6 Dec 2013 00:42:22 +0100
>Nicholas Mc Guire <der.herr@hofr.at> wrote:
>> --- a/kernel/softirq.c
>> +++ b/kernel/softirq.c
>> @@ -569,8 +569,8 @@ static void do_current_softirqs(int need_rcu_bh_qs)
>>  
>>  void local_bh_disable(void)
>>  {
>> -	migrate_disable();
>> -	current->softirq_nestcnt++;
>> +	if (++current->softirq_nestcnt == 1)
>> +		migrate_disable();
>>  }
>>  EXPORT_SYMBOL(local_bh_disable);
>>  
>> @@ -584,8 +584,8 @@ void local_bh_enable(void)
>>  		do_current_softirqs(1);
>>  	local_irq_enable();
>>  
>> -	current->softirq_nestcnt--;
>> -	migrate_enable();
>> +	if (--current->softirq_nestcnt == 0)
>> +		migrate_enable();
>
>I wonder if we should add a:
>
>	BUG_ON(current->softirq_nestcnt < 0);

We have a WARN_ON() in each enable path. That one in local_bh_enable()
isn't part of the context here. If you want to s/WARN_/BUG_/ then I
would prefer not to since there are a few people with no UART and this
could break the system while the current sollution keeps the system
running.

>As for the patch, I haven't found anything wrong with it.
>
>Reviewed-by: Steven Rostedt <rostedt@goodmis.org>
Thanks.

Sebastian

      reply	other threads:[~2013-12-15 14:46 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-05 23:42 [PATCH 1/3] make migrate disable/enable conditioned on softirq_nestcnt transition Nicholas Mc Guire
2013-12-06  0:45 ` Steven Rostedt
2013-12-15 14:46   ` Sebastian Andrzej Siewior [this message]

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=20131215144639.GG31090@linutronix.de \
    --to=bigeasy@linutronix.de \
    --cc=der.herr@hofr.at \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rt-users@vger.kernel.org \
    --cc=peterz@infradead.org \
    --cc=platschek@ict.tuwien.ac.at \
    --cc=rostedt@goodmis.org \
    /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).