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=-0.6 required=3.0 tests=BAYES_20,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no 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 5415BC2D0A3 for ; Sun, 1 Nov 2020 16:21:12 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 154AC222EA for ; Sun, 1 Nov 2020 16:21:12 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="mc5PEM2e" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727009AbgKAQVL (ORCPT ); Sun, 1 Nov 2020 11:21:11 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42342 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726549AbgKAQVK (ORCPT ); Sun, 1 Nov 2020 11:21:10 -0500 Received: from mail-qt1-x832.google.com (mail-qt1-x832.google.com [IPv6:2607:f8b0:4864:20::832]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6FB4CC0617A6 for ; Sun, 1 Nov 2020 08:21:10 -0800 (PST) Received: by mail-qt1-x832.google.com with SMTP id r8so7633885qtp.13 for ; Sun, 01 Nov 2020 08:21:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:content-transfer-encoding:mime-version:subject:message-id:date :to; bh=9EpNaWNd06Q2bmObI93Ti3pWcScI+CZMVZ3CT0jmF0c=; b=mc5PEM2edUNp+JzsSssolxy4pg3WUEoyzaxbQa81VjH3N/NxIZucgXWEnMHyZDik+u OM33blOknu5TbjyjafIlfIYXjWjzorxtqA0IL7llAAzkQTM+BBJAgFL1fD+Wo5YZV3JC fLvenBNzJJfPdJcjkptEzaWcjQf10MEyOUiJ5xInVEfIWO5EnAwdGsIWNsCPAY+q2gTa hXB0ssZZhBpNGdT9LhAZGrY9FlM1gtKaNNH7VS2mH5aOOfKP3OfdkFJNuKYzfMPubrJs e6oohxEZnqcshUqet9pDz06diS1ili5bFse5xEJVt1j7jQxD0fYSoMBQnxSUs0c+WNca IMlA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:content-transfer-encoding:mime-version :subject:message-id:date:to; bh=9EpNaWNd06Q2bmObI93Ti3pWcScI+CZMVZ3CT0jmF0c=; b=WdZF7FtRFIrulSWw/H831Zift7aHDibdN9yWoyW+odDMMlfv0HIGGzuyvI/syMoxpz VcGuPWSbFHEL1fKv1NYmSmWZ6JD4QMAOGm9PykV0zeNTSWfpmAgi+a94Yl8mc60Un8pQ UdiFG11vI3rf/tWbm97WffuR6FhtSeqEwbXJzl4BLvpVi0YhzXCZ1K4ZGZaA2zLX4KnJ xDtlCxthMRzQjHVUIjBLpesuaQDAYm5ev0nM6p145tq+Xlay075QPzT9XVO9g0ztFSJt oD6YRopQc7Ok08hm1cXJTaHoXYiq9TgSO3wVPQOebcywkJei7jPA+79qxSAy1Tkx01ln Tkcw== X-Gm-Message-State: AOAM533EnAoNrII/GaU2VIHnCjyGfU6ICQrlZfZkPpoUUVvRZWKCp1mA dya8IRMRaqXfLnyY0AlnDM3zeL4UnGPSPA== X-Google-Smtp-Source: ABdhPJwhQB7OKnbZdpmjZ37FQCu4Jq1lK40Mc9E1KKg0y8N0IB7OcfXoaqweejKt+Rv9CGSJ7Xawiw== X-Received: by 2002:a05:622a:345:: with SMTP id r5mr5194897qtw.222.1604247669465; Sun, 01 Nov 2020 08:21:09 -0800 (PST) Received: from [10.200.10.3] ([114.141.194.12]) by smtp.gmail.com with ESMTPSA id z16sm1206270qka.18.2020.11.01.08.21.07 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sun, 01 Nov 2020 08:21:08 -0800 (PST) From: NASA Jeff Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 Subject: BFS revisited. Message-Id: Date: Sun, 1 Nov 2020 16:21:03 +0000 To: Linux Kml X-Mailer: iPhone Mail (16G201) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Here's a somewhat imperfect, though short script I knocked together that fix= es scheduling issues. while true do for i in `iotop -P -b -q -o -d 0.1 -n 10 | awk -F ' ' '{if ( $1 ~ /[0-9]/ &&= $10 > 10) print $1}'`=20 do ionice -c 3 -p $i echo "process $i reniced to idel as it was hogging io"=09 done for i in `top -b -d 0.1 -n 10 | awk -F ' ' '{if ( $1 ~ /[0-9]/ && $4 =3D=3D= 0 && $9 > 15) print $1}'`=20 do renice -n 10 -p $i echo "process $i reniced to idel as it was hogging cpu"=09 done for i in `top -b -d 0.1 -n 10 | awk -F ' ' '{if ( $1 ~ /[0-9]/ && $4 =3D=3D= 10 && $9 < 10) print $1}'`=20 do renice -n 0 -p $i echo "process $i reniced to idel as it stopped hogging cpu"=09 done sleep 0.5 done