From: Greg Kroah-Hartman Date: Sun, 25 Aug 2019 12:19:34 +0000 (+0200) Subject: Merge 4.19.68 into android-4.19 X-Git-Tag: android-x86-8.1-r3~1^2~195 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=bf707e4df1b392551f6b709410be00e9780f59d5;p=android-x86%2Fkernel.git Merge 4.19.68 into android-4.19 Changes in 4.19.68 sh: kernel: hw_breakpoint: Fix missing break in switch statement seq_file: fix problem when seeking mid-record mm/hmm: fix bad subpage pointer in try_to_unmap_one mm: mempolicy: make the behavior consistent when MPOL_MF_MOVE* and MPOL_MF_STRICT were specified mm: mempolicy: handle vma with unmovable pages mapped correctly in mbind mm/memcontrol.c: fix use after free in mem_cgroup_iter() mm/usercopy: use memory range to be accessed for wraparound check Revert "pwm: Set class for exported channels in sysfs" cpufreq: schedutil: Don't skip freq update when limits change xtensa: add missing isync to the cpu_reset TLB code ALSA: hda/realtek - Add quirk for HP Envy x360 ALSA: usb-audio: Fix a stack buffer overflow bug in check_input_term ALSA: usb-audio: Fix an OOB bug in parse_audio_mixer_unit ALSA: hda - Apply workaround for another AMD chip 1022:1487 ALSA: hda - Fix a memory leak bug ALSA: hda - Add a generic reboot_notify ALSA: hda - Let all conexant codec enter D3 when rebooting HID: holtek: test for sanity of intfdata HID: hiddev: avoid opening a disconnected device HID: hiddev: do cleanup in failure of opening a device Input: kbtab - sanity check for endpoint type Input: iforce - add sanity checks net: usb: pegasus: fix improper read if get_registers() fail netfilter: ebtables: also count base chain policies riscv: Make __fstate_clean() work correctly. clk: at91: generated: Truncate divisor to GENERATED_MAX_DIV + 1 clk: sprd: Select REGMAP_MMIO to avoid compile errors clk: renesas: cpg-mssr: Fix reset control race condition xen/pciback: remove set but not used variable 'old_state' irqchip/gic-v3-its: Free unused vpt_page when alloc vpe table fail irqchip/irq-imx-gpcv2: Forward irq type to parent perf header: Fix divide by zero error if f_header.attr_size==0 perf header: Fix use of unitialized value warning libata: zpodd: Fix small read overflow in zpodd_get_mech_type() drm/bridge: lvds-encoder: Fix build error while CONFIG_DRM_KMS_HELPER=m Btrfs: fix deadlock between fiemap and transaction commits scsi: hpsa: correct scsi command status issue after reset scsi: qla2xxx: Fix possible fcport null-pointer dereferences drm/amdgpu: fix a potential information leaking bug ata: libahci: do not complain in case of deferred probe kbuild: modpost: handle KBUILD_EXTRA_SYMBOLS only for external modules kbuild: Check for unknown options with cc-option usage in Kconfig and clang arm64/efi: fix variable 'si' set but not used arm64: unwind: Prohibit probing on return_address() arm64/mm: fix variable 'pud' set but not used IB/core: Add mitigation for Spectre V1 IB/mlx5: Fix MR registration flow to use UMR properly IB/mad: Fix use-after-free in ib mad completion handling drm: msm: Fix add_gpu_components drm/exynos: fix missing decrement of retry counter Revert "kmemleak: allow to coexist with fault injection" ocfs2: remove set but not used variable 'last_hash' asm-generic: fix -Wtype-limits compiler warnings arm64: KVM: regmap: Fix unexpected switch fall-through KVM: arm/arm64: Sync ICH_VMCR_EL2 back when about to block staging: comedi: dt3000: Fix signed integer overflow 'divider * base' staging: comedi: dt3000: Fix rounding up of timer divisor iio: adc: max9611: Fix temperature reading in probe USB: core: Fix races in character device registration and deregistraion usb: gadget: udc: renesas_usb3: Fix sysfs interface of "role" usb: cdc-acm: make sure a refcount is taken early enough USB: CDC: fix sanity checks in CDC union parser USB: serial: option: add D-Link DWM-222 device ID USB: serial: option: Add support for ZTE MF871A USB: serial: option: add the BroadMobi BM818 card USB: serial: option: Add Motorola modem UARTs drm/i915/cfl: Add a new CFL PCI ID. dm: disable DISCARD if the underlying storage no longer supports it arm64: ftrace: Ensure module ftrace trampoline is coherent with I-side netfilter: conntrack: Use consistent ct id hash calculation Input: psmouse - fix build error of multiple definition iommu/amd: Move iommu_init_pci() to .init section bnx2x: Fix VF's VLAN reconfiguration in reload. bonding: Add vlan tx offload to hw_enc_features net: dsa: Check existence of .port_mdb_add callback before calling it net/mlx4_en: fix a memory leak bug net/packet: fix race in tpacket_snd() sctp: fix memleak in sctp_send_reset_streams sctp: fix the transport error_count check team: Add vlan tx offload to hw_enc_features tipc: initialise addr_trail_end when setting node addresses xen/netback: Reset nr_frags before freeing skb net/mlx5e: Only support tx/rx pause setting for port owner net/mlx5e: Use flow keys dissector to parse packets for ARFS mmc: sdhci-of-arasan: Do now show error message in case of deffered probe Linux 4.19.68 Signed-off-by: Greg Kroah-Hartman Change-Id: I8d9bb84a852deab3581f6cb37b4cb16e9bfe927c --- bf707e4df1b392551f6b709410be00e9780f59d5 diff --cc kernel/sched/cpufreq_schedutil.c index 6b94e8117c29,64d54acc9928..2dc8aa8286a4 --- a/kernel/sched/cpufreq_schedutil.c +++ b/kernel/sched/cpufreq_schedutil.c @@@ -94,35 -91,15 +95,38 @@@ static bool sugov_should_update_freq(st !cpufreq_this_cpu_can_update(sg_policy->policy)) return false; - if (unlikely(sg_policy->need_freq_update)) + if (unlikely(sg_policy->limits_changed)) { + sg_policy->limits_changed = false; + sg_policy->need_freq_update = true; return true; + } + /* No need to recalculate next freq for min_rate_limit_us + * at least. However we might still decide to further rate + * limit once frequency change direction is decided, according + * to the separate rate limits. + */ + delta_ns = time - sg_policy->last_freq_update_time; + return delta_ns >= sg_policy->min_rate_limit_ns; +} + +static bool sugov_up_down_rate_limit(struct sugov_policy *sg_policy, u64 time, + unsigned int next_freq) +{ + s64 delta_ns; + + delta_ns = time - sg_policy->last_freq_update_time; + + if (next_freq > sg_policy->next_freq && + delta_ns < sg_policy->up_rate_delay_ns) + return true; - return delta_ns >= sg_policy->freq_update_delay_ns; + if (next_freq < sg_policy->next_freq && + delta_ns < sg_policy->down_rate_delay_ns) + return true; + + return false; } static bool sugov_update_next_freq(struct sugov_policy *sg_policy, u64 time, @@@ -948,10 -855,10 +954,10 @@@ static void sugov_limits(struct cpufreq mutex_unlock(&sg_policy->work_lock); } - sg_policy->need_freq_update = true; + sg_policy->limits_changed = true; } -static struct cpufreq_governor schedutil_gov = { +struct cpufreq_governor schedutil_gov = { .name = "schedutil", .owner = THIS_MODULE, .dynamic_switching = true,