linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Zhang Zhen <zhenzhang.zhang@huawei.com>
To: <paulmck@linux.vnet.ibm.com>
Cc: Don Zickus <dzickus@redhat.com>, <linux-kernel@vger.kernel.org>,
	<morgan.wang@huawei.com>, <josh@freedesktop.org>,
	<dipankar@in.ibm.com>
Subject: Re: RCU CPU stall console spews  leads to soft lockup disabled is reasonable ?
Date: Wed, 21 Jan 2015 15:25:21 +0800	[thread overview]
Message-ID: <54BF5461.5070501@huawei.com> (raw)
In-Reply-To: <20150121070246.GB9719@linux.vnet.ibm.com>

On 2015/1/21 15:02, Paul E. McKenney wrote:
> On Wed, Jan 21, 2015 at 02:54:05PM +0800, Zhang Zhen wrote:
>> On 2015/1/21 11:13, Zhang Zhen wrote:
>>> On 2015/1/21 10:26, Zhang Zhen wrote:
>>>> On 2015/1/20 23:25, Don Zickus wrote:
> 
> [ . . . ]
> 
>>> Sorry, i made a mistake, the log above is based on v3.10.63.
>>> I have tested the latest upstream kernel (based on ec6f34e5b552),
>>> but my test case can't triggered RCU stall warning.
>>>
>>
>> I used git bisect to find the bad commit, but found a irrelevant
>> commit(db5d711e2db776 zram: avoid null access when fail to alloc meta).
>> Before this commit, my test case can easily trigger RCU stall warning,
>> but after this commit, my test case can't trigger RCU stall warning.
> 
> I have lost track of exactly what kernel you are using.  If you are
> using a recent kernel (v3.18 or thereabouts), one thing to try is to
> apply my stack of RCU CPU stall-warning changes that are on their way
> in, please see v3.19-rc1..630181c4a915 in -rcu, which is at:
> 
> git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu.git
> 
> These handle the problems that Dave Jones and a few others located this
> past December.  Could you please give them a spin?
> 
Ok, i will try.

Thanks!
>                                                         Thanx, Paul
> 
>> I'm totally confused.
>>
>> My test case:
>>
>> //
>> #include <linux/kernel.h>
>> #include <linux/module.h>
>> #include <linux/spinlock.h>
>> #include <linux/slab.h>
>> #include <linux/kthread.h>
>>
>> struct foo {
>>         int a;
>>         char b;
>>         long c;
>> };
>>
>> struct foo gbl_foo = {1, 'a', 2};
>> struct foo *pgbl_foo = &gbl_foo;
>>
>> static int my_kthread(void *data)
>> {
>>         DEFINE_SPINLOCK(foo_mutex);
>>         struct foo *new_fp;
>>         struct foo *old_fp;
>>
>>         new_fp = kmalloc(sizeof(*new_fp), GFP_KERNEL);
>>         spin_lock(&foo_mutex);
>>         old_fp = pgbl_foo;
>>         *new_fp = *old_fp;
>>         new_fp->a = 2;
>>         rcu_assign_pointer(pgbl_foo, new_fp);
>>         spin_unlock(&foo_mutex);
>>         synchronize_rcu();
>>         kfree(old_fp);
>>
>>         return 0;
>> }
>>
>> static int hello_start(void)
>> {
>>         struct task_struct *my_task = NULL;
>>         DEFINE_SPINLOCK(hello_lock);
>>
>>         my_task = kthread_run(my_kthread, NULL, "my_thread%d", 1);
>>
>>         spin_lock_init(&hello_lock);
>>         spin_lock(&hello_lock);
>>         spin_lock(&hello_lock);
>>         return 0;
>> }
>>
>> static int __init test_init(void)
>> {
>>         hello_start();
>>
>>         printk(KERN_INFO "Module init\n");
>>         return 0;
>> }
>>
>> static void __exit test_exit(void)
>> {
>>         printk(KERN_INFO "Module exit!\n");
>> }
>>
>> module_init(test_init)
>> module_exit(test_exit)
>> MODULE_LICENSE("GPL");
>> //
>>>>>
>>>>> Cheers,
>>>>> Don
>>>>>
>>>>> diff --git a/kernel/watchdog.c b/kernel/watchdog.c
>>>>> index 70bf118..833c015 100644
>>>>> --- a/kernel/watchdog.c
>>>>> +++ b/kernel/watchdog.c
>>>>> @@ -209,7 +209,7 @@ void touch_nmi_watchdog(void)
>>>>>  	 * going off.
>>>>>  	 */
>>>>>  	raw_cpu_write(watchdog_nmi_touch, true);
>>>>> -	touch_softlockup_watchdog();
>>>>> +	//touch_softlockup_watchdog();
>>>>>  }
>>>>>  EXPORT_SYMBOL(touch_nmi_watchdog);
>>>>>  
>>>>>
>>>>> .
>>>>>
>>>>
>>>
>>
>>
> 
> 
> .
> 



  reply	other threads:[~2015-01-21  7:26 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-19  8:07 RCU CPU stall console spews leads to soft lockup disabled is reasonable ? Zhang Zhen
2015-01-19  8:42 ` Paul E. McKenney
2015-01-19  9:04   ` Zhang Zhen
2015-01-19 11:09     ` Paul E. McKenney
2015-01-20  3:17       ` Zhang Zhen
2015-01-20  3:33         ` Paul E. McKenney
2015-01-19 14:06     ` Don Zickus
2015-01-20  3:09       ` Zhang Zhen
2015-01-20 15:25         ` Don Zickus
2015-01-21  2:26           ` Zhang Zhen
2015-01-21  3:13             ` Zhang Zhen
2015-01-21  6:54               ` Zhang Zhen
2015-01-21  7:02                 ` Paul E. McKenney
2015-01-21  7:25                   ` Zhang Zhen [this message]
2015-01-21  9:05                   ` Zhang Zhen
2015-01-21 10:16                     ` Paul E. McKenney
2015-01-21 11:11                       ` Zhang Zhen
2015-01-21 20:04                         ` Paul E. McKenney
2015-01-21 15:10             ` Don Zickus
2015-01-21 20:06               ` Paul E. McKenney
2015-01-22  3:08                 ` Zhang Zhen
2015-01-22  5:15                   ` 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=54BF5461.5070501@huawei.com \
    --to=zhenzhang.zhang@huawei.com \
    --cc=dipankar@in.ibm.com \
    --cc=dzickus@redhat.com \
    --cc=josh@freedesktop.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=morgan.wang@huawei.com \
    --cc=paulmck@linux.vnet.ibm.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).