From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755008AbcHVLS6 (ORCPT ); Mon, 22 Aug 2016 07:18:58 -0400 Received: from www.osadl.org ([62.245.132.105]:34602 "EHLO www.osadl.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753673AbcHVLS5 (ORCPT ); Mon, 22 Aug 2016 07:18:57 -0400 From: Nicholas Mc Guire To: "Paul E. McKenney" Cc: Josh Triplett , Steven Rostedt , Mathieu Desnoyers , Lai Jiangshan , linux-kernel@vger.kernel.org, Nicholas Mc Guire Subject: [PATCH RFC] rcuperf: make timeout HZ independent Date: Mon, 22 Aug 2016 13:21:05 +0200 Message-Id: <1471864865-28040-1-git-send-email-hofrat@osadl.org> X-Mailer: git-send-email 2.1.4 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Make the probability of ftrace dump not interfering with other writers grace period, HZ independent. Signed-off-by: Nicholas Mc Guire --- Problem found by coccinelle script Passing in jiffies as value allows for this "fixed" delay varying by one order of magnitude. As it is intended to reduce the probability of interference this probability should not be dependent on the systems HZ setting. Its probably more cosmetic but I guess this is the cleaner way for fixed delays. Q: Could not really figure out why the _interruptible_ version is used here - I would assume that schedule_timeout() would be what is needed here, as this should simply be a fixed delay. Patch was compile tested with: x86_64_defconfig + CONFIG_RCU_PERF_TEST=m Patch is against 4.8.0-rc2 (localversion-next is -next-20160822) kernel/rcu/rcuperf.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/kernel/rcu/rcuperf.c b/kernel/rcu/rcuperf.c index 123ccbd..4cd8655 100644 --- a/kernel/rcu/rcuperf.c +++ b/kernel/rcu/rcuperf.c @@ -404,7 +404,8 @@ rcu_perf_writer(void *arg) perf_type, PERF_FLAG, me, MIN_MEAS); if (atomic_inc_return(&n_rcu_perf_writer_finished) >= nrealwriters) { - schedule_timeout_interruptible(10); + schedule_timeout_interruptible( + msecs_to_jiffies(10)); rcu_ftrace_dump(DUMP_ALL); PERFOUT_STRING("Test complete"); t_rcu_perf_writer_finished = t; -- 2.1.4