From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.1 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 29C5CC3B186 for ; Mon, 10 Feb 2020 22:53:31 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 0350D20715 for ; Mon, 10 Feb 2020 22:53:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1581375211; bh=a8ChlAs1X2BTRLNb92AceNi3XKeTbTaJUZdnEPuWRLw=; h=Date:From:To:Cc:Subject:In-Reply-To:References:List-ID:From; b=u0R9hoT7XebUshtrhWPp4A+Z8buh+ebpPznijC/Q5NrqguATDQeRiSX/R6EhCX73c j9GUuPDukGCz1LNt2xp6zRnPQS4JOS+b+SRSFps7DuUQYUnay2fi2hS5keMV29nnTV fQWmV/vcs0nmnJt/CNpShXXAl5YXYJvYAqM8b2sk= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727522AbgBJWxa (ORCPT ); Mon, 10 Feb 2020 17:53:30 -0500 Received: from mail.kernel.org ([198.145.29.99]:59122 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727116AbgBJWx3 (ORCPT ); Mon, 10 Feb 2020 17:53:29 -0500 Received: from devnote2 (NE2965lan1.rev.em-net.ne.jp [210.141.244.193]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 3C5A22051A; Mon, 10 Feb 2020 22:53:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1581375209; bh=a8ChlAs1X2BTRLNb92AceNi3XKeTbTaJUZdnEPuWRLw=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=uh6i/ttIKwArP26pBZNXA0Nrs9ryWsk2Lyy/53tD6LOnLg3H350CXiI7pJha12oa+ VX9i+vC1atAMnDGk8YHQibuoAE8qavlN1YjC4VtCarx1t+5t1+wHZuHDS9x4CgD3S1 UqbQDN8URkVvwHBr5IWJ4h1KuMqEC1Ctly/fanmE= Date: Tue, 11 Feb 2020 07:53:24 +0900 From: Masami Hiramatsu To: Steven Rostedt Cc: Alan Maguire , shuah@kernel.org, mingo@redhat.com, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, naveen.n.rao@linux.vnet.ibm.com, colin.king@canonical.com Subject: Re: [PATCH 1/2] ftrace/selftests: workaround cgroup RT scheduling issues Message-Id: <20200211075324.101aab59e06aaabaea648cc4@kernel.org> In-Reply-To: <20200210171801.521e5faa@gandalf.local.home> References: <1581001760-29831-1-git-send-email-alan.maguire@oracle.com> <1581001760-29831-2-git-send-email-alan.maguire@oracle.com> <20200207151456.4177c8974b779a45520b93d7@kernel.org> <20200210171801.521e5faa@gandalf.local.home> X-Mailer: Sylpheed 3.5.1 (GTK+ 2.24.32; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 10 Feb 2020 17:18:01 -0500 Steven Rostedt wrote: > On Fri, 7 Feb 2020 15:14:56 +0900 > Masami Hiramatsu wrote: > > > On Thu, 6 Feb 2020 15:09:19 +0000 > > Alan Maguire wrote: > > > > > wakeup_rt.tc and wakeup.tc tests in tracers/ subdirectory > > > fail due to the chrt command returning: > > > > > > chrt: failed to set pid 0's policy: Operation not permitted. > > > > > > To work around this, temporarily disable grout RT scheduling > > > during ftracetest execution. Restore original value on > > > test run completion. With these changes in place, both > > > tests consistently pass. > > > > OK, this looks good to me. > > > > Acked-by: Masami Hiramatsu > > > > Thanks! > > > > > > > > Fixes: c575dea2c1a5 ("selftests/ftrace: Add wakeup_rt tracer testcase") > > > Fixes: c1edd060b413 ("selftests/ftrace: Add wakeup tracer testcase") > > > Signed-off-by: Alan Maguire > > > --- > > > tools/testing/selftests/ftrace/ftracetest | 23 +++++++++++++++++++++++ > > > 1 file changed, 23 insertions(+) > > > > > > diff --git a/tools/testing/selftests/ftrace/ftracetest b/tools/testing/selftests/ftrace/ftracetest > > > index 063ecb2..3207bbf 100755 > > > --- a/tools/testing/selftests/ftrace/ftracetest > > > +++ b/tools/testing/selftests/ftrace/ftracetest > > > @@ -29,8 +29,26 @@ err_ret=1 > > > # kselftest skip code is 4 > > > err_skip=4 > > > > > > +# cgroup RT scheduling prevents chrt commands from succeeding, which > > > +# induces failures in test wakeup tests. Disable for the duration of > > > +# the tests. > > > +sched_rt_runtime=$(sysctl -n kernel.sched_rt_runtime_us) > > > > OK, but can you > > ?? > > Masami? Oops, I missed to fill the comment. I meant "but can you consider to use /proc/sys directly instead of sysctl command, because other test cases uses /proc/sys (ftrace/fgraph-filter-stack.tc and ftrace/func_stack_tracer.tc)?" Thank you, > > -- Steve > > > > > > + > > > +set_sysctl() { > > > + sysctl -qw ${1}=${2} >/dev/null 2>&1 > > > +} > > > + -- Masami Hiramatsu