Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp3391548pxj; Mon, 7 Jun 2021 09:27:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyP5l0d5Jrj+zO9IlQoklZWNVMNvgl2jpMcKwEXkDq1kxf3jzL2fmbyFqubpiZ/wd9cH5kK X-Received: by 2002:a17:906:3c44:: with SMTP id i4mr18807024ejg.135.1623083267829; Mon, 07 Jun 2021 09:27:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623083267; cv=none; d=google.com; s=arc-20160816; b=N97F43FW+ICF/hAylrmLfk5ivHD6CQlR7yPvJadlOM4myu5t3/tzi0iFLFPD1UbdTu L0GqZCVw5Ouwf8bX+SVHkXLWz8ZE56LWpMPvwu6eFFoL14vLKaC/pg2ypcw1cBWatj+B uSObZHfcFhhCuaJ/iekbgnOCw3dtQOYtzdNgC3TBCMfWC+gPDzhdT1Rc+H08jElUhDOl FvsRSIa7hmJzuK2SMn0aMNRxe2LoUMx2StGZbz7OlKDNhwVRmu9qpukDpeg4xQkZ5RV5 jwXrPAoVSHm3RNNnPDL3oZhI4LSGLx82cKnjG5SlEK5uxqVepmeD9NDsNRZv7LS1KHFb yITQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:to:subject:message-id:date:from:mime-version :dkim-signature; bh=VJQtUziQQOmirURcTe7echHKsqVLuwIGsSiIYyW3kwA=; b=E7ICUSJGiMXIB1IkKmNCNr89rkgn7MxPevFyhF90KVfgrF2ZvbnyJURoyWE4A7tblS UTblvh0v6cFeqCyriuWwkHn1B/Y1DO28xaJCT/P0ZJlUjxmYHoiek3FXInYb2vdMHp/H 4+iXjI3iVL7o3i0UyKp/4/Qdoi3VCy/Pm+N+zUaCWJCWpqmhePanaVCACz893qPQjoDP E14qYvBLP7rgjzdBnJmon2uzpLyjbqJobLqTCB1iZiN2Ol91gkg8zmpOW0bInWCIN/1a 1k5TiYuTPf8sMdDwqnAzAo60tfxoRiOHC6FYERfYjVgTfkgkVYdrTsIT90y0PkA3mBHQ Txlg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@joelfernandes.org header.s=google header.b=PKRlzUUt; 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 z11si13226348edr.492.2021.06.07.09.27.24; Mon, 07 Jun 2021 09:27:47 -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=@joelfernandes.org header.s=google header.b=PKRlzUUt; 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 S232524AbhFGQ0R (ORCPT + 99 others); Mon, 7 Jun 2021 12:26:17 -0400 Received: from mail-io1-f52.google.com ([209.85.166.52]:38537 "EHLO mail-io1-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233062AbhFGQWX (ORCPT ); Mon, 7 Jun 2021 12:22:23 -0400 Received: by mail-io1-f52.google.com with SMTP id b25so18912953iot.5 for ; Mon, 07 Jun 2021 09:20:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=joelfernandes.org; s=google; h=mime-version:from:date:message-id:subject:to; bh=VJQtUziQQOmirURcTe7echHKsqVLuwIGsSiIYyW3kwA=; b=PKRlzUUtjkfar2pm9yhdQpJhbwQKFsgD1IOvv4aJik49t9UTvCgkLl+zJTs1I6QMhv S/C6B64HEax+sY9q/pv2OFAD5SdH8UiEL6r5N7jROeqIRRzBTS0V7VXEAydZHeiGuyGh uFLJe3zhCRf0bB/S/6IK3YM9EBMO9PfbBS84c= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=VJQtUziQQOmirURcTe7echHKsqVLuwIGsSiIYyW3kwA=; b=mc85nHUJS1xVDbqtCsZub1BsRpWU3mNfgeHvrdK4EIKWLfNT7rsNDPLQ3jEGOIdouV tIZrw2M0VjDS5zQYxnoWa6JydW9/tkjAcs2IWLYMUBW8QMJHZjFNE6t4bXE4y3sT5BoR FNNPf/SnmEJQYJtPVP0eQzy3pnpYyCGbUEk4RyDWFraaJttCENzDL+MsWSubEn6CEte3 Lm+hKbzniQeqBj+uKyEOX6tyA2q15jt/irhyxwSbEKYq8fMMtNqOgIOK5TNw4om0SVEZ Riz3LvmIIX1MoKWLnXQ5Ym6ZAVmepZOzvsWjHU45cTMhb+wE7Gy14HuZjNduSW/A6V23 /VRw== X-Gm-Message-State: AOAM533n2qFKXk/1ync3wNDWvMamliHb1L/HVoYX3GANp5y2eFBAqDtH szYR1Y/Sg6DBlcR6UedhKZTgtV9X79NW656Gkj+xiw== X-Received: by 2002:a05:6638:5ad:: with SMTP id b13mr17403785jar.42.1623082751898; Mon, 07 Jun 2021 09:19:11 -0700 (PDT) MIME-Version: 1.0 From: Joel Fernandes Date: Mon, 7 Jun 2021 12:19:01 -0400 Message-ID: Subject: iowait boost is broken To: Beata Michalska , Valentin Schneider , Quentin Perret , Peter Zijlstra , LKML , Qais Yousef , Vincent Guittot , Viresh Kumar Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi all, Looks like iowait boost is completely broken upstream. Just documenting my findings of iowait boost issues: 1. If a CPU requests iowait boost in a cluster, another CPU can go ahead and reset very quickly it since it thinks there's no new request for the iowait boosting CPU 2. If the iowait is longer than a tick, then successive iowait boost doubling does not happen. So heavy I/O waiting code never gets a boost. 3. update_load_avg() is triggered right after the the iowait boost request which makes another cpufreq update request, this request is a non-iowait boost one so it ends up resetting the iowait boost request (in the same path!). 4. Same as #3 but due the update_blocked_averages from new idle balance path. Here is a patch that tries to address these problems and I see better cpufreq boosting happening, however it is just a test broken patch to highlight the issues: https://git.kernel.org/pub/scm/linux/kernel/git/jfern/linux.git/commit/?h=sched/5.4/iowait-boost-debug-1&id=3627d896d499d168fef9a388e5d6b3359acc3423 I think we ought to rewrite the whole mess instead of fixing it since a lot has changed in scheduler code over time it feels. Beata is working on rewriting the whole iowait boost infra, I am glad she has started the work on this and looking forward to helping with the patches. thanks, - Joel