[{"id":1732069,"web_url":"http://patchwork.ozlabs.org/comment/1732069/","msgid":"<20170728141331.00006a10@huawei.com>","date":"2017-07-28T13:13:31","subject":"Re: RCU lockup issues when CONFIG_SOFTLOCKUP_DETECTOR=n - any one\n\telse seeing this?","submitter":{"id":71988,"url":"http://patchwork.ozlabs.org/api/people/71988/","name":"Jonathan Cameron","email":"Jonathan.Cameron@huawei.com"},"content":"On Fri, 28 Jul 2017 20:54:16 +0800\nBoqun Feng <boqun.feng@gmail.com> wrote:\n\n> Hi Jonathan,\n> \n> FWIW, there is wakeup-missing issue in swake_up() and swake_up_all():\n> \n> \thttps://marc.info/?l=linux-kernel&m=149750022019663\n> \n> and RCU begins to use swait/wake last year, so I thought this could be\n> relevant.\n> \n> Could you try the following patch and see if it works? Thanks.\nSadly seems to be a no...  Just splatted before I could even get\nthe tracing set up. Back to staring at logs and hoping something\nwill stand out!\n\nJonathan\n> \n> Regards,\n> Boqun\n> \n> ------------------>8  \n> Subject: [PATCH] swait: Remove the lockless swait_active() check in\n>  swake_up*()\n> \n> Steven Rostedt reported a potential race in RCU core because of\n> swake_up():\n> \n>         CPU0                            CPU1\n>         ----                            ----\n>                                 __call_rcu_core() {\n> \n>                                  spin_lock(rnp_root)\n>                                  need_wake = __rcu_start_gp() {\n>                                   rcu_start_gp_advanced() {\n>                                    gp_flags = FLAG_INIT\n>                                   }\n>                                  }\n> \n>  rcu_gp_kthread() {\n>    swait_event_interruptible(wq,\n>         gp_flags & FLAG_INIT) {\n>    spin_lock(q->lock)\n> \n>                                 *fetch wq->task_list here! *\n> \n>    list_add(wq->task_list, q->task_list)\n>    spin_unlock(q->lock);\n> \n>    *fetch old value of gp_flags here *\n> \n>                                  spin_unlock(rnp_root)\n> \n>                                  rcu_gp_kthread_wake() {\n>                                   swake_up(wq) {\n>                                    swait_active(wq) {\n>                                     list_empty(wq->task_list)\n> \n>                                    } * return false *\n> \n>   if (condition) * false *\n>     schedule();\n> \n> In this case, a wakeup is missed, which could cause the rcu_gp_kthread\n> waits for a long time.\n> \n> The reason of this is that we do a lockless swait_active() check in\n> swake_up(). To fix this, we can either 1) add a smp_mb() in swake_up()\n> before swait_active() to provide the proper order or 2) simply remove\n> the swait_active() in swake_up().\n> \n> The solution 2 not only fixes this problem but also keeps the swait and\n> wait API as close as possible, as wake_up() doesn't provide a full\n> barrier and doesn't do a lockless check of the wait queue either.\n> Moreover, there are users already using swait_active() to do their quick\n> checks for the wait queues, so it make less sense that swake_up() and\n> swake_up_all() do this on their own.\n> \n> This patch then removes the lockless swait_active() check in swake_up()\n> and swake_up_all().\n> \n> Reported-by: Steven Rostedt <rostedt@goodmis.org>\n> Signed-off-by: Boqun Feng <boqun.feng@gmail.com>\n> ---\n>  kernel/sched/swait.c | 6 ------\n>  1 file changed, 6 deletions(-)\n> \n> diff --git a/kernel/sched/swait.c b/kernel/sched/swait.c\n> index 3d5610dcce11..2227e183e202 100644\n> --- a/kernel/sched/swait.c\n> +++ b/kernel/sched/swait.c\n> @@ -33,9 +33,6 @@ void swake_up(struct swait_queue_head *q)\n>  {\n>  \tunsigned long flags;\n>  \n> -\tif (!swait_active(q))\n> -\t\treturn;\n> -\n>  \traw_spin_lock_irqsave(&q->lock, flags);\n>  \tswake_up_locked(q);\n>  \traw_spin_unlock_irqrestore(&q->lock, flags);\n> @@ -51,9 +48,6 @@ void swake_up_all(struct swait_queue_head *q)\n>  \tstruct swait_queue *curr;\n>  \tLIST_HEAD(tmp);\n>  \n> -\tif (!swait_active(q))\n> -\t\treturn;\n> -\n>  \traw_spin_lock_irq(&q->lock);\n>  \tlist_splice_init(&q->task_list, &tmp);\n>  \twhile (!list_empty(&tmp)) {","headers":{"Return-Path":"<linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org>","X-Original-To":["patchwork-incoming@ozlabs.org","linuxppc-dev@lists.ozlabs.org"],"Delivered-To":["patchwork-incoming@ozlabs.org","linuxppc-dev@lists.ozlabs.org"],"Received":["from lists.ozlabs.org (lists.ozlabs.org [103.22.144.68])\n\t(using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xJq883sJBz9s3T\n\tfor <patchwork-incoming@ozlabs.org>;\n\tFri, 28 Jul 2017 23:15:04 +1000 (AEST)","from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3])\n\tby lists.ozlabs.org (Postfix) with ESMTP id 3xJq882qyhzDrVB\n\tfor <patchwork-incoming@ozlabs.org>;\n\tFri, 28 Jul 2017 23:15:04 +1000 (AEST)","from szxga03-in.huawei.com (szxga03-in.huawei.com [45.249.212.189])\n\t(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby lists.ozlabs.org (Postfix) with ESMTPS id 3xJq6x4GX3zDrRl\n\tfor <linuxppc-dev@lists.ozlabs.org>;\n\tFri, 28 Jul 2017 23:14:01 +1000 (AEST)","from 172.30.72.53 (EHLO dggeml406-hub.china.huawei.com)\n\t([172.30.72.53])\n\tby dggrg03-dlp.huawei.com (MOS 4.4.6-GA FastPath queued)\n\twith ESMTP id ASI26069; Fri, 28 Jul 2017 21:13:51 +0800 (CST)","from localhost (10.206.48.115) by dggeml406-hub.china.huawei.com\n\t(10.3.17.50) with Microsoft SMTP Server (TLS) id 14.3.301.0;\n\tFri, 28 Jul 2017 21:13:38 +0800"],"Date":"Fri, 28 Jul 2017 14:13:31 +0100","From":"Jonathan Cameron <Jonathan.Cameron@huawei.com>","To":"Boqun Feng <boqun.feng@gmail.com>","Subject":"Re: RCU lockup issues when CONFIG_SOFTLOCKUP_DETECTOR=n - any one\n\telse seeing this?","Message-ID":"<20170728141331.00006a10@huawei.com>","In-Reply-To":"<20170728125416.j7gcgvnxgv2gq73u@tardis>","References":"<20170726.154540.150558937277891719.davem@davemloft.net>\n\t<20170726231505.GG3730@linux.vnet.ibm.com>\n\t<20170726.162200.1904949371593276937.davem@davemloft.net>\n\t<20170727014214.GH3730@linux.vnet.ibm.com>\n\t<20170727143400.23e4d2b2@roar.ozlabs.ibm.com>\n\t<20170727124913.GL3730@linux.vnet.ibm.com>\n\t<20170727144903.000022a1@huawei.com>\n\t<20170727173923.000001b2@huawei.com>\n\t<20170727165245.GD3730@linux.vnet.ibm.com>\n\t<20170728084411.00001ddb@huawei.com>\n\t<20170728125416.j7gcgvnxgv2gq73u@tardis>","Organization":"Huawei","X-Mailer":"Claws Mail 3.15.0 (GTK+ 2.24.31; x86_64-w64-mingw32)","MIME-Version":"1.0","Content-Type":"text/plain; charset=\"US-ASCII\"","Content-Transfer-Encoding":"7bit","X-Originating-IP":"[10.206.48.115]","X-CFilter-Loop":"Reflected","X-Mirapoint-Virus-RAPID-Raw":"score=unknown(0),\n\trefid=str=0001.0A020206.597B3891.000E, ss=1, re=0.000, recu=0.000,\n\treip=0.000, cl=1, cld=1, fgs=0, ip=0.0.0.0,\n\tso=2014-11-16 11:51:01, dmn=2013-03-21 17:37:32","X-Mirapoint-Loop-Id":"4e5bf79cd728258c044098bbb0d81701","X-BeenThere":"linuxppc-dev@lists.ozlabs.org","X-Mailman-Version":"2.1.23","Precedence":"list","List-Id":"Linux on PowerPC Developers Mail List\n\t<linuxppc-dev.lists.ozlabs.org>","List-Unsubscribe":"<https://lists.ozlabs.org/options/linuxppc-dev>,\n\t<mailto:linuxppc-dev-request@lists.ozlabs.org?subject=unsubscribe>","List-Archive":"<http://lists.ozlabs.org/pipermail/linuxppc-dev/>","List-Post":"<mailto:linuxppc-dev@lists.ozlabs.org>","List-Help":"<mailto:linuxppc-dev-request@lists.ozlabs.org?subject=help>","List-Subscribe":"<https://lists.ozlabs.org/listinfo/linuxppc-dev>,\n\t<mailto:linuxppc-dev-request@lists.ozlabs.org?subject=subscribe>","Cc":"dzickus@redhat.com, sfr@canb.auug.org.au, linuxarm@huawei.com,\n\tNicholas Piggin <npiggin@gmail.com>, abdhalee@linux.vnet.ibm.com,\n\tsparclinux@vger.kernel.org, akpm@linux-foundation.org,\n\t\"Paul E. McKenney\" <paulmck@linux.vnet.ibm.com>,\n\tlinuxppc-dev@lists.ozlabs.org, David Miller <davem@davemloft.net>,\n\tlinux-arm-kernel@lists.infradead.org","Errors-To":"linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org","Sender":"\"Linuxppc-dev\"\n\t<linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org>"}},{"id":1732181,"web_url":"http://patchwork.ozlabs.org/comment/1732181/","msgid":"<20170728145530.GE3730@linux.vnet.ibm.com>","date":"2017-07-28T14:55:30","subject":"Re: RCU lockup issues when CONFIG_SOFTLOCKUP_DETECTOR=n - any one\n\telse seeing this?","submitter":{"id":81,"url":"http://patchwork.ozlabs.org/api/people/81/","name":"Paul E. McKenney","email":"paulmck@linux.vnet.ibm.com"},"content":"On Fri, Jul 28, 2017 at 08:54:16PM +0800, Boqun Feng wrote:\n> Hi Jonathan,\n> \n> FWIW, there is wakeup-missing issue in swake_up() and swake_up_all():\n> \n> \thttps://marc.info/?l=linux-kernel&m=149750022019663\n> \n> and RCU begins to use swait/wake last year, so I thought this could be\n> relevant.\n> \n> Could you try the following patch and see if it works? Thanks.\n> \n> Regards,\n> Boqun\n> \n> ------------------>8\n> Subject: [PATCH] swait: Remove the lockless swait_active() check in\n>  swake_up*()\n> \n> Steven Rostedt reported a potential race in RCU core because of\n> swake_up():\n> \n>         CPU0                            CPU1\n>         ----                            ----\n>                                 __call_rcu_core() {\n> \n>                                  spin_lock(rnp_root)\n>                                  need_wake = __rcu_start_gp() {\n>                                   rcu_start_gp_advanced() {\n>                                    gp_flags = FLAG_INIT\n>                                   }\n>                                  }\n> \n>  rcu_gp_kthread() {\n>    swait_event_interruptible(wq,\n>         gp_flags & FLAG_INIT) {\n\nSo the idea is that we get the old value of ->gp_flags here, correct?\n\n>    spin_lock(q->lock)\n> \n>                                 *fetch wq->task_list here! *\n\nAnd the above fetch is really part of the swait_active() called out\nbelow, right?\n\n>    list_add(wq->task_list, q->task_list)\n>    spin_unlock(q->lock);\n> \n>    *fetch old value of gp_flags here *\n\nAnd here we fetch the old value of ->gp_flags again, this time under\nthe lock, right?\n\n>                                  spin_unlock(rnp_root)\n> \n>                                  rcu_gp_kthread_wake() {\n>                                   swake_up(wq) {\n>                                    swait_active(wq) {\n>                                     list_empty(wq->task_list)\n> \n>                                    } * return false *\n> \n>   if (condition) * false *\n>     schedule();\n> \n> In this case, a wakeup is missed, which could cause the rcu_gp_kthread\n> waits for a long time.\n> \n> The reason of this is that we do a lockless swait_active() check in\n> swake_up(). To fix this, we can either 1) add a smp_mb() in swake_up()\n> before swait_active() to provide the proper order or 2) simply remove\n> the swait_active() in swake_up().\n> \n> The solution 2 not only fixes this problem but also keeps the swait and\n> wait API as close as possible, as wake_up() doesn't provide a full\n> barrier and doesn't do a lockless check of the wait queue either.\n> Moreover, there are users already using swait_active() to do their quick\n> checks for the wait queues, so it make less sense that swake_up() and\n> swake_up_all() do this on their own.\n> \n> This patch then removes the lockless swait_active() check in swake_up()\n> and swake_up_all().\n> \n> Reported-by: Steven Rostedt <rostedt@goodmis.org>\n> Signed-off-by: Boqun Feng <boqun.feng@gmail.com>\n\nEven though Jonathan's testing indicates that it didn't fix this\nparticular problem:\n\nAcked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>\n\n> ---\n>  kernel/sched/swait.c | 6 ------\n>  1 file changed, 6 deletions(-)\n> \n> diff --git a/kernel/sched/swait.c b/kernel/sched/swait.c\n> index 3d5610dcce11..2227e183e202 100644\n> --- a/kernel/sched/swait.c\n> +++ b/kernel/sched/swait.c\n> @@ -33,9 +33,6 @@ void swake_up(struct swait_queue_head *q)\n>  {\n>  \tunsigned long flags;\n> \n> -\tif (!swait_active(q))\n> -\t\treturn;\n> -\n>  \traw_spin_lock_irqsave(&q->lock, flags);\n>  \tswake_up_locked(q);\n>  \traw_spin_unlock_irqrestore(&q->lock, flags);\n> @@ -51,9 +48,6 @@ void swake_up_all(struct swait_queue_head *q)\n>  \tstruct swait_queue *curr;\n>  \tLIST_HEAD(tmp);\n> \n> -\tif (!swait_active(q))\n> -\t\treturn;\n> -\n>  \traw_spin_lock_irq(&q->lock);\n>  \tlist_splice_init(&q->task_list, &tmp);\n>  \twhile (!list_empty(&tmp)) {\n> -- \n> 2.13.0\n>","headers":{"Return-Path":"<linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org>","X-Original-To":["patchwork-incoming@ozlabs.org","linuxppc-dev@lists.ozlabs.org"],"Delivered-To":["patchwork-incoming@ozlabs.org","linuxppc-dev@lists.ozlabs.org"],"Received":["from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3])\n\t(using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xJsPy2KSsz9ryk\n\tfor <patchwork-incoming@ozlabs.org>;\n\tSat, 29 Jul 2017 00:57:10 +1000 (AEST)","from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3])\n\tby lists.ozlabs.org (Postfix) with ESMTP id 3xJsPy1B7XzDrSx\n\tfor <patchwork-incoming@ozlabs.org>;\n\tSat, 29 Jul 2017 00:57:10 +1000 (AEST)","from mx0a-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com\n\t[148.163.158.5])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby lists.ozlabs.org (Postfix) with ESMTPS id 3xJsND1wdFzDrRp\n\tfor <linuxppc-dev@lists.ozlabs.org>;\n\tSat, 29 Jul 2017 00:55:40 +1000 (AEST)","from pps.filterd (m0098414.ppops.net [127.0.0.1])\n\tby mx0b-001b2d01.pphosted.com (8.16.0.21/8.16.0.21) with SMTP id\n\tv6SErvup017350\n\tfor <linuxppc-dev@lists.ozlabs.org>; Fri, 28 Jul 2017 10:55:36 -0400","from e13.ny.us.ibm.com (e13.ny.us.ibm.com [129.33.205.203])\n\tby mx0b-001b2d01.pphosted.com with ESMTP id 2c05cy8yms-1\n\t(version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT)\n\tfor <linuxppc-dev@lists.ozlabs.org>; Fri, 28 Jul 2017 10:55:36 -0400","from localhost\n\tby e13.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use\n\tOnly! Violators will be prosecuted\n\tfor <linuxppc-dev@lists.ozlabs.org> from <paulmck@linux.vnet.ibm.com>;\n\tFri, 28 Jul 2017 10:55:35 -0400","from b01cxnp23034.gho.pok.ibm.com (9.57.198.29)\n\tby e13.ny.us.ibm.com (146.89.104.200) with IBM ESMTP SMTP Gateway:\n\tAuthorized Use Only! Violators will be prosecuted; \n\tFri, 28 Jul 2017 10:55:30 -0400","from b01ledav003.gho.pok.ibm.com (b01ledav003.gho.pok.ibm.com\n\t[9.57.199.108])\n\tby b01cxnp23034.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP\n\tid v6SEtUGO26869954; Fri, 28 Jul 2017 14:55:30 GMT","from b01ledav003.gho.pok.ibm.com (unknown [127.0.0.1])\n\tby IMSVA (Postfix) with ESMTP id 7A1C4B2056;\n\tFri, 28 Jul 2017 10:52:58 -0400 (EDT)","from paulmck-ThinkPad-W541 (unknown [9.70.82.146])\n\tby b01ledav003.gho.pok.ibm.com (Postfix) with ESMTP id 25FECB2052;\n\tFri, 28 Jul 2017 10:52:58 -0400 (EDT)","by paulmck-ThinkPad-W541 (Postfix, from userid 1000)\n\tid 7608116C14E6; Fri, 28 Jul 2017 07:55:30 -0700 (PDT)"],"Date":"Fri, 28 Jul 2017 07:55:30 -0700","From":"\"Paul E. McKenney\" <paulmck@linux.vnet.ibm.com>","To":"Boqun Feng <boqun.feng@gmail.com>","Subject":"Re: RCU lockup issues when CONFIG_SOFTLOCKUP_DETECTOR=n - any one\n\telse seeing this?","References":"<20170726231505.GG3730@linux.vnet.ibm.com>\n\t<20170726.162200.1904949371593276937.davem@davemloft.net>\n\t<20170727014214.GH3730@linux.vnet.ibm.com>\n\t<20170727143400.23e4d2b2@roar.ozlabs.ibm.com>\n\t<20170727124913.GL3730@linux.vnet.ibm.com>\n\t<20170727144903.000022a1@huawei.com>\n\t<20170727173923.000001b2@huawei.com>\n\t<20170727165245.GD3730@linux.vnet.ibm.com>\n\t<20170728084411.00001ddb@huawei.com>\n\t<20170728125416.j7gcgvnxgv2gq73u@tardis>","MIME-Version":"1.0","Content-Type":"text/plain; charset=us-ascii","Content-Disposition":"inline","In-Reply-To":"<20170728125416.j7gcgvnxgv2gq73u@tardis>","User-Agent":"Mutt/1.5.21 (2010-09-15)","X-TM-AS-GCONF":"00","x-cbid":"17072814-0008-0000-0000-00000266157B","X-IBM-SpamModules-Scores":"","X-IBM-SpamModules-Versions":"BY=3.00007441; HX=3.00000241; KW=3.00000007;\n\tPH=3.00000004; SC=3.00000214; SDB=6.00894156; UDB=6.00447089;\n\tIPR=6.00674316; \n\tBA=6.00005495; NDR=6.00000001; ZLA=6.00000005; ZF=6.00000009;\n\tZB=6.00000000; \n\tZP=6.00000000; ZH=6.00000000; ZU=6.00000002; MB=3.00016424;\n\tXFM=3.00000015; UTC=2017-07-28 14:55:34","X-IBM-AV-DETECTION":"SAVI=unused REMOTE=unused XFE=unused","x-cbparentid":"17072814-0009-0000-0000-0000362F7F67","Message-Id":"<20170728145530.GE3730@linux.vnet.ibm.com>","X-Proofpoint-Virus-Version":"vendor=fsecure engine=2.50.10432:, ,\n\tdefinitions=2017-07-28_06:, , signatures=0","X-Proofpoint-Spam-Details":"rule=outbound_notspam policy=outbound score=0\n\tspamscore=0 suspectscore=3\n\tmalwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam\n\tadjust=0 reason=mlx scancount=1 engine=8.0.1-1706020000\n\tdefinitions=main-1707280236","X-BeenThere":"linuxppc-dev@lists.ozlabs.org","X-Mailman-Version":"2.1.23","Precedence":"list","List-Id":"Linux on PowerPC Developers Mail List\n\t<linuxppc-dev.lists.ozlabs.org>","List-Unsubscribe":"<https://lists.ozlabs.org/options/linuxppc-dev>,\n\t<mailto:linuxppc-dev-request@lists.ozlabs.org?subject=unsubscribe>","List-Archive":"<http://lists.ozlabs.org/pipermail/linuxppc-dev/>","List-Post":"<mailto:linuxppc-dev@lists.ozlabs.org>","List-Help":"<mailto:linuxppc-dev-request@lists.ozlabs.org?subject=help>","List-Subscribe":"<https://lists.ozlabs.org/listinfo/linuxppc-dev>,\n\t<mailto:linuxppc-dev-request@lists.ozlabs.org?subject=subscribe>","Reply-To":"paulmck@linux.vnet.ibm.com","Cc":"dzickus@redhat.com, sfr@canb.auug.org.au, linuxarm@huawei.com,\n\tNicholas Piggin <npiggin@gmail.com>, abdhalee@linux.vnet.ibm.com,\n\tJonathan Cameron <Jonathan.Cameron@huawei.com>,\n\tsparclinux@vger.kernel.org, \n\takpm@linux-foundation.org, linuxppc-dev@lists.ozlabs.org,\n\tDavid Miller <davem@davemloft.net>, linux-arm-kernel@lists.infradead.org","Errors-To":"linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org","Sender":"\"Linuxppc-dev\"\n\t<linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org>"}},{"id":1732355,"web_url":"http://patchwork.ozlabs.org/comment/1732355/","msgid":"<20170728184129.GA24364@linux.vnet.ibm.com>","date":"2017-07-28T18:41:29","subject":"Re: RCU lockup issues when CONFIG_SOFTLOCKUP_DETECTOR=n - any one\n\telse seeing this?","submitter":{"id":81,"url":"http://patchwork.ozlabs.org/api/people/81/","name":"Paul E. McKenney","email":"paulmck@linux.vnet.ibm.com"},"content":"On Fri, Jul 28, 2017 at 07:55:30AM -0700, Paul E. McKenney wrote:\n> On Fri, Jul 28, 2017 at 08:54:16PM +0800, Boqun Feng wrote:\n> > Hi Jonathan,\n> > \n> > FWIW, there is wakeup-missing issue in swake_up() and swake_up_all():\n> > \n> > \thttps://marc.info/?l=linux-kernel&m=149750022019663\n> > \n> > and RCU begins to use swait/wake last year, so I thought this could be\n> > relevant.\n> > \n> > Could you try the following patch and see if it works? Thanks.\n> > \n> > Regards,\n> > Boqun\n> > \n> > ------------------>8\n> > Subject: [PATCH] swait: Remove the lockless swait_active() check in\n> >  swake_up*()\n> > \n> > Steven Rostedt reported a potential race in RCU core because of\n> > swake_up():\n> > \n> >         CPU0                            CPU1\n> >         ----                            ----\n> >                                 __call_rcu_core() {\n> > \n> >                                  spin_lock(rnp_root)\n> >                                  need_wake = __rcu_start_gp() {\n> >                                   rcu_start_gp_advanced() {\n> >                                    gp_flags = FLAG_INIT\n> >                                   }\n> >                                  }\n> > \n> >  rcu_gp_kthread() {\n> >    swait_event_interruptible(wq,\n> >         gp_flags & FLAG_INIT) {\n> \n> So the idea is that we get the old value of ->gp_flags here, correct?\n> \n> >    spin_lock(q->lock)\n> > \n> >                                 *fetch wq->task_list here! *\n> \n> And the above fetch is really part of the swait_active() called out\n> below, right?\n> \n> >    list_add(wq->task_list, q->task_list)\n> >    spin_unlock(q->lock);\n> > \n> >    *fetch old value of gp_flags here *\n> \n> And here we fetch the old value of ->gp_flags again, this time under\n> the lock, right?\n> \n> >                                  spin_unlock(rnp_root)\n> > \n> >                                  rcu_gp_kthread_wake() {\n> >                                   swake_up(wq) {\n> >                                    swait_active(wq) {\n> >                                     list_empty(wq->task_list)\n> > \n> >                                    } * return false *\n> > \n> >   if (condition) * false *\n> >     schedule();\n> > \n> > In this case, a wakeup is missed, which could cause the rcu_gp_kthread\n> > waits for a long time.\n> > \n> > The reason of this is that we do a lockless swait_active() check in\n> > swake_up(). To fix this, we can either 1) add a smp_mb() in swake_up()\n> > before swait_active() to provide the proper order or 2) simply remove\n> > the swait_active() in swake_up().\n> > \n> > The solution 2 not only fixes this problem but also keeps the swait and\n> > wait API as close as possible, as wake_up() doesn't provide a full\n> > barrier and doesn't do a lockless check of the wait queue either.\n> > Moreover, there are users already using swait_active() to do their quick\n> > checks for the wait queues, so it make less sense that swake_up() and\n> > swake_up_all() do this on their own.\n> > \n> > This patch then removes the lockless swait_active() check in swake_up()\n> > and swake_up_all().\n> > \n> > Reported-by: Steven Rostedt <rostedt@goodmis.org>\n> > Signed-off-by: Boqun Feng <boqun.feng@gmail.com>\n> \n> Even though Jonathan's testing indicates that it didn't fix this\n> particular problem:\n> \n> Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>\n\nAnd while we are at it:\n\nTested-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>\n\n> > ---\n> >  kernel/sched/swait.c | 6 ------\n> >  1 file changed, 6 deletions(-)\n> > \n> > diff --git a/kernel/sched/swait.c b/kernel/sched/swait.c\n> > index 3d5610dcce11..2227e183e202 100644\n> > --- a/kernel/sched/swait.c\n> > +++ b/kernel/sched/swait.c\n> > @@ -33,9 +33,6 @@ void swake_up(struct swait_queue_head *q)\n> >  {\n> >  \tunsigned long flags;\n> > \n> > -\tif (!swait_active(q))\n> > -\t\treturn;\n> > -\n> >  \traw_spin_lock_irqsave(&q->lock, flags);\n> >  \tswake_up_locked(q);\n> >  \traw_spin_unlock_irqrestore(&q->lock, flags);\n> > @@ -51,9 +48,6 @@ void swake_up_all(struct swait_queue_head *q)\n> >  \tstruct swait_queue *curr;\n> >  \tLIST_HEAD(tmp);\n> > \n> > -\tif (!swait_active(q))\n> > -\t\treturn;\n> > -\n> >  \traw_spin_lock_irq(&q->lock);\n> >  \tlist_splice_init(&q->task_list, &tmp);\n> >  \twhile (!list_empty(&tmp)) {\n> > -- \n> > 2.13.0\n> >","headers":{"Return-Path":"<linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org>","X-Original-To":["patchwork-incoming@ozlabs.org","linuxppc-dev@lists.ozlabs.org"],"Delivered-To":["patchwork-incoming@ozlabs.org","linuxppc-dev@lists.ozlabs.org"],"Received":["from lists.ozlabs.org (lists.ozlabs.org [103.22.144.68])\n\t(using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xJyQp3lMDz9s5L\n\tfor <patchwork-incoming@ozlabs.org>;\n\tSat, 29 Jul 2017 04:43:14 +1000 (AEST)","from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3])\n\tby lists.ozlabs.org (Postfix) with ESMTP id 3xJyQp06C9zDrMt\n\tfor <patchwork-incoming@ozlabs.org>;\n\tSat, 29 Jul 2017 04:43:14 +1000 (AEST)","from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com\n\t[148.163.156.1])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby lists.ozlabs.org (Postfix) with ESMTPS id 3xJyNx53zNzDrS4\n\tfor <linuxppc-dev@lists.ozlabs.org>;\n\tSat, 29 Jul 2017 04:41:37 +1000 (AEST)","from pps.filterd (m0098399.ppops.net [127.0.0.1])\n\tby mx0a-001b2d01.pphosted.com (8.16.0.21/8.16.0.21) with SMTP id\n\tv6SIceGj044646\n\tfor <linuxppc-dev@lists.ozlabs.org>; Fri, 28 Jul 2017 14:41:35 -0400","from e12.ny.us.ibm.com (e12.ny.us.ibm.com [129.33.205.202])\n\tby mx0a-001b2d01.pphosted.com with ESMTP id 2c0648gb9j-1\n\t(version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT)\n\tfor <linuxppc-dev@lists.ozlabs.org>; Fri, 28 Jul 2017 14:41:34 -0400","from localhost\n\tby e12.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use\n\tOnly! Violators will be prosecuted\n\tfor <linuxppc-dev@lists.ozlabs.org> from <paulmck@linux.vnet.ibm.com>;\n\tFri, 28 Jul 2017 14:41:33 -0400","from b01cxnp22036.gho.pok.ibm.com (9.57.198.26)\n\tby e12.ny.us.ibm.com (146.89.104.199) with IBM ESMTP SMTP Gateway:\n\tAuthorized Use Only! Violators will be prosecuted; \n\tFri, 28 Jul 2017 14:41:29 -0400","from b01ledav003.gho.pok.ibm.com (b01ledav003.gho.pok.ibm.com\n\t[9.57.199.108])\n\tby b01cxnp22036.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP\n\tid v6SIfTht24445038; Fri, 28 Jul 2017 18:41:29 GMT","from b01ledav003.gho.pok.ibm.com (unknown [127.0.0.1])\n\tby IMSVA (Postfix) with ESMTP id 7B305B2054;\n\tFri, 28 Jul 2017 14:38:57 -0400 (EDT)","from paulmck-ThinkPad-W541 (unknown [9.70.82.146])\n\tby b01ledav003.gho.pok.ibm.com (Postfix) with ESMTP id 31B2CB2046;\n\tFri, 28 Jul 2017 14:38:57 -0400 (EDT)","by paulmck-ThinkPad-W541 (Postfix, from userid 1000)\n\tid C961916C2B24; Fri, 28 Jul 2017 11:41:29 -0700 (PDT)"],"Date":"Fri, 28 Jul 2017 11:41:29 -0700","From":"\"Paul E. McKenney\" <paulmck@linux.vnet.ibm.com>","To":"Boqun Feng <boqun.feng@gmail.com>","Subject":"Re: RCU lockup issues when CONFIG_SOFTLOCKUP_DETECTOR=n - any one\n\telse seeing this?","References":"<20170726.162200.1904949371593276937.davem@davemloft.net>\n\t<20170727014214.GH3730@linux.vnet.ibm.com>\n\t<20170727143400.23e4d2b2@roar.ozlabs.ibm.com>\n\t<20170727124913.GL3730@linux.vnet.ibm.com>\n\t<20170727144903.000022a1@huawei.com>\n\t<20170727173923.000001b2@huawei.com>\n\t<20170727165245.GD3730@linux.vnet.ibm.com>\n\t<20170728084411.00001ddb@huawei.com>\n\t<20170728125416.j7gcgvnxgv2gq73u@tardis>\n\t<20170728145530.GE3730@linux.vnet.ibm.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=us-ascii","Content-Disposition":"inline","In-Reply-To":"<20170728145530.GE3730@linux.vnet.ibm.com>","User-Agent":"Mutt/1.5.21 (2010-09-15)","X-TM-AS-GCONF":"00","x-cbid":"17072818-0048-0000-0000-000001CB314C","X-IBM-SpamModules-Scores":"","X-IBM-SpamModules-Versions":"BY=3.00007442; HX=3.00000241; KW=3.00000007;\n\tPH=3.00000004; SC=3.00000214; SDB=6.00894231; UDB=6.00447134;\n\tIPR=6.00674391; \n\tBA=6.00005496; NDR=6.00000001; ZLA=6.00000005; ZF=6.00000009;\n\tZB=6.00000000; \n\tZP=6.00000000; ZH=6.00000000; ZU=6.00000002; MB=3.00016428;\n\tXFM=3.00000015; UTC=2017-07-28 18:41:32","X-IBM-AV-DETECTION":"SAVI=unused REMOTE=unused XFE=unused","x-cbparentid":"17072818-0049-0000-0000-0000420B3059","Message-Id":"<20170728184129.GA24364@linux.vnet.ibm.com>","X-Proofpoint-Virus-Version":"vendor=fsecure engine=2.50.10432:, ,\n\tdefinitions=2017-07-28_09:, , signatures=0","X-Proofpoint-Spam-Details":"rule=outbound_notspam policy=outbound score=0\n\tspamscore=0 suspectscore=3\n\tmalwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam\n\tadjust=0 reason=mlx scancount=1 engine=8.0.1-1706020000\n\tdefinitions=main-1707280297","X-BeenThere":"linuxppc-dev@lists.ozlabs.org","X-Mailman-Version":"2.1.23","Precedence":"list","List-Id":"Linux on PowerPC Developers Mail List\n\t<linuxppc-dev.lists.ozlabs.org>","List-Unsubscribe":"<https://lists.ozlabs.org/options/linuxppc-dev>,\n\t<mailto:linuxppc-dev-request@lists.ozlabs.org?subject=unsubscribe>","List-Archive":"<http://lists.ozlabs.org/pipermail/linuxppc-dev/>","List-Post":"<mailto:linuxppc-dev@lists.ozlabs.org>","List-Help":"<mailto:linuxppc-dev-request@lists.ozlabs.org?subject=help>","List-Subscribe":"<https://lists.ozlabs.org/listinfo/linuxppc-dev>,\n\t<mailto:linuxppc-dev-request@lists.ozlabs.org?subject=subscribe>","Reply-To":"paulmck@linux.vnet.ibm.com","Cc":"dzickus@redhat.com, sfr@canb.auug.org.au, linuxarm@huawei.com,\n\tNicholas Piggin <npiggin@gmail.com>, abdhalee@linux.vnet.ibm.com,\n\tJonathan Cameron <Jonathan.Cameron@huawei.com>,\n\tsparclinux@vger.kernel.org, \n\takpm@linux-foundation.org, linuxppc-dev@lists.ozlabs.org,\n\tDavid Miller <davem@davemloft.net>, linux-arm-kernel@lists.infradead.org","Errors-To":"linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org","Sender":"\"Linuxppc-dev\"\n\t<linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org>"}},{"id":1732358,"web_url":"http://patchwork.ozlabs.org/comment/1732358/","msgid":"<20170728.114234.665847938315546094.davem@davemloft.net>","date":"2017-07-28T18:42:34","subject":"Re: RCU lockup issues when CONFIG_SOFTLOCKUP_DETECTOR=n - any one\n\telse seeing this?","submitter":{"id":15,"url":"http://patchwork.ozlabs.org/api/people/15/","name":"David Miller","email":"davem@davemloft.net"},"content":"From: Boqun Feng <boqun.feng@gmail.com>\nDate: Fri, 28 Jul 2017 20:54:16 +0800\n\n> Hi Jonathan,\n> \n> FWIW, there is wakeup-missing issue in swake_up() and swake_up_all():\n> \n> \thttps://marc.info/?l=linux-kernel&m=149750022019663\n> \n> and RCU begins to use swait/wake last year, so I thought this could be\n> relevant.\n> \n> Could you try the following patch and see if it works? Thanks.\n\nJust FYI I'm testing this patch now on sparc64...","headers":{"Return-Path":"<linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org>","X-Original-To":["patchwork-incoming@ozlabs.org","linuxppc-dev@lists.ozlabs.org"],"Delivered-To":["patchwork-incoming@ozlabs.org","linuxppc-dev@lists.ozlabs.org"],"Received":["from lists.ozlabs.org (lists.ozlabs.org [103.22.144.68])\n\t(using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xJyTB0JN9z9s5L\n\tfor <patchwork-incoming@ozlabs.org>;\n\tSat, 29 Jul 2017 04:45:18 +1000 (AEST)","from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3])\n\tby lists.ozlabs.org (Postfix) with ESMTP id 3xJyT96Vy4zDrT6\n\tfor <patchwork-incoming@ozlabs.org>;\n\tSat, 29 Jul 2017 04:45:17 +1000 (AEST)","from shards.monkeyblade.net (shards.monkeyblade.net\n\t[184.105.139.130])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby lists.ozlabs.org (Postfix) with ESMTPS id 3xJyQ94L8FzDrS5\n\tfor <linuxppc-dev@lists.ozlabs.org>;\n\tSat, 29 Jul 2017 04:42:38 +1000 (AEST)","from localhost (74-93-104-98-Washington.hfc.comcastbusiness.net\n\t[74.93.104.98]) (using TLSv1 with cipher AES256-SHA (256/256 bits))\n\t(Client did not present a certificate)\n\t(Authenticated sender: davem-davemloft)\n\tby shards.monkeyblade.net (Postfix) with ESMTPSA id 10DC113534D9A;\n\tFri, 28 Jul 2017 11:42:35 -0700 (PDT)"],"Date":"Fri, 28 Jul 2017 11:42:34 -0700 (PDT)","Message-Id":"<20170728.114234.665847938315546094.davem@davemloft.net>","To":"boqun.feng@gmail.com","Subject":"Re: RCU lockup issues when CONFIG_SOFTLOCKUP_DETECTOR=n - any one\n\telse seeing this?","From":"David Miller <davem@davemloft.net>","In-Reply-To":"<20170728125416.j7gcgvnxgv2gq73u@tardis>","References":"<20170727165245.GD3730@linux.vnet.ibm.com>\n\t<20170728084411.00001ddb@huawei.com>\n\t<20170728125416.j7gcgvnxgv2gq73u@tardis>","X-Mailer":"Mew version 6.7 on Emacs 25.2 / Mule 6.0 (HANACHIRUSATO)","Mime-Version":"1.0","Content-Type":"Text/Plain; charset=us-ascii","Content-Transfer-Encoding":"7bit","X-Greylist":"Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.12\n\t(shards.monkeyblade.net [149.20.54.216]);\n\tFri, 28 Jul 2017 11:42:35 -0700 (PDT)","X-BeenThere":"linuxppc-dev@lists.ozlabs.org","X-Mailman-Version":"2.1.23","Precedence":"list","List-Id":"Linux on PowerPC Developers Mail List\n\t<linuxppc-dev.lists.ozlabs.org>","List-Unsubscribe":"<https://lists.ozlabs.org/options/linuxppc-dev>,\n\t<mailto:linuxppc-dev-request@lists.ozlabs.org?subject=unsubscribe>","List-Archive":"<http://lists.ozlabs.org/pipermail/linuxppc-dev/>","List-Post":"<mailto:linuxppc-dev@lists.ozlabs.org>","List-Help":"<mailto:linuxppc-dev-request@lists.ozlabs.org?subject=help>","List-Subscribe":"<https://lists.ozlabs.org/listinfo/linuxppc-dev>,\n\t<mailto:linuxppc-dev-request@lists.ozlabs.org?subject=subscribe>","Cc":"dzickus@redhat.com, sfr@canb.auug.org.au, linuxarm@huawei.com,\n\tnpiggin@gmail.com, abdhalee@linux.vnet.ibm.com,\n\tJonathan.Cameron@huawei.com, \n\tsparclinux@vger.kernel.org, akpm@linux-foundation.org,\n\tpaulmck@linux.vnet.ibm.com, linuxppc-dev@lists.ozlabs.org,\n\tlinux-arm-kernel@lists.infradead.org","Errors-To":"linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org","Sender":"\"Linuxppc-dev\"\n\t<linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org>"}},{"id":1732404,"web_url":"http://patchwork.ozlabs.org/comment/1732404/","msgid":"<20170728190956.GA26640@linux.vnet.ibm.com>","date":"2017-07-28T19:09:56","subject":"Re: RCU lockup issues when CONFIG_SOFTLOCKUP_DETECTOR=n - any one\n\telse seeing this?","submitter":{"id":81,"url":"http://patchwork.ozlabs.org/api/people/81/","name":"Paul E. McKenney","email":"paulmck@linux.vnet.ibm.com"},"content":"On Fri, Jul 28, 2017 at 11:41:29AM -0700, Paul E. McKenney wrote:\n> On Fri, Jul 28, 2017 at 07:55:30AM -0700, Paul E. McKenney wrote:\n> > On Fri, Jul 28, 2017 at 08:54:16PM +0800, Boqun Feng wrote:\n\n[ . . . ]\n\n> > Even though Jonathan's testing indicates that it didn't fix this\n> > particular problem:\n> > \n> > Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>\n> \n> And while we are at it:\n> \n> Tested-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>\n\nNot because it it fixed the TREE01 issue -- it did not.  But as near\nas I can see, it didn't cause any additional issues.\n\n\t\t\t\t\t\t\tThanx, Paul","headers":{"Return-Path":"<linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org>","X-Original-To":["patchwork-incoming@ozlabs.org","linuxppc-dev@lists.ozlabs.org"],"Delivered-To":["patchwork-incoming@ozlabs.org","linuxppc-dev@lists.ozlabs.org"],"Received":["from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3])\n\t(using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xJz8N5BqPz9s65\n\tfor <patchwork-incoming@ozlabs.org>;\n\tSat, 29 Jul 2017 05:15:48 +1000 (AEST)","from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3])\n\tby lists.ozlabs.org (Postfix) with ESMTP id 3xJz8N2lFqzDrVj\n\tfor <patchwork-incoming@ozlabs.org>;\n\tSat, 29 Jul 2017 05:15:48 +1000 (AEST)","from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com\n\t[148.163.156.1])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby lists.ozlabs.org (Postfix) with ESMTPS id 3xJz1n5vyGzDrVT\n\tfor <linuxppc-dev@lists.ozlabs.org>;\n\tSat, 29 Jul 2017 05:10:05 +1000 (AEST)","from pps.filterd (m0098399.ppops.net [127.0.0.1])\n\tby mx0a-001b2d01.pphosted.com (8.16.0.21/8.16.0.21) with SMTP id\n\tv6SJ9vtT105824\n\tfor <linuxppc-dev@lists.ozlabs.org>; Fri, 28 Jul 2017 15:10:03 -0400","from e19.ny.us.ibm.com (e19.ny.us.ibm.com [129.33.205.209])\n\tby mx0a-001b2d01.pphosted.com with ESMTP id 2c0648hcdk-1\n\t(version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT)\n\tfor <linuxppc-dev@lists.ozlabs.org>; Fri, 28 Jul 2017 15:10:02 -0400","from localhost\n\tby e19.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use\n\tOnly! Violators will be prosecuted\n\tfor <linuxppc-dev@lists.ozlabs.org> from <paulmck@linux.vnet.ibm.com>;\n\tFri, 28 Jul 2017 15:10:01 -0400","from b01cxnp23032.gho.pok.ibm.com (9.57.198.27)\n\tby e19.ny.us.ibm.com (146.89.104.206) with IBM ESMTP SMTP Gateway:\n\tAuthorized Use Only! Violators will be prosecuted; \n\tFri, 28 Jul 2017 15:09:57 -0400","from b01ledav003.gho.pok.ibm.com (b01ledav003.gho.pok.ibm.com\n\t[9.57.199.108])\n\tby b01cxnp23032.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP\n\tid v6SJ9ulh23986202; Fri, 28 Jul 2017 19:09:56 GMT","from b01ledav003.gho.pok.ibm.com (unknown [127.0.0.1])\n\tby IMSVA (Postfix) with ESMTP id 63C0BB205F;\n\tFri, 28 Jul 2017 15:07:24 -0400 (EDT)","from paulmck-ThinkPad-W541 (unknown [9.70.82.146])\n\tby b01ledav003.gho.pok.ibm.com (Postfix) with ESMTP id 35241B2050;\n\tFri, 28 Jul 2017 15:07:24 -0400 (EDT)","by paulmck-ThinkPad-W541 (Postfix, from userid 1000)\n\tid CFD5116C2B24; Fri, 28 Jul 2017 12:09:56 -0700 (PDT)"],"Date":"Fri, 28 Jul 2017 12:09:56 -0700","From":"\"Paul E. McKenney\" <paulmck@linux.vnet.ibm.com>","To":"Boqun Feng <boqun.feng@gmail.com>","Subject":"Re: RCU lockup issues when CONFIG_SOFTLOCKUP_DETECTOR=n - any one\n\telse seeing this?","References":"<20170727014214.GH3730@linux.vnet.ibm.com>\n\t<20170727143400.23e4d2b2@roar.ozlabs.ibm.com>\n\t<20170727124913.GL3730@linux.vnet.ibm.com>\n\t<20170727144903.000022a1@huawei.com>\n\t<20170727173923.000001b2@huawei.com>\n\t<20170727165245.GD3730@linux.vnet.ibm.com>\n\t<20170728084411.00001ddb@huawei.com>\n\t<20170728125416.j7gcgvnxgv2gq73u@tardis>\n\t<20170728145530.GE3730@linux.vnet.ibm.com>\n\t<20170728184129.GA24364@linux.vnet.ibm.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=us-ascii","Content-Disposition":"inline","In-Reply-To":"<20170728184129.GA24364@linux.vnet.ibm.com>","User-Agent":"Mutt/1.5.21 (2010-09-15)","X-TM-AS-GCONF":"00","x-cbid":"17072819-0056-0000-0000-000003AE3379","X-IBM-SpamModules-Scores":"","X-IBM-SpamModules-Versions":"BY=3.00007442; HX=3.00000241; KW=3.00000007;\n\tPH=3.00000004; SC=3.00000214; SDB=6.00894240; UDB=6.00447140;\n\tIPR=6.00674401; \n\tBA=6.00005496; NDR=6.00000001; ZLA=6.00000005; ZF=6.00000009;\n\tZB=6.00000000; \n\tZP=6.00000000; ZH=6.00000000; ZU=6.00000002; MB=3.00016429;\n\tXFM=3.00000015; UTC=2017-07-28 19:10:00","X-IBM-AV-DETECTION":"SAVI=unused REMOTE=unused XFE=unused","x-cbparentid":"17072819-0057-0000-0000-000007E454E0","Message-Id":"<20170728190956.GA26640@linux.vnet.ibm.com>","X-Proofpoint-Virus-Version":"vendor=fsecure engine=2.50.10432:, ,\n\tdefinitions=2017-07-28_09:, , signatures=0","X-Proofpoint-Spam-Details":"rule=outbound_notspam policy=outbound score=0\n\tspamscore=0 suspectscore=0\n\tmalwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam\n\tadjust=0 reason=mlx scancount=1 engine=8.0.1-1706020000\n\tdefinitions=main-1707280306","X-BeenThere":"linuxppc-dev@lists.ozlabs.org","X-Mailman-Version":"2.1.23","Precedence":"list","List-Id":"Linux on PowerPC Developers Mail List\n\t<linuxppc-dev.lists.ozlabs.org>","List-Unsubscribe":"<https://lists.ozlabs.org/options/linuxppc-dev>,\n\t<mailto:linuxppc-dev-request@lists.ozlabs.org?subject=unsubscribe>","List-Archive":"<http://lists.ozlabs.org/pipermail/linuxppc-dev/>","List-Post":"<mailto:linuxppc-dev@lists.ozlabs.org>","List-Help":"<mailto:linuxppc-dev-request@lists.ozlabs.org?subject=help>","List-Subscribe":"<https://lists.ozlabs.org/listinfo/linuxppc-dev>,\n\t<mailto:linuxppc-dev-request@lists.ozlabs.org?subject=subscribe>","Reply-To":"paulmck@linux.vnet.ibm.com","Cc":"dzickus@redhat.com, sfr@canb.auug.org.au, linuxarm@huawei.com,\n\tNicholas Piggin <npiggin@gmail.com>, abdhalee@linux.vnet.ibm.com,\n\tJonathan Cameron <Jonathan.Cameron@huawei.com>,\n\tsparclinux@vger.kernel.org, \n\takpm@linux-foundation.org, linuxppc-dev@lists.ozlabs.org,\n\tDavid Miller <davem@davemloft.net>, linux-arm-kernel@lists.infradead.org","Errors-To":"linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org","Sender":"\"Linuxppc-dev\"\n\t<linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org>"}},{"id":1732671,"web_url":"http://patchwork.ozlabs.org/comment/1732671/","msgid":"<20170729012049.xyaeiqukhzcvj7mf@tardis>","date":"2017-07-29T01:20:49","subject":"Re: RCU lockup issues when CONFIG_SOFTLOCKUP_DETECTOR=n - any one\n\telse seeing this?","submitter":{"id":67102,"url":"http://patchwork.ozlabs.org/api/people/67102/","name":"Boqun Feng","email":"boqun.feng@gmail.com"},"content":"On Fri, Jul 28, 2017 at 11:41:29AM -0700, Paul E. McKenney wrote:\n> On Fri, Jul 28, 2017 at 07:55:30AM -0700, Paul E. McKenney wrote:\n> > On Fri, Jul 28, 2017 at 08:54:16PM +0800, Boqun Feng wrote:\n> > > Hi Jonathan,\n> > > \n> > > FWIW, there is wakeup-missing issue in swake_up() and swake_up_all():\n> > > \n> > > \thttps://marc.info/?l=linux-kernel&m=149750022019663\n> > > \n> > > and RCU begins to use swait/wake last year, so I thought this could be\n> > > relevant.\n> > > \n> > > Could you try the following patch and see if it works? Thanks.\n> > > \n> > > Regards,\n> > > Boqun\n> > > \n> > > ------------------>8\n> > > Subject: [PATCH] swait: Remove the lockless swait_active() check in\n> > >  swake_up*()\n> > > \n> > > Steven Rostedt reported a potential race in RCU core because of\n> > > swake_up():\n> > > \n> > >         CPU0                            CPU1\n> > >         ----                            ----\n> > >                                 __call_rcu_core() {\n> > > \n> > >                                  spin_lock(rnp_root)\n> > >                                  need_wake = __rcu_start_gp() {\n> > >                                   rcu_start_gp_advanced() {\n> > >                                    gp_flags = FLAG_INIT\n> > >                                   }\n> > >                                  }\n> > > \n> > >  rcu_gp_kthread() {\n> > >    swait_event_interruptible(wq,\n> > >         gp_flags & FLAG_INIT) {\n> > \n> > So the idea is that we get the old value of ->gp_flags here, correct?\n> > \n\nYes.\n\n> > >    spin_lock(q->lock)\n> > > \n> > >                                 *fetch wq->task_list here! *\n> > \n> > And the above fetch is really part of the swait_active() called out\n> > below, right?\n> > \n\nRight.\n\n> > >    list_add(wq->task_list, q->task_list)\n> > >    spin_unlock(q->lock);\n> > > \n> > >    *fetch old value of gp_flags here *\n> > \n> > And here we fetch the old value of ->gp_flags again, this time under\n> > the lock, right?\n> > \n\nHmm.. a bit different, this time is still lockless but *after* the wait\nenqueued itself. We could rely on the spin_lock(q->lock) above to pair\nwith a spin_unlock() from another lock critical section of accessing\nthe wait queue(typically from some waker). But in the case Steven came\nup, there is an lockless accessing to the wait queue from the waker, so\nsuch a pair doesn't exist, which end up that the waker sees a empty wait\nqueue and do nothing, while the waiter still observes the old value\nafter its enqueue and goes to sleep.\n\n> > >                                  spin_unlock(rnp_root)\n> > > \n> > >                                  rcu_gp_kthread_wake() {\n> > >                                   swake_up(wq) {\n> > >                                    swait_active(wq) {\n> > >                                     list_empty(wq->task_list)\n> > > \n> > >                                    } * return false *\n> > > \n> > >   if (condition) * false *\n> > >     schedule();\n> > > \n> > > In this case, a wakeup is missed, which could cause the rcu_gp_kthread\n> > > waits for a long time.\n> > > \n> > > The reason of this is that we do a lockless swait_active() check in\n> > > swake_up(). To fix this, we can either 1) add a smp_mb() in swake_up()\n> > > before swait_active() to provide the proper order or 2) simply remove\n> > > the swait_active() in swake_up().\n> > > \n> > > The solution 2 not only fixes this problem but also keeps the swait and\n> > > wait API as close as possible, as wake_up() doesn't provide a full\n> > > barrier and doesn't do a lockless check of the wait queue either.\n> > > Moreover, there are users already using swait_active() to do their quick\n> > > checks for the wait queues, so it make less sense that swake_up() and\n> > > swake_up_all() do this on their own.\n> > > \n> > > This patch then removes the lockless swait_active() check in swake_up()\n> > > and swake_up_all().\n> > > \n> > > Reported-by: Steven Rostedt <rostedt@goodmis.org>\n> > > Signed-off-by: Boqun Feng <boqun.feng@gmail.com>\n> > \n> > Even though Jonathan's testing indicates that it didn't fix this\n> > particular problem:\n> > \n> > Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>\n> \n> And while we are at it:\n> \n> Tested-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>\n> \n\nThanks!\n\nRegards,\nBoqun\n\n> > > ---\n> > >  kernel/sched/swait.c | 6 ------\n> > >  1 file changed, 6 deletions(-)\n> > > \n> > > diff --git a/kernel/sched/swait.c b/kernel/sched/swait.c\n> > > index 3d5610dcce11..2227e183e202 100644\n> > > --- a/kernel/sched/swait.c\n> > > +++ b/kernel/sched/swait.c\n> > > @@ -33,9 +33,6 @@ void swake_up(struct swait_queue_head *q)\n> > >  {\n> > >  \tunsigned long flags;\n> > > \n> > > -\tif (!swait_active(q))\n> > > -\t\treturn;\n> > > -\n> > >  \traw_spin_lock_irqsave(&q->lock, flags);\n> > >  \tswake_up_locked(q);\n> > >  \traw_spin_unlock_irqrestore(&q->lock, flags);\n> > > @@ -51,9 +48,6 @@ void swake_up_all(struct swait_queue_head *q)\n> > >  \tstruct swait_queue *curr;\n> > >  \tLIST_HEAD(tmp);\n> > > \n> > > -\tif (!swait_active(q))\n> > > -\t\treturn;\n> > > -\n> > >  \traw_spin_lock_irq(&q->lock);\n> > >  \tlist_splice_init(&q->task_list, &tmp);\n> > >  \twhile (!list_empty(&tmp)) {\n> > > -- \n> > > 2.13.0\n> > > \n>","headers":{"Return-Path":"<linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org>","X-Original-To":["patchwork-incoming@ozlabs.org","linuxppc-dev@lists.ozlabs.org"],"Delivered-To":["patchwork-incoming@ozlabs.org","linuxppc-dev@lists.ozlabs.org"],"Received":["from lists.ozlabs.org (lists.ozlabs.org [103.22.144.68])\n\t(using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xK7HJ3pRTz9s4q\n\tfor <patchwork-incoming@ozlabs.org>;\n\tSat, 29 Jul 2017 11:22:20 +1000 (AEST)","from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3])\n\tby lists.ozlabs.org (Postfix) with ESMTP id 3xK7HJ2WQgzDrW0\n\tfor <patchwork-incoming@ozlabs.org>;\n\tSat, 29 Jul 2017 11:22:20 +1000 (AEST)","from mail-pf0-x244.google.com (mail-pf0-x244.google.com\n\t[IPv6:2607:f8b0:400e:c00::244])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128\n\tbits)) (No client certificate requested)\n\tby lists.ozlabs.org (Postfix) with ESMTPS id 3xK7Ff72bkzDrVg\n\tfor <linuxppc-dev@lists.ozlabs.org>;\n\tSat, 29 Jul 2017 11:20:54 +1000 (AEST)","by mail-pf0-x244.google.com with SMTP id u17so3335594pfa.1\n\tfor <linuxppc-dev@lists.ozlabs.org>;\n\tFri, 28 Jul 2017 18:20:54 -0700 (PDT)","from localhost ([45.32.128.109]) by smtp.gmail.com with ESMTPSA id\n\ty22sm41766810pfi.159.2017.07.28.18.20.50\n\t(version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256);\n\tFri, 28 Jul 2017 18:20:51 -0700 (PDT)"],"Authentication-Results":["ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=gmail.com header.i=@gmail.com\n\theader.b=\"LGB04hE2\"; dkim-atps=neutral","lists.ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=gmail.com header.i=@gmail.com\n\theader.b=\"LGB04hE2\"; dkim-atps=neutral","lists.ozlabs.org; dkim=pass (2048-bit key;\n\tunprotected) header.d=gmail.com header.i=@gmail.com\n\theader.b=\"LGB04hE2\"; dkim-atps=neutral"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;\n\th=date:from:to:cc:subject:message-id:references:mime-version\n\t:content-disposition:in-reply-to:user-agent;\n\tbh=mT9ln9fQgO2jCGi0cwpZAAwA4F1dB4oCTXek+eLsJrE=;\n\tb=LGB04hE2IiwZcpluoCPir14Vcf3vqEOfKMyYklnTssgM6+5nA3urzE4+hTpuvQmFPR\n\t/pDbOhuhss3SZ82GyBhj30/lg47C4Ud4iFwDNm+OaZPATJJVyI4SWKrUXTWNryK6E1Sl\n\twbTK6DpkPpR+aEIAWO0Y6KuilJrtreNMzW7xSBlmevDUDYH1PKW98Q4mTaCB3wNDCc9H\n\t9xjRSV3yRqpce7bdJ1zqod6qnPY4hc3wdQrYqKB+3+WhkWvB7EJlwgu+7lyDYGi+jOZ0\n\toHKw3qX2nl0J53rOCJw8ZvvJfq75kCTGXeGtdxWAmTfmxmL0ZLtDjY66hr3OnlsHOsBm\n\tcBoQ==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:date:from:to:cc:subject:message-id:references\n\t:mime-version:content-disposition:in-reply-to:user-agent;\n\tbh=mT9ln9fQgO2jCGi0cwpZAAwA4F1dB4oCTXek+eLsJrE=;\n\tb=NmzHO1vKA525Tt5uoQg2FmVCbke0FM72ZEZoU+YvSS+55Rreax0V30DdI/N/CV1N6b\n\t3bIcWcbcAfcSS6uZ95BJDC2IZ5MZzqv7M2lVLYmCvQADsXtq09WCE7ISq3c98oXWLJlF\n\tojD8BTD1Ovs8JBHSK//GB7Og/mcr6JiAK0LvVTsE0RJ0HmPje4WBnS0nVmB0R2Hlstg0\n\tmxEy9OrQ2CLmt6NBUNLZH6D9bY8wx+2B+pJFXvWYPUCAAPZdoCx3ev1lu57MDxQ/VxiH\n\tD82E2We9HkTyfQ7QugWJFH5nYrLyxptcR5vT0aVusXhxxo6uYkhMRhsnjpN+5zlFoh6/\n\toB1w==","X-Gm-Message-State":"AIVw1128I1XZkUUq9M3470dreajsryGR29BMI84zUTgYu3ZE4q38pW6P\n\tamaDkvbBHDk36w==","X-Received":"by 10.99.37.135 with SMTP id l129mr8717860pgl.404.1501291252836; \n\tFri, 28 Jul 2017 18:20:52 -0700 (PDT)","Date":"Sat, 29 Jul 2017 09:20:49 +0800","From":"Boqun Feng <boqun.feng@gmail.com>","To":"\"Paul E. McKenney\" <paulmck@linux.vnet.ibm.com>","Subject":"Re: RCU lockup issues when CONFIG_SOFTLOCKUP_DETECTOR=n - any one\n\telse seeing this?","Message-ID":"<20170729012049.xyaeiqukhzcvj7mf@tardis>","References":"<20170727014214.GH3730@linux.vnet.ibm.com>\n\t<20170727143400.23e4d2b2@roar.ozlabs.ibm.com>\n\t<20170727124913.GL3730@linux.vnet.ibm.com>\n\t<20170727144903.000022a1@huawei.com>\n\t<20170727173923.000001b2@huawei.com>\n\t<20170727165245.GD3730@linux.vnet.ibm.com>\n\t<20170728084411.00001ddb@huawei.com>\n\t<20170728125416.j7gcgvnxgv2gq73u@tardis>\n\t<20170728145530.GE3730@linux.vnet.ibm.com>\n\t<20170728184129.GA24364@linux.vnet.ibm.com>","MIME-Version":"1.0","Content-Type":"multipart/signed; micalg=pgp-sha256;\n\tprotocol=\"application/pgp-signature\"; boundary=\"j5ye6wdmhn62lpcy\"","Content-Disposition":"inline","In-Reply-To":"<20170728184129.GA24364@linux.vnet.ibm.com>","User-Agent":"NeoMutt/20170609 (1.8.3)","X-BeenThere":"linuxppc-dev@lists.ozlabs.org","X-Mailman-Version":"2.1.23","Precedence":"list","List-Id":"Linux on PowerPC Developers Mail List\n\t<linuxppc-dev.lists.ozlabs.org>","List-Unsubscribe":"<https://lists.ozlabs.org/options/linuxppc-dev>,\n\t<mailto:linuxppc-dev-request@lists.ozlabs.org?subject=unsubscribe>","List-Archive":"<http://lists.ozlabs.org/pipermail/linuxppc-dev/>","List-Post":"<mailto:linuxppc-dev@lists.ozlabs.org>","List-Help":"<mailto:linuxppc-dev-request@lists.ozlabs.org?subject=help>","List-Subscribe":"<https://lists.ozlabs.org/listinfo/linuxppc-dev>,\n\t<mailto:linuxppc-dev-request@lists.ozlabs.org?subject=subscribe>","Cc":"dzickus@redhat.com, sfr@canb.auug.org.au, linuxarm@huawei.com,\n\tNicholas Piggin <npiggin@gmail.com>, abdhalee@linux.vnet.ibm.com,\n\tJonathan Cameron <Jonathan.Cameron@huawei.com>,\n\tsparclinux@vger.kernel.org, \n\takpm@linux-foundation.org, linuxppc-dev@lists.ozlabs.org,\n\tDavid Miller <davem@davemloft.net>, linux-arm-kernel@lists.infradead.org","Errors-To":"linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org","Sender":"\"Linuxppc-dev\"\n\t<linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org>"}},{"id":1733053,"web_url":"http://patchwork.ozlabs.org/comment/1733053/","msgid":"<20170730133747.anusyacw2l5hhjgx@tardis>","date":"2017-07-30T13:37:47","subject":"Re: RCU lockup issues when CONFIG_SOFTLOCKUP_DETECTOR=n - any one\n\telse seeing this?","submitter":{"id":67102,"url":"http://patchwork.ozlabs.org/api/people/67102/","name":"Boqun Feng","email":"boqun.feng@gmail.com"},"content":"On Fri, Jul 28, 2017 at 12:09:56PM -0700, Paul E. McKenney wrote:\n> On Fri, Jul 28, 2017 at 11:41:29AM -0700, Paul E. McKenney wrote:\n> > On Fri, Jul 28, 2017 at 07:55:30AM -0700, Paul E. McKenney wrote:\n> > > On Fri, Jul 28, 2017 at 08:54:16PM +0800, Boqun Feng wrote:\n> \n> [ . . . ]\n> \n> > > Even though Jonathan's testing indicates that it didn't fix this\n> > > particular problem:\n> > > \n> > > Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>\n> > \n> > And while we are at it:\n> > \n> > Tested-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>\n> \n> Not because it it fixed the TREE01 issue -- it did not.  But as near\n> as I can see, it didn't cause any additional issues.\n> \n\nUnderstood.\n\nStill work on waketorture for a test case which could trigger this\nproblem in a real world. My old plan is to send this out when I could\nuse waketorture to show this patch actually resolves some potential\nbugs, but just put it ahead here in case it may help.\n\nWill send it out with your Tested-by and Acked-by and continue to work\non waketorture.\n\nRegards,\nBoqun\n\n> \t\t\t\t\t\t\tThanx, Paul\n>","headers":{"Return-Path":"<linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org>","X-Original-To":["patchwork-incoming@ozlabs.org","linuxppc-dev@lists.ozlabs.org"],"Delivered-To":["patchwork-incoming@ozlabs.org","linuxppc-dev@lists.ozlabs.org"],"Received":["from lists.ozlabs.org (lists.ozlabs.org [103.22.144.68])\n\t(using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xL3bG0BRcz9sDB\n\tfor <patchwork-incoming@ozlabs.org>;\n\tSun, 30 Jul 2017 23:39:22 +1000 (AEST)","from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3])\n\tby lists.ozlabs.org (Postfix) with ESMTP id 3xL3bF67JmzDr46\n\tfor <patchwork-incoming@ozlabs.org>;\n\tSun, 30 Jul 2017 23:39:21 +1000 (AEST)","from mail-pf0-x234.google.com (mail-pf0-x234.google.com\n\t[IPv6:2607:f8b0:400e:c00::234])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128\n\tbits)) (No client certificate requested)\n\tby lists.ozlabs.org (Postfix) with ESMTPS id 3xL3YV35KvzDr2v\n\tfor <linuxppc-dev@lists.ozlabs.org>;\n\tSun, 30 Jul 2017 23:37:50 +1000 (AEST)","by mail-pf0-x234.google.com with SMTP id z129so71928316pfb.3\n\tfor <linuxppc-dev@lists.ozlabs.org>;\n\tSun, 30 Jul 2017 06:37:50 -0700 (PDT)","from localhost ([45.32.128.109]) by smtp.gmail.com with ESMTPSA id\n\tx66sm43936403pfx.181.2017.07.30.06.37.45\n\t(version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256);\n\tSun, 30 Jul 2017 06:37:46 -0700 (PDT)"],"Authentication-Results":["ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=gmail.com header.i=@gmail.com\n\theader.b=\"phWAFNj3\"; dkim-atps=neutral","lists.ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=gmail.com header.i=@gmail.com\n\theader.b=\"phWAFNj3\"; dkim-atps=neutral","lists.ozlabs.org; dkim=pass (2048-bit key;\n\tunprotected) header.d=gmail.com header.i=@gmail.com\n\theader.b=\"phWAFNj3\"; dkim-atps=neutral"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;\n\th=date:from:to:cc:subject:message-id:references:mime-version\n\t:content-disposition:in-reply-to:user-agent;\n\tbh=+quseB2gNE9/1LzwEAmxfj/Av+4RehzApKuPX8dRWcs=;\n\tb=phWAFNj3aiB7lIOI4WLbGcTSvR6/AV/Lg5qGWxmaGtD+KCPdqnqXMOXojxTz4ddpd/\n\taVhZSCT0EPXM7+iSNIeA5+VXDmoDbLaltGGAOmWsj5SIINQR5HBkGccICmtCWNOZ4sw4\n\t0N7T0l6fWApTkFF/zlDdmusj6UTsO1lkrUW7jfmJJFn7Hfwo8MmZuEAyrviTQi3WcPrc\n\tPaPLl+n1JiJLb9tic5omGCG90uSITwWANK1T87C5OGefVcP0N+UpXfWpZLnfYW1um5oc\n\tJnQiP4x/kPGuIX4KUFVokFy5rjL0SMkURDjvK0+FpYTamg/V5hJv2l+EVkWLo+8bNpWb\n\tIClA==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:date:from:to:cc:subject:message-id:references\n\t:mime-version:content-disposition:in-reply-to:user-agent;\n\tbh=+quseB2gNE9/1LzwEAmxfj/Av+4RehzApKuPX8dRWcs=;\n\tb=HJwZbOhxgi7fGvkYcapi7H7vqHApH8QVtqHPzt2zNFKgzDJiAmiL1Xnv6LL0thCNyO\n\tyWJnSQJW4907fuRsDxRaWpuNV16/+IYPn1xcjPJSM2Ql7qrwk8BHod1baeCol+aEdLZC\n\tFQOYet8hnhK+NEiByDZgMv6hEY5hwDH3uwmxm5AuBAbQk09wvp0H1BjR6rWp6aFqZkc7\n\tIEj4C/lBREnjqKMdoK1MRy3Yg5mosTSSUT2yG05PsAwOd8Kx06Rxf+fodVUA7P9aGLh7\n\tsQJDY2+MPeINfIFdhDSTWA0tgAYI/ZSVRv4MuU0zORo22EauqqlfLKMnqwcpI6l5/1OA\n\twjmw==","X-Gm-Message-State":"AIVw113DCIWYhnbkzy0ewtWGOfK/6VWWgtKvP3ZubC0u/rh9RuVUBXo1\n\t+2WE76PIy+LVlQ==","X-Received":"by 10.84.217.75 with SMTP id e11mr224227plj.152.1501421867642;\n\tSun, 30 Jul 2017 06:37:47 -0700 (PDT)","Date":"Sun, 30 Jul 2017 21:37:47 +0800","From":"Boqun Feng <boqun.feng@gmail.com>","To":"\"Paul E. McKenney\" <paulmck@linux.vnet.ibm.com>","Subject":"Re: RCU lockup issues when CONFIG_SOFTLOCKUP_DETECTOR=n - any one\n\telse seeing this?","Message-ID":"<20170730133747.anusyacw2l5hhjgx@tardis>","References":"<20170727143400.23e4d2b2@roar.ozlabs.ibm.com>\n\t<20170727124913.GL3730@linux.vnet.ibm.com>\n\t<20170727144903.000022a1@huawei.com>\n\t<20170727173923.000001b2@huawei.com>\n\t<20170727165245.GD3730@linux.vnet.ibm.com>\n\t<20170728084411.00001ddb@huawei.com>\n\t<20170728125416.j7gcgvnxgv2gq73u@tardis>\n\t<20170728145530.GE3730@linux.vnet.ibm.com>\n\t<20170728184129.GA24364@linux.vnet.ibm.com>\n\t<20170728190956.GA26640@linux.vnet.ibm.com>","MIME-Version":"1.0","Content-Type":"multipart/signed; micalg=pgp-sha256;\n\tprotocol=\"application/pgp-signature\"; boundary=\"fq4swd667bw3cpsc\"","Content-Disposition":"inline","In-Reply-To":"<20170728190956.GA26640@linux.vnet.ibm.com>","User-Agent":"NeoMutt/20170609 (1.8.3)","X-BeenThere":"linuxppc-dev@lists.ozlabs.org","X-Mailman-Version":"2.1.23","Precedence":"list","List-Id":"Linux on PowerPC Developers Mail List\n\t<linuxppc-dev.lists.ozlabs.org>","List-Unsubscribe":"<https://lists.ozlabs.org/options/linuxppc-dev>,\n\t<mailto:linuxppc-dev-request@lists.ozlabs.org?subject=unsubscribe>","List-Archive":"<http://lists.ozlabs.org/pipermail/linuxppc-dev/>","List-Post":"<mailto:linuxppc-dev@lists.ozlabs.org>","List-Help":"<mailto:linuxppc-dev-request@lists.ozlabs.org?subject=help>","List-Subscribe":"<https://lists.ozlabs.org/listinfo/linuxppc-dev>,\n\t<mailto:linuxppc-dev-request@lists.ozlabs.org?subject=subscribe>","Cc":"dzickus@redhat.com, sfr@canb.auug.org.au, linuxarm@huawei.com,\n\tNicholas Piggin <npiggin@gmail.com>, abdhalee@linux.vnet.ibm.com,\n\tJonathan Cameron <Jonathan.Cameron@huawei.com>,\n\tsparclinux@vger.kernel.org, \n\takpm@linux-foundation.org, linuxppc-dev@lists.ozlabs.org,\n\tDavid Miller <davem@davemloft.net>, linux-arm-kernel@lists.infradead.org","Errors-To":"linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org","Sender":"\"Linuxppc-dev\"\n\t<linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org>"}},{"id":1733104,"web_url":"http://patchwork.ozlabs.org/comment/1733104/","msgid":"<20170730165901.GX3730@linux.vnet.ibm.com>","date":"2017-07-30T16:59:01","subject":"Re: RCU lockup issues when CONFIG_SOFTLOCKUP_DETECTOR=n - any one\n\telse seeing this?","submitter":{"id":81,"url":"http://patchwork.ozlabs.org/api/people/81/","name":"Paul E. McKenney","email":"paulmck@linux.vnet.ibm.com"},"content":"On Sun, Jul 30, 2017 at 09:37:47PM +0800, Boqun Feng wrote:\n> On Fri, Jul 28, 2017 at 12:09:56PM -0700, Paul E. McKenney wrote:\n> > On Fri, Jul 28, 2017 at 11:41:29AM -0700, Paul E. McKenney wrote:\n> > > On Fri, Jul 28, 2017 at 07:55:30AM -0700, Paul E. McKenney wrote:\n> > > > On Fri, Jul 28, 2017 at 08:54:16PM +0800, Boqun Feng wrote:\n> > \n> > [ . . . ]\n> > \n> > > > Even though Jonathan's testing indicates that it didn't fix this\n> > > > particular problem:\n> > > > \n> > > > Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>\n> > > \n> > > And while we are at it:\n> > > \n> > > Tested-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>\n> > \n> > Not because it it fixed the TREE01 issue -- it did not.  But as near\n> > as I can see, it didn't cause any additional issues.\n> > \n> \n> Understood.\n> \n> Still work on waketorture for a test case which could trigger this\n> problem in a real world. My old plan is to send this out when I could\n> use waketorture to show this patch actually resolves some potential\n> bugs, but just put it ahead here in case it may help.\n> \n> Will send it out with your Tested-by and Acked-by and continue to work\n> on waketorture.\n\nSounds good!\n\nGiven that Jonathan's traces didn't show a timer expiration, the problems\nmight be in timers.\n\n\t\t\t\t\t\t\tThanx, Paul","headers":{"Return-Path":"<linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org>","X-Original-To":["patchwork-incoming@ozlabs.org","linuxppc-dev@lists.ozlabs.org"],"Delivered-To":["patchwork-incoming@ozlabs.org","linuxppc-dev@lists.ozlabs.org"],"Received":["from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3])\n\t(using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xL8335HVwz9sDB\n\tfor <patchwork-incoming@ozlabs.org>;\n\tMon, 31 Jul 2017 03:00:15 +1000 (AEST)","from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3])\n\tby lists.ozlabs.org (Postfix) with ESMTP id 3xL8334T9WzDr5W\n\tfor <patchwork-incoming@ozlabs.org>;\n\tMon, 31 Jul 2017 03:00:15 +1000 (AEST)","from mx0a-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com\n\t[148.163.158.5])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby lists.ozlabs.org (Postfix) with ESMTPS id 3xL81n2CqHzDr46\n\tfor <linuxppc-dev@lists.ozlabs.org>;\n\tMon, 31 Jul 2017 02:59:09 +1000 (AEST)","from pps.filterd (m0098416.ppops.net [127.0.0.1])\n\tby mx0b-001b2d01.pphosted.com (8.16.0.21/8.16.0.21) with SMTP id\n\tv6UGwdp5160706\n\tfor <linuxppc-dev@lists.ozlabs.org>; Sun, 30 Jul 2017 12:59:05 -0400","from e16.ny.us.ibm.com (e16.ny.us.ibm.com [129.33.205.206])\n\tby mx0b-001b2d01.pphosted.com with ESMTP id 2c1eewg570-1\n\t(version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT)\n\tfor <linuxppc-dev@lists.ozlabs.org>; Sun, 30 Jul 2017 12:59:04 -0400","from localhost\n\tby e16.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use\n\tOnly! Violators will be prosecuted\n\tfor <linuxppc-dev@lists.ozlabs.org> from <paulmck@linux.vnet.ibm.com>;\n\tSun, 30 Jul 2017 12:59:04 -0400","from b01cxnp22036.gho.pok.ibm.com (9.57.198.26)\n\tby e16.ny.us.ibm.com (146.89.104.203) with IBM ESMTP SMTP Gateway:\n\tAuthorized Use Only! Violators will be prosecuted; \n\tSun, 30 Jul 2017 12:58:59 -0400","from b01ledav003.gho.pok.ibm.com (b01ledav003.gho.pok.ibm.com\n\t[9.57.199.108])\n\tby b01cxnp22036.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP\n\tid v6UGwx2A25821322; Sun, 30 Jul 2017 16:58:59 GMT","from b01ledav003.gho.pok.ibm.com (unknown [127.0.0.1])\n\tby IMSVA (Postfix) with ESMTP id 203ECB204D;\n\tSun, 30 Jul 2017 12:56:27 -0400 (EDT)","from paulmck-ThinkPad-W541 (unknown [9.80.231.231])\n\tby b01ledav003.gho.pok.ibm.com (Postfix) with ESMTP id D95AFB2046;\n\tSun, 30 Jul 2017 12:56:26 -0400 (EDT)","by paulmck-ThinkPad-W541 (Postfix, from userid 1000)\n\tid 49B5616C2A07; Sun, 30 Jul 2017 09:59:01 -0700 (PDT)"],"Date":"Sun, 30 Jul 2017 09:59:01 -0700","From":"\"Paul E. McKenney\" <paulmck@linux.vnet.ibm.com>","To":"Boqun Feng <boqun.feng@gmail.com>","Subject":"Re: RCU lockup issues when CONFIG_SOFTLOCKUP_DETECTOR=n - any one\n\telse seeing this?","References":"<20170727124913.GL3730@linux.vnet.ibm.com>\n\t<20170727144903.000022a1@huawei.com>\n\t<20170727173923.000001b2@huawei.com>\n\t<20170727165245.GD3730@linux.vnet.ibm.com>\n\t<20170728084411.00001ddb@huawei.com>\n\t<20170728125416.j7gcgvnxgv2gq73u@tardis>\n\t<20170728145530.GE3730@linux.vnet.ibm.com>\n\t<20170728184129.GA24364@linux.vnet.ibm.com>\n\t<20170728190956.GA26640@linux.vnet.ibm.com>\n\t<20170730133747.anusyacw2l5hhjgx@tardis>","MIME-Version":"1.0","Content-Type":"text/plain; charset=us-ascii","Content-Disposition":"inline","In-Reply-To":"<20170730133747.anusyacw2l5hhjgx@tardis>","User-Agent":"Mutt/1.5.21 (2010-09-15)","X-TM-AS-GCONF":"00","x-cbid":"17073016-0024-0000-0000-000002B7B85E","X-IBM-SpamModules-Scores":"","X-IBM-SpamModules-Versions":"BY=3.00007454; HX=3.00000241; KW=3.00000007;\n\tPH=3.00000004; SC=3.00000214; SDB=6.00895123; UDB=6.00447658;\n\tIPR=6.00675310; \n\tBA=6.00005501; NDR=6.00000001; ZLA=6.00000005; ZF=6.00000009;\n\tZB=6.00000000; \n\tZP=6.00000000; ZH=6.00000000; ZU=6.00000002; MB=3.00016453;\n\tXFM=3.00000015; UTC=2017-07-30 16:59:02","X-IBM-AV-DETECTION":"SAVI=unused REMOTE=unused XFE=unused","x-cbparentid":"17073016-0025-0000-0000-000044EDD429","Message-Id":"<20170730165901.GX3730@linux.vnet.ibm.com>","X-Proofpoint-Virus-Version":"vendor=fsecure engine=2.50.10432:, ,\n\tdefinitions=2017-07-30_06:, , signatures=0","X-Proofpoint-Spam-Details":"rule=outbound_notspam policy=outbound score=0\n\tspamscore=0 suspectscore=0\n\tmalwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam\n\tadjust=0 reason=mlx scancount=1 engine=8.0.1-1706020000\n\tdefinitions=main-1707300290","X-BeenThere":"linuxppc-dev@lists.ozlabs.org","X-Mailman-Version":"2.1.23","Precedence":"list","List-Id":"Linux on PowerPC Developers Mail List\n\t<linuxppc-dev.lists.ozlabs.org>","List-Unsubscribe":"<https://lists.ozlabs.org/options/linuxppc-dev>,\n\t<mailto:linuxppc-dev-request@lists.ozlabs.org?subject=unsubscribe>","List-Archive":"<http://lists.ozlabs.org/pipermail/linuxppc-dev/>","List-Post":"<mailto:linuxppc-dev@lists.ozlabs.org>","List-Help":"<mailto:linuxppc-dev-request@lists.ozlabs.org?subject=help>","List-Subscribe":"<https://lists.ozlabs.org/listinfo/linuxppc-dev>,\n\t<mailto:linuxppc-dev-request@lists.ozlabs.org?subject=subscribe>","Reply-To":"paulmck@linux.vnet.ibm.com","Cc":"dzickus@redhat.com, sfr@canb.auug.org.au, linuxarm@huawei.com,\n\tNicholas Piggin <npiggin@gmail.com>, abdhalee@linux.vnet.ibm.com,\n\tJonathan Cameron <Jonathan.Cameron@huawei.com>,\n\tsparclinux@vger.kernel.org, \n\takpm@linux-foundation.org, linuxppc-dev@lists.ozlabs.org,\n\tDavid Miller <davem@davemloft.net>, linux-arm-kernel@lists.infradead.org","Errors-To":"linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org","Sender":"\"Linuxppc-dev\"\n\t<linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org>"}}]