From patchwork Thu Feb 11 09:28:46 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eryu Guan X-Patchwork-Id: 8277421 Return-Path: X-Original-To: patchwork-fstests@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 4A14D9F6DA for ; Thu, 11 Feb 2016 09:29:21 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 581D52034C for ; Thu, 11 Feb 2016 09:29:20 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 6AB16202EC for ; Thu, 11 Feb 2016 09:29:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750816AbcBKJ3T (ORCPT ); Thu, 11 Feb 2016 04:29:19 -0500 Received: from mx1.redhat.com ([209.132.183.28]:42118 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750725AbcBKJ3R (ORCPT ); Thu, 11 Feb 2016 04:29:17 -0500 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (Postfix) with ESMTPS id 4265B7AE94 for ; Thu, 11 Feb 2016 09:29:17 +0000 (UTC) Received: from localhost (ovpn-12-17.pek2.redhat.com [10.72.12.17]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u1B9TF9G022205; Thu, 11 Feb 2016 04:29:16 -0500 From: Eryu Guan To: fstests@vger.kernel.org Cc: Eryu Guan Subject: [PATCH] generic/072: limit max cpu number to 8 to avoid long run time and high system pressure Date: Thu, 11 Feb 2016 17:28:46 +0800 Message-Id: <1455182926-7782-1-git-send-email-eguan@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23 Sender: fstests-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Right now generic/072 scales the loop count based on the cpu count. But on hosts with many cpus(100+), generic/072 runs for hours and generates very high system load. Given that the original bug can be reproduced easily on unpatched kernel, the great number of loops and long run time are not needed. So limiting the cpu number to 8 (which gives around 20 seconds run time on my test vm with 8 vcpus) seems reasonable. Signed-off-by: Eryu Guan --- tests/generic/072 | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/generic/072 b/tests/generic/072 index 6e59d84..ece71fb 100755 --- a/tests/generic/072 +++ b/tests/generic/072 @@ -51,6 +51,10 @@ _require_xfs_io_command "fcollapse" testfile=$TEST_DIR/testfile.$seq NCPUS=`$here/src/feature -o` +# cap NCPUS to 8 at maximum to avoid long run time on hosts with many cpus +if [ $NCPUS -gt 8 ]; then + NCPUS=8 +fi OUTER_LOOPS=$((10 * $NCPUS * $LOAD_FACTOR)) INNER_LOOPS=$((50 * $NCPUS * $LOAD_FACTOR)) # fcollapse/truncate continuously and simultaneously a same file