We treat idling the GT (intel_rps_park) as a downclock event, and reduce
the frequency we intend to restart the GT with. Since the two workloads
are likely related (e.g. a compositor rendering every 16ms), we want to
carry the frequency and load information from across the idling.
However, we do also need to update the frequencies so that workloads
that run for less than 1ms are autotuned by RPS (otherwise we leave
compositors running at max clocks, draining excess power). Conversely,
if we try to run too slowly, the next workload has to run longer. Since
there is a hysteresis in the power graph, below a certain frequency
running a short workload for longer consumes more energy than running it
slightly higher for less time. The exact balance point is unknown
beforehand, but measurements with 30fps media playback indicate that RPe
is a better choice.
Reported-by: Edward Baker <edward.baker(a)intel.com>
Fixes: 043cd2d14ede ("drm/i915/gt: Leave rps->cur_freq on unpark")
Signed-off-by: Chris Wilson <chris(a)chris-wilson.co.uk>
Cc: Edward Baker <edward.baker(a)intel.com>
Cc: Andi Shyti <andi.shyti(a)intel.com>
Cc: Lyude Paul <lyude(a)redhat.com>
Cc: <stable(a)vger.kernel.org> # v5.8+
---
drivers/gpu/drm/i915/gt/intel_rps.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/gpu/drm/i915/gt/intel_rps.c b/drivers/gpu/drm/i915/gt/intel_rps.c
index b13e7845d483..f74d5e09e176 100644
--- a/drivers/gpu/drm/i915/gt/intel_rps.c
+++ b/drivers/gpu/drm/i915/gt/intel_rps.c
@@ -907,6 +907,10 @@ void intel_rps_park(struct intel_rps *rps)
adj = -2;
rps->last_adj = adj;
rps->cur_freq = max_t(int, rps->cur_freq + adj, rps->min_freq);
+ if (rps->cur_freq < rps->efficient_freq) {
+ rps->cur_freq = rps->efficient_freq;
+ rps->last_adj = 0;
+ }
GT_TRACE(rps_to_gt(rps), "park:%x\n", rps->cur_freq);
}
--
2.20.1
This is the start of the stable review cycle for the 4.4.246 release.
There are 38 patches in this series, all will be posted as a response
to this one. If anyone has any issues with these being applied, please
let me know.
Responses should be made by Wed, 25 Nov 2020 12:17:50 +0000.
Anything received after that time might be too late.
The whole patch series can be found in one patch at:
https://www.kernel.org/pub/linux/kernel/v4.x/stable-review/patch-4.4.246-rc…
or in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-4.4.y
and the diffstat can be found below.
thanks,
greg k-h
-------------
Pseudo-Shortlog of commits:
Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
Linux 4.4.246-rc1
Chen Yu <yu.c.chen(a)intel.com>
x86/microcode/intel: Check patch signature before saving microcode for early loading
Thomas Richter <tmricht(a)linux.ibm.com>
s390/cpum_sf.c: fix file permission for cpum_sfb_size
Johannes Berg <johannes.berg(a)intel.com>
mac80211: free sta in sta_info_insert_finish() on errors
Johannes Berg <johannes.berg(a)intel.com>
mac80211: allow driver to prevent two stations w/ same address
Felix Fietkau <nbd(a)nbd.name>
mac80211: minstrel: fix tx status processing corner case
Felix Fietkau <nbd(a)nbd.name>
mac80211: minstrel: remove deferred sampling code
Max Filippov <jcmvbkbc(a)gmail.com>
xtensa: disable preemption around cache alias management calls
Jan Kara <jack(a)suse.cz>
ext4: fix bogus warning in ext4_update_dx_flag()
Vamshi K Sthambamkadi <vamshi.k.sthambamkadi(a)gmail.com>
efivarfs: fix memory leak in efivarfs_create()
Fugang Duan <fugang.duan(a)nxp.com>
tty: serial: imx: keep console clocks always on
Takashi Iwai <tiwai(a)suse.de>
ALSA: mixart: Fix mutex deadlock
Takashi Sakamoto <o-takashi(a)sakamocchi.jp>
ALSA: ctl: fix error path at adding user-defined element set
Daniel Axtens <dja(a)axtens.net>
powerpc/uaccess-flush: fix corenet64_smp_defconfig build
Yicong Yang <yangyicong(a)hisilicon.com>
libfs: fix error cast of negative value in simple_attr_write()
Nishanth Menon <nm(a)ti.com>
regulator: ti-abb: Fix array out of bound read access on the first transition
Zhang Qilong <zhangqilong3(a)huawei.com>
MIPS: Alchemy: Fix memleak in alchemy_clk_setup_cpu
Wu Bo <wubo.oduw(a)gmail.com>
can: m_can: m_can_handle_state_change(): fix state change
Colin Ian King <colin.king(a)canonical.com>
can: peak_usb: fix potential integer overflow on shift of a int
Alejandro Concepcion Rodriguez <alejandro(a)acoro.eu>
can: dev: can_restart(): post buffer from the right context
Leo Yan <leo.yan(a)linaro.org>
perf lock: Don't free "lock_seq_stat" if read_count isn't zero
Fabio Estevam <festevam(a)gmail.com>
ARM: dts: imx50-evk: Fix the chip select 1 IOMUX
Sergey Matyukevich <geomatsi(a)gmail.com>
arm: dts: imx6qdl-udoo: fix rgmii phy-mode for ksz9031 phy
Dan Carpenter <dan.carpenter(a)oracle.com>
Input: adxl34x - clean up a data type in adxl34x_probe()
Paul Burton <paul.burton(a)imgtec.com>
MIPS: Fix BUILD_ROLLBACK_PROLOGUE for microMIPS
Will Deacon <will(a)kernel.org>
arm64: psci: Avoid printing in cpu_psci_cpu_die()
Jianqun Xu <jay.xu(a)rock-chips.com>
pinctrl: rockchip: enable gpio pclk for rockchip_gpio_to_irq
Florian Fainelli <f.fainelli(a)gmail.com>
net: Have netpoll bring-up DSA management interface
Filip Moc <dev(a)moc6.cz>
net: usb: qmi_wwan: Set DTR quirk for MR400
Xin Long <lucien.xin(a)gmail.com>
sctp: change to hold/put transport for proto_unreach_timer
Zhang Changzhong <zhangchangzhong(a)huawei.com>
qlcnic: fix error return code in qlcnic_83xx_restart_hw()
Xie He <xie.he.0141(a)gmail.com>
net: x25: Increase refcnt of "struct x25_neigh" in x25_rx_call_request
Aya Levin <ayal(a)nvidia.com>
net/mlx4_core: Fix init_hca fields offset
Paul Moore <paul(a)paul-moore.com>
netlabel: fix an uninitialized warning in netlbl_unlabel_staticlist()
Paul Moore <paul(a)paul-moore.com>
netlabel: fix our progress tracking in netlbl_unlabel_staticlist()
Heiner Kallweit <hkallweit1(a)gmail.com>
net: bridge: add missing counters to ndo_get_stats64 callback
Zhang Changzhong <zhangchangzhong(a)huawei.com>
net: b44: fix error return code in b44_init_one()
Sebastian Andrzej Siewior <bigeasy(a)linutronix.de>
atm: nicstar: Unmap DMA on send error
Zhang Changzhong <zhangchangzhong(a)huawei.com>
ah6: fix error return code in ah6_input()
-------------
Diffstat:
Makefile | 4 +-
arch/arm/boot/dts/imx50-evk.dts | 2 +-
arch/arm/boot/dts/imx6qdl-udoo.dtsi | 2 +-
arch/arm64/kernel/psci.c | 5 +--
arch/mips/alchemy/common/clock.c | 9 +++-
arch/mips/kernel/genex.S | 3 +-
arch/powerpc/kernel/ppc_ksyms.c | 4 +-
arch/s390/kernel/perf_cpum_sf.c | 2 +-
arch/x86/kernel/cpu/microcode/intel.c | 49 +---------------------
arch/xtensa/mm/cache.c | 14 +++++++
drivers/atm/nicstar.c | 2 +
drivers/input/misc/adxl34x.c | 2 +-
drivers/net/can/dev.c | 2 +-
drivers/net/can/m_can/m_can.c | 4 +-
drivers/net/can/usb/peak_usb/pcan_usb_core.c | 4 +-
drivers/net/ethernet/broadcom/b44.c | 3 +-
drivers/net/ethernet/mellanox/mlx4/fw.c | 6 +--
drivers/net/ethernet/mellanox/mlx4/fw.h | 4 +-
.../net/ethernet/qlogic/qlcnic/qlcnic_83xx_init.c | 3 +-
drivers/net/usb/qmi_wwan.c | 2 +-
drivers/pinctrl/pinctrl-rockchip.c | 2 +
drivers/regulator/ti-abb-regulator.c | 12 +++++-
drivers/tty/serial/imx.c | 20 ++-------
fs/efivarfs/super.c | 1 +
fs/ext4/ext4.h | 3 +-
fs/libfs.c | 6 ++-
include/net/mac80211.h | 6 +++
net/bridge/br_device.c | 1 +
net/core/netpoll.c | 22 ++++++++--
net/ipv6/ah6.c | 3 +-
net/mac80211/debugfs.c | 1 +
net/mac80211/rc80211_minstrel.c | 27 +++---------
net/mac80211/rc80211_minstrel.h | 1 -
net/mac80211/sta_info.c | 32 ++++++++------
net/netlabel/netlabel_unlabeled.c | 17 +++++---
net/sctp/input.c | 4 +-
net/sctp/sm_sideeffect.c | 4 +-
net/sctp/transport.c | 2 +-
net/x25/af_x25.c | 1 +
sound/core/control.c | 2 +-
sound/pci/mixart/mixart_core.c | 5 +--
tools/perf/builtin-lock.c | 2 +-
42 files changed, 149 insertions(+), 151 deletions(-)