From patchwork Fri Jun 15 18:57:54 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Paul E. McKenney" X-Patchwork-Id: 9329 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id BDDEC23E53 for ; Fri, 15 Jun 2012 18:58:30 +0000 (UTC) Received: from mail-gg0-f180.google.com (mail-gg0-f180.google.com [209.85.161.180]) by fiordland.canonical.com (Postfix) with ESMTP id 8D464A18818 for ; Fri, 15 Jun 2012 18:58:30 +0000 (UTC) Received: by ggnf1 with SMTP id f1so2850425ggn.11 for ; Fri, 15 Jun 2012 11:58:30 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-forwarded-to:x-forwarded-for:delivered-to:received-spf:from:to:cc :subject:date:message-id:x-mailer:in-reply-to:references :x-content-scanned:x-cbid:x-gm-message-state; bh=zv8eoIplBRsv5pCkBA3ycOy5/6w2ylD67weyuSK0Ty0=; b=hAbNdnysBWnhKAbIuj18Fq2hCdIIUas4X6VPGyGbzwny8/tXebsmPYtQGcK7aS+O7M nyz7V1uNOFRviCNALHUSz+wcMf5SZV2MQlUN4DFn5kQWijBvbDE8zmEE9q7EXw7N2aLN Jfju+vg4sBxPBXRyvjQlCilwqX505m9haEaxxtSGdUDDQv4x31TwttlQf1AcyTWCYrAj 58laZl0WzRFog2GohwWunMTsMzYB6ofBOKfo3f1hXeEXjYbfVUfDBrbYj0pC7lIOi5ZU bydG2/gFDu9kU291HXUFSCTrqtKNycHzVurpG2EgCi1yZvXVzXZfjtmBQ/I7PetwEmi5 NiEQ== Received: by 10.50.40.193 with SMTP id z1mr3117473igk.0.1339786709843; Fri, 15 Jun 2012 11:58:29 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.231.24.148 with SMTP id v20csp163688ibb; Fri, 15 Jun 2012 11:58:29 -0700 (PDT) Received: by 10.50.154.233 with SMTP id vr9mr3119088igb.9.1339786709430; Fri, 15 Jun 2012 11:58:29 -0700 (PDT) Received: from e32.co.us.ibm.com (e32.co.us.ibm.com. [32.97.110.150]) by mx.google.com with ESMTPS id rn8si9253668pbc.277.2012.06.15.11.58.28 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 15 Jun 2012 11:58:29 -0700 (PDT) Received-SPF: pass (google.com: domain of paulmck@linux.vnet.ibm.com designates 32.97.110.150 as permitted sender) client-ip=32.97.110.150; Authentication-Results: mx.google.com; spf=pass (google.com: domain of paulmck@linux.vnet.ibm.com designates 32.97.110.150 as permitted sender) smtp.mail=paulmck@linux.vnet.ibm.com Received: from /spool/local by e32.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 15 Jun 2012 12:58:27 -0600 Received: from d03dlp03.boulder.ibm.com (9.17.202.179) by e32.co.us.ibm.com (192.168.1.132) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Fri, 15 Jun 2012 12:58:24 -0600 Received: from d03relay05.boulder.ibm.com (d03relay05.boulder.ibm.com [9.17.195.107]) by d03dlp03.boulder.ibm.com (Postfix) with ESMTP id CBD3A19D8053; Fri, 15 Jun 2012 18:58:16 +0000 (WET) Received: from d03av01.boulder.ibm.com (d03av01.boulder.ibm.com [9.17.195.167]) by d03relay05.boulder.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id q5FIw6qQ266668; Fri, 15 Jun 2012 12:58:09 -0600 Received: from d03av01.boulder.ibm.com (loopback [127.0.0.1]) by d03av01.boulder.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id q5FIvxUP023886; Fri, 15 Jun 2012 12:58:06 -0600 Received: from paulmck-ThinkPad-W500 ([9.47.24.152]) by d03av01.boulder.ibm.com (8.14.4/8.13.1/NCO v10.0 AVin) with ESMTP id q5FIvwkc023803; Fri, 15 Jun 2012 12:57:58 -0600 Received: by paulmck-ThinkPad-W500 (Postfix, from userid 1000) id 8EFB6E71A1; Fri, 15 Jun 2012 11:57:57 -0700 (PDT) From: "Paul E. McKenney" To: linux-kernel@vger.kernel.org Cc: mingo@elte.hu, laijs@cn.fujitsu.com, dipankar@in.ibm.com, akpm@linux-foundation.org, mathieu.desnoyers@polymtl.ca, josh@joshtriplett.org, niv@us.ibm.com, tglx@linutronix.de, peterz@infradead.org, rostedt@goodmis.org, Valdis.Kletnieks@vt.edu, dhowells@redhat.com, eric.dumazet@gmail.com, darren@dvhart.com, fweisbec@gmail.com, patches@linaro.org, "Paul E. McKenney" , "Paul E. McKenney" Subject: [PATCH tip/core/rcu 6/6] rcu: Make rcutorture fakewriters invoke rcu_barrier() Date: Fri, 15 Jun 2012 11:57:54 -0700 Message-Id: <1339786674-25265-6-git-send-email-paulmck@linux.vnet.ibm.com> X-Mailer: git-send-email 1.7.8 In-Reply-To: <1339786674-25265-1-git-send-email-paulmck@linux.vnet.ibm.com> References: <20120615185725.GA25163@linux.vnet.ibm.com> <1339786674-25265-1-git-send-email-paulmck@linux.vnet.ibm.com> X-Content-Scanned: Fidelis XPS MAILER x-cbid: 12061518-3270-0000-0000-000007367CEF X-Gm-Message-State: ALoCoQnrmhmwipH1BATSBf8QNZeWjuSDnB+GzBgZ635Dq/od1/5ALLbkS1pTvor7JsMQ8wcnDbub From: "Paul E. McKenney" The current rcutorture rcu_barrier() testing never intentionally runs more than one instance of rcu_barrier() at a given time. This fails to test the the shiny new concurrency features of rcu_barrier(). This commit therefore modifies the rcutorture fakewriter kthread to randomly invoke rcu_barrier() rather than the usual synchronize_rcu(). Signed-off-by: Paul E. McKenney Signed-off-by: Paul E. McKenney --- kernel/rcutorture.c | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-) diff --git a/kernel/rcutorture.c b/kernel/rcutorture.c index 54a3745..dfb4e20 100644 --- a/kernel/rcutorture.c +++ b/kernel/rcutorture.c @@ -1025,7 +1025,11 @@ rcu_torture_fakewriter(void *arg) do { schedule_timeout_uninterruptible(1 + rcu_random(&rand)%10); udelay(rcu_random(&rand) & 0x3ff); - cur_ops->sync(); + if (cur_ops->cb_barrier != NULL && + rcu_random(&rand) % (NR_CPUS * 8) == 0) + cur_ops->cb_barrier(); + else + cur_ops->sync(); rcu_stutter_wait("rcu_torture_fakewriter"); } while (!kthread_should_stop() && fullstop == FULLSTOP_DONTSTOP);