Received: by 2002:a05:6520:1682:b0:147:d1a0:b502 with SMTP id ck2csp89301lkb; Mon, 18 Oct 2021 19:20:41 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyxg72o47P2gTuuC4bKghKpZbGgUyjUK0+COa6ciidZd9dCcIuPyj6C1lFwx4b3anS2xFe6 X-Received: by 2002:a17:90b:3e85:: with SMTP id rj5mr1370782pjb.104.1634610041313; Mon, 18 Oct 2021 19:20:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634610041; cv=none; d=google.com; s=arc-20160816; b=RKfxx/Mb+PRFFLfrrcQiJwofuNTgUKKZJKuPOAJylXeZY0mWV7jhMAXFaIODBmTdTk WtvxsjibYPIvdCJq8wwUvTMWBa6yT6THkz1gVxx7Ww8kHJo8++P6Ya4dCRrrTAwWtcDi 7MXPQBMaU6LhDUWiINCiZSqpBMb6lgWDXR3dwC4R+H5wgUk4wg8y/lVD5BawUXatX3o6 OBc5umtxKihIORgzO2EDQ1Kl+lRHo8FS5RFcUUBCa6U6Vfjl1MQw7S7okXUHw7jwFQbA nriF5Jz6DJw+Jxg5Hk4vJ9ofH+dozmdgA+NBVV07vM+5437cDgIohg7dlBbI+TmOV5Aw G1Dg== 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; bh=c63EQ4SKliBCGXmk9e+UTBhhbXYJlxRF6HenC/z6+Z0=; b=z23gUwnyImUq/o89FdZKvzciHtWL5HO5Y91+imWP5UblC87tBS6dckKplVK8KPXxbd Rti2AquDYi59NIFn9F8bbCYoxPDDA1CJqdFSA+nzVbwuA58d+howHwCN1OBnAoUD9frK +Sbvuw6NOI+C9RSJ9JVQFirjaFdfSyViuehbNrAsbXYx67Tb3JymP4GxeZkq3ys6/Vuf Xu9f/sUghL1uRSmtZkkjO4+wCMVK5ypAufy91cgzutLiE/WqSsjeLj+hJ1aMI8wTrtZA JSIdZl6vsDUGR3ABoBqahiI5Iar+wQ40qd1hGn8rX8sDfqoZyTbYLYqnozihiERpkR+v oOCA== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ik22si9140663plb.443.2021.10.18.19.20.15; Mon, 18 Oct 2021 19:20:41 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229733AbhJSCSw (ORCPT + 99 others); Mon, 18 Oct 2021 22:18:52 -0400 Received: from mail.kernel.org ([198.145.29.99]:53014 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229529AbhJSCSv (ORCPT ); Mon, 18 Oct 2021 22:18:51 -0400 Received: from gandalf.local.home (cpe-66-24-58-225.stny.res.rr.com [66.24.58.225]) (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 8549E6103B; Tue, 19 Oct 2021 02:16:38 +0000 (UTC) Date: Mon, 18 Oct 2021 22:16:36 -0400 From: Steven Rostedt To: Li Zhijian Cc: , , , , Philip Li , kernel test robot , Masami Hiramatsu Subject: Re: [PATCH] kselftests: ftrace: limit the executing time by reading from cached trace Message-ID: <20211018221636.47157e52@gandalf.local.home> In-Reply-To: <20211018132616.2234853-1-lizhijian@cn.fujitsu.com> References: <20211018132616.2234853-1-lizhijian@cn.fujitsu.com> X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.33; 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 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 -- Steve > CC: Philip Li > Reported-by: kernel test robot > Signed-off-by: Li Zhijian > ---