Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp1044133pxb; Tue, 19 Oct 2021 19:22:50 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxBEiAwkHRarkf+LigQ90DdB8W0z8+081p0OmSuzpvySYs3f5vP4cwbJQMfuoAMxx/4d6Id X-Received: by 2002:a05:6402:438f:: with SMTP id o15mr57465721edc.301.1634696569939; Tue, 19 Oct 2021 19:22:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634696569; cv=none; d=google.com; s=arc-20160816; b=eFKSfiqqtNP05uuJyVyPukitLYXKDck9+YbNnVUlnkdtsxxEcbW4i52hXXFLSPSrwV 80/Ida6iZ6pNmgbSbAYlR7GrqEE+7+R79fdwo1u5ykXC/r+vGUvWRpKvWcJBXHQXIWGW MvsQ7xpfFSMcR85Ndg/lMxXJsaR9cjm4jL+673FDl8c0VILXRnjNrZGk+W8ZQR6jnUbz RmwJr9udJdlSHfCNQvkDuTeAsD9yQZOOJC+hcw5u9kvzBw4pPGYC9oZCgvXuSOG9+PqT MKOD4RvIu0GnNwgV0sPhMN/GCecFqcTn/uBFxTnxdOHhaGM45RqvDS0pafC1cR1naJ5L 9XZQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=b0595YsfnKHce9NaMUODHg0EyyelZVOxQDZ5OuFLhBY=; b=CCvC+Wep3XEsBdmGQLghfGxHghRhDyji7SriYwjhWu6lOY1qaXk+K03glOonZ/Kztc lrB1n0qSDtKPI0x8n3CcDcEQERH81S89zlvcoO/dwNMVeWnsS99ImTBPCffrLEwqcB5z 6PKh/XffBXeR3zKvJmxcOtB/lwKqhN4UYP+WlRYsL0BSK4k4RU8aennKEqt2p4EduIKq qD/TM6zPJdEfLiM64B5hs+ZoMQGNY0QeId2Npd85WK4myH5bjFA1u7xOHXblvB+HKFGW WJi6tPtp0HMff0MJC5zPZ5f0WUd2OzBwH1tuFL0dullGQ6wFphiZkeMUQdQzJsnZhYcs ORuw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=e9CTLuAy; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j23si1030751eje.719.2021.10.19.19.22.24; Tue, 19 Oct 2021 19:22:49 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=e9CTLuAy; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229653AbhJTCWp (ORCPT + 99 others); Tue, 19 Oct 2021 22:22:45 -0400 Received: from mail.kernel.org ([198.145.29.99]:38552 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229555AbhJTCWo (ORCPT ); Tue, 19 Oct 2021 22:22:44 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id E2640611EF; Wed, 20 Oct 2021 02:20:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1634696430; bh=JxsIowpKGVDra9B8vW+kfpr7Ls3YqwRYfU0D7J97Q7Y=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=e9CTLuAykGzMv8YTLt2sQ1pW0/Og9sxYk/SPbIvXSlizzu3kJcyh+OuPmCrYUZv2V 6tsLB0wnEreN4Gg8HbHiP2OtrChZr3g0v281Uk/4IMHk2envvy0zBfjGTyfW0X9SXa 5X1KqCpg9ftE79IIE0NB/QIOK8QVythuzhocjY6g6V9qraRRuiisWWx0/XbC86whgp vOziy913xOfnVKi5vhlwb/xFt8n1Stam8GvOhMzhISBTaXGPWaa70t4EtO8RgyaGNa aEmu9etm7RLeU9xAXvdhFkvCxuG6V0fVUPNrKNjw9ze+FEUp0JKwHw7DmM1fnteGk1 PVfMOfEWnN89Q== Date: Wed, 20 Oct 2021 11:20:27 +0900 From: Masami Hiramatsu To: Steven Rostedt Cc: Li Zhijian , , , , , Philip Li , kernel test robot , Masami Hiramatsu Subject: Re: [PATCH] kselftests: ftrace: limit the executing time by reading from cached trace Message-Id: <20211020112027.b01762f2adcfac99e71dcf99@kernel.org> In-Reply-To: <20211018221636.47157e52@gandalf.local.home> References: <20211018132616.2234853-1-lizhijian@cn.fujitsu.com> <20211018221636.47157e52@gandalf.local.home> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.32; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 18 Oct 2021 22:16:36 -0400 Steven Rostedt wrote: > On Mon, 18 Oct 2021 21:26:16 +0800 > Li Zhijian wrote: > > > LKP/0day observed that kselftests/ftrace cannot finish within 1 hour on > > a 96 cpus platform where it hangs in the line like: > > 'cat trace | grep -v ^# | awk '{ print $5 }' | sort -u | wc -l' > > subsystem-enable.tc > > > > It seems that trace will keep growing during it's read by 'cat' command. > > Consequently, trace becomes too large to finish reading. > > > > replace 'cat trace' by: > > $ sed -i 's/cat trace |/read_cached_trace |/g' $(find test.d -name "*.tc") > > > > Instead, what happens if you add this command to each test? > > if [ -t options/pause-on-trace ]; then > echo 1 > options/pause-on-trace > fi > > We also need to add to the "initialize_ftrace" function in test.d/functions. > > if [ -t options/pause-on-trace ]; then > echo 0 > options/pause-on-trace > fi Hmm, by the way, shouldn't we set this feature by default? There are many "cat trace | grep ..." style test code in ftracetest just for checking whether the event is recorded. At least for the ftracetest, it should be set unless the testcase is explicitly disable it. Thank you. > > -- Steve > > > CC: Philip Li > > Reported-by: kernel test robot > > Signed-off-by: Li Zhijian > > --- -- Masami Hiramatsu