From patchwork Wed Nov 30 01:28:17 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Paul E. McKenney" X-Patchwork-Id: 700807 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 3tT2rP1H48z9t0t for ; Wed, 30 Nov 2016 12:29:09 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754820AbcK3B3H (ORCPT ); Tue, 29 Nov 2016 20:29:07 -0500 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:43247 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752216AbcK3B3G (ORCPT ); Tue, 29 Nov 2016 20:29:06 -0500 Received: from pps.filterd (m0098420.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.17/8.16.0.17) with SMTP id uAU1NeKx042662 for ; Tue, 29 Nov 2016 20:28:20 -0500 Received: from e37.co.us.ibm.com (e37.co.us.ibm.com [32.97.110.158]) by mx0b-001b2d01.pphosted.com with ESMTP id 271hvmjqec-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Tue, 29 Nov 2016 20:28:20 -0500 Received: from localhost by e37.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 29 Nov 2016 18:28:20 -0700 Received: from d03dlp03.boulder.ibm.com (9.17.202.179) by e37.co.us.ibm.com (192.168.1.137) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Tue, 29 Nov 2016 18:28:17 -0700 Received: from b03cxnp07029.gho.boulder.ibm.com (b03cxnp07029.gho.boulder.ibm.com [9.17.130.16]) by d03dlp03.boulder.ibm.com (Postfix) with ESMTP id 740AA19D8048; Tue, 29 Nov 2016 18:27:37 -0700 (MST) Received: from b03ledav001.gho.boulder.ibm.com (b03ledav001.gho.boulder.ibm.com [9.17.130.232]) by b03cxnp07029.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id uAU1SFGm15991130; Tue, 29 Nov 2016 18:28:16 -0700 Received: from b03ledav001.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 6CF8E6E038; Tue, 29 Nov 2016 18:28:16 -0700 (MST) Received: from paulmck-ThinkPad-W541 (unknown [9.85.136.150]) by b03ledav001.gho.boulder.ibm.com (Postfix) with ESMTP id 3B9AF6E035; Tue, 29 Nov 2016 18:28:16 -0700 (MST) Received: by paulmck-ThinkPad-W541 (Postfix, from userid 1000) id 306DD16C2AF2; Tue, 29 Nov 2016 17:28:17 -0800 (PST) Date: Tue, 29 Nov 2016 17:28:17 -0800 From: "Paul E. McKenney" To: Guenter Roeck Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, Andrew Morton , sparclinux@vger.kernel.org, davem@davemloft.net Subject: Re: next: Commit 'mm: Prevent __alloc_pages_nodemask() RCU CPU stall ...' causing hang on sparc32 qemu Reply-To: paulmck@linux.vnet.ibm.com References: <20161129212308.GA12447@roeck-us.net> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20161129212308.GA12447@roeck-us.net> User-Agent: Mutt/1.5.21 (2010-09-15) X-TM-AS-GCONF: 00 X-Content-Scanned: Fidelis XPS MAILER x-cbid: 16113001-0024-0000-0000-0000152637D6 X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00006166; HX=3.00000240; KW=3.00000007; PH=3.00000004; SC=3.00000193; SDB=6.00787123; UDB=6.00380712; IPR=6.00564808; BA=6.00004928; NDR=6.00000001; ZLA=6.00000005; ZF=6.00000009; ZB=6.00000000; ZP=6.00000000; ZH=6.00000000; ZU=6.00000002; MB=3.00013485; XFM=3.00000011; UTC=2016-11-30 01:28:19 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 16113001-0025-0000-0000-0000468CE13D Message-Id: <20161130012817.GH3924@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:, , definitions=2016-11-29_09:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1609300000 definitions=main-1611300016 Sender: sparclinux-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: sparclinux@vger.kernel.org On Tue, Nov 29, 2016 at 01:23:08PM -0800, Guenter Roeck wrote: > Hi Paul, > > most of my qemu tests for sparc32 targets started to fail in next-20161129. > The problem is only seen in SMP builds; non-SMP builds are fine. > Bisect points to commit 2d66cccd73436 ("mm: Prevent __alloc_pages_nodemask() > RCU CPU stall warnings"); reverting that commit fixes the problem. > > Test scripts are available at: > https://github.com/groeck/linux-build-test/tree/master/rootfs/sparc > Test results are at: > https://github.com/groeck/linux-build-test/tree/master/rootfs/sparc > > Bisect log is attached. > > Please let me know if there is anything I can do to help tracking down the > problem. Apologies!!! Does the patch below help? Thanx, Paul ------------------------------------------------------------------------ commit 97708e737e2a55fed4bdbc005bf05ea909df6b73 Author: Paul E. McKenney Date: Tue Nov 29 11:06:05 2016 -0800 rcu: Allow boot-time use of cond_resched_rcu_qs() The cond_resched_rcu_qs() macro is used to force RCU quiescent states into long-running in-kernel loops. However, some of these loops can execute during early boot when interrupts are disabled, and during which time it is therefore illegal to enter the scheduler. This commit therefore makes cond_resched_rcu_qs() be a no-op during early boot. Signed-off-by: Paul E. McKenney --- To unsubscribe from this list: send the line "unsubscribe sparclinux" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/include/linux/rcupdate.h b/include/linux/rcupdate.h index 525ca34603b7..b6944cc19a07 100644 --- a/include/linux/rcupdate.h +++ b/include/linux/rcupdate.h @@ -423,7 +423,7 @@ extern struct srcu_struct tasks_rcu_exit_srcu; */ #define cond_resched_rcu_qs() \ do { \ - if (!cond_resched()) \ + if (!is_idle_task(current) && !cond_resched()) \ rcu_note_voluntary_context_switch(current); \ } while (0) diff --git a/include/linux/rcutiny.h b/include/linux/rcutiny.h index 7232d199a81c..20f5990deeee 100644 --- a/include/linux/rcutiny.h +++ b/include/linux/rcutiny.h @@ -228,6 +228,7 @@ static inline void exit_rcu(void) extern int rcu_scheduler_active __read_mostly; void rcu_scheduler_starting(void); #else /* #ifdef CONFIG_DEBUG_LOCK_ALLOC */ +#define rcu_scheduler_active false static inline void rcu_scheduler_starting(void) { }