This change is for general scheduler improvement.
Change-Id: I616acbe5bfdb0e1bf88e923d98b4a3d54d26d942
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
This change is for general scheduler improvement.
Change-Id: I8f521dfd31ff1c8cc1f16805e4e0ac78228d9383
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
WALT requires both src and dst runqueue locks to be held
during migration. So a double_lock_balance() is added
in move_queued_task() before calling set_task_cpu(). However,
releasing the src rq lock, which is pinned is giving a
lockdep warning. Fix this by unpinning the lock before
calling double_lock_balance.
Change-Id: I64dec0701b3467185cf53f311ebb521c6a822e88
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
Suspend to IDLE invokes tick_unfreeze() on resume. tick_unfreeze() on the
first resuming CPU resumes timekeeping, which also has the side effect of
resetting the softlockup watchdog on this CPU.
But on the secondary CPUs the watchdog is not reset in the resume /
unfreeze() path, which can result in false softlockup warnings on those
CPUs depending on the time spent in suspend.
Prevent this by clearing the softlock watchdog in the unfreeze path also
on the secondary resuming CPUs.
[ tglx: Massaged changelog ]
Signed-off-by: Chunyan Zhang <chunyan.zhang@unisoc.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/r/20200110083902.27276-1-chunyan.zhang@unisoc.com
Bug: 173341055
(cherry picked from commit 5167c506d62dd9ffab73eba23c79b0a8845c9fe1)
Signed-off-by: Chunyan Zhang <zhang.lyra@gmail.com>
Change-Id: Iab440b4137726811fce76f3636a4cf8bafc2c202
In find_energy_efficient_cpu() 'cpu_cap' could be less that 'util'.
It might be because of RT, DL (so higher sched class than CFS), irq or
thermal pressure signal, which reduce the capacity value.
In such situation the result of 'cpu_cap - util' might be negative but
stored in the unsigned long. Then it might be compared with other unsigned
long when uclamp_rq_util_with() reduced the 'util' such that is passes the
fits_capacity() check.
Prevent this situation and make the arithmetic more safe.
Fixes: 1d42509e475cd ("sched/fair: Make EAS wakeup placement consider uclamp restrictions")
Signed-off-by: Lukasz Luba <lukasz.luba@arm.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: Valentin Schneider <valentin.schneider@arm.com>
Link: https://lkml.kernel.org/r/20200810083004.26420-1-lukasz.luba@arm.com
(cherry picked from commit da0777d35f47892f359c3f73ea155870bb595700)
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Ib3e22c155eb031854cfb4428494c1c4da57692b1
* refs/heads/tmp-dc2d5a0:
ANDROID: ABI: Update allowed list for QCOM
ANDROID: ABI: Update allowed list for QCOM
ANDROID: modules: cfi cleanup for module load failure
ANDROID: Temporarily disable XFRM_USER_COMPAT filtering
ANDROID: ABI: Update allowed list for QCOM
ANDROID: ABI: update allowed list for QCOM
ANDROID: fix kernelci build-break due to stop_ipi hook
BACKPORT: rcu/tree: Export rcu_idle_{enter,exit} to modules
ANDROID: GKI: Add some symbols to symbol list
ANDROID: arm64: smp: fix Lockdep warning: RCU used illegally from idle CPU.
ANDROID: Fix build-break caused by android_rvh_nf_conn_alloc hook
ANDROID: GKI: Enable DEBUG_INFO_DWARF4
ANDROID: cfi: ensure RCU is watching in __cfi_slowpath
UPSTREAM: mm/sl[uo]b: export __kmalloc_track(_node)_caller
BACKPORT: xfrm/compat: Translate 32-bit user_policy from sockptr
UPSTREAM: xfrm/compat: Add 32=>64-bit messages translator
UPSTREAM: xfrm/compat: Attach xfrm dumps to 64=>32 bit translator
UPSTREAM: xfrm/compat: Add 64=>32-bit messages translator
BACKPORT: xfrm: Provide API to register translator module
ANDROID: ABI: update allowed list for galaxy
ANDROID: Update the KMI_GENERATION after KMI changes on October 31
ANDROID: Input: bump SW_MAX up to 0x3f
ANDROID: GKI: ABI update for Oct 31 KABI break
ANDROID: GKI: add Android ABI padding to struct nf_conn
ANDROID: GKI: add vendor padding variable in struct skb_shared_info
ANDROID: GKI: net: add vendor hooks for 'struct nf_conn' lifecycle
ANDROID: GKI: add vendor padding variable in struct nf_conn
ANDROID: GKI: net: add vendor hooks for 'struct sock' lifecycle
ANDROID: GKI: add vendor padding variable in struct sock
ANDROID: fuse: Add support for d_canonical_path
ANDROID: vfs: add d_canonical_path for stacked filesystem support
ANDROID: fscrypt: prevent fscrypt_operations from affecting KMI
Revert "ANDROID: GKI: fix ABI breakage in module.h"
ANDROID: ABI: update allowed list for galaxy
FROMLIST: char: misc: increase DYNAMIC_MINORS value
Conflicts:
net/netfilter/nf_conntrack_core.c
Change-Id: I0687237ba5f07f291a5f3b49ee2057071fcb2717
Signed-off-by: Blagovest Kolenichev <bkolenichev@codeaurora.org>
Fix this link error:
ERROR: modpost: "rcu_idle_enter" [drivers/acpi/processor.ko] undefined!
ERROR: modpost: "rcu_idle_exit" [drivers/acpi/processor.ko] undefined!
when CONFIG_ACPI_PROCESSOR is built as module. PeterZ says that in light
of ARM needing those soon too, they should simply be exported.
Link: https://lore.kernel.org/linux-pm/20200921103741.GC5901@zn.tnic/
Bug: 172034763
Change-Id: I26d516d11edbce673f52df6474f6695c5a1e2b07
(cherry picked from commit 3ad1c8ef083bef96ec922688966484be1039e6b5)
Fixes: 1fecfdbb7acc ("ACPI: processor: Take over RCU-idle for C3-BM idle")
Reported-by: Sven Joachim <svenjoac@gmx.de>
Suggested-by: Peter Zijlstra <peterz@infradead.org>
Signed-off-by: Borislav Petkov <bp@suse.de>
Reviewed-by: Paul E. McKenney <paulmckrcu@kernel.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Cheng Jui Wang <cheng-jui.wang@mediatek.com>
Signed-off-by: Chun-Hung Wu <chun-hung.wu@mediatek.com>
Root_task_group is acessed outside CONFIG_SCHED_CGROUP
and it results in compilation error.so add macro check
here to avoid compile issue.
Change-Id: Ic3ce1962236f8114f8b03aca8ebd1c8fbd42a076
Signed-off-by: Biao Long <blong@codeaurora.org>
Indirect calls can happen when RCU is not watching, so we need to wake
it up again for the CFI shadow and __module_address. As these calls can
happen anywhere, use rcu_nmi_enter() similarly to kernel_text_address(),
and switch to rcu_read_lock_sched() for shadow access.
Bug: 169017431
Change-Id: Iebb857df898e644b4952a62d86fa5ff9852b5711
Signed-off-by: Sami Tolvanen <samitolvanen@google.com>
This reverts commit db96212bde as it is
not needed if we are able to update the Android KABI.
Fixes: db96212bde ("ANDROID: GKI: fix ABI breakage in module.h")
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Ic6f4f449e554240457e1f94c49b53fa158f0d00e
Got never update frequency if scheduled the irq
work on an offlined cpu and it will always pending.
Queue sugov irq work on any online cpu if current
cpu is offline.
Change-Id: I33fc691917b5866488b6aeb11ed902a2753130b2
Signed-off-by: Maria Yu <aiquny@codeaurora.org>
[clingutla@codeaurora.org: Moved 'walt_irq_work_queue' to 'sched.h'
for multiple callers]
Signed-off-by: Lingutla Chandrasekhar <clingutla@codeaurora.org>
* refs/heads/tmp-e17d9fc:
ANDROID: GKI: Enable CONFIG_X86_X2APIC
ANDROID: GKI: update xiaomi symbol list
ANDROID: GKI: fix ABI breakage in module.h
UPSTREAM: modules: inherit TAINT_PROPRIETARY_MODULE
UPSTREAM: modules: return licensing information from find_symbol
UPSTREAM: modules: rename the licence field in struct symsearch to license
UPSTREAM: modules: unexport __module_address
UPSTREAM: modules: unexport __module_text_address
UPSTREAM: modules: mark each_symbol_section static
UPSTREAM: modules: mark find_symbol static
UPSTREAM: modules: mark ref_module static
ANDROID: GKI: Update abi_gki_aarch64_exynos
ANDROID: ABI: update allowed list for QCOM
UPSTREAM: binder: fix UAF when releasing todo list
Change-Id: I6db85b4587d3b60f386c58fd6b1589746e9281c5
Signed-off-by: Blagovest Kolenichev <bkolenichev@codeaurora.org>
VM has to go into suspend state outside of use case boundary. Delay in
transitioning to system suspend or spurious wake-ups after the use case
is completed will result in a system regression.
Adding a mechanism to track both the scenarios of delay in system
suspend and spurious wake-ups of the VM by checking the VPM Group state
associated with the VM.
Change-Id: I2a5990989033ffd3cc57ae1cba93b8ba6b63a3c7
Signed-off-by: Sai Harshini Nimmala <snimmala@codeaurora.org>
For modifying load balance policy, we add the hook on
find_busiest_group().
It allows us to modify load balance paths.
Bug: 168248326
Signed-off-by: YT Chang <yt.chang@mediatek.com>
Change-Id: I77ec043576139806551b978eb1bdf9f637442dfb
(cherry picked from commit a2ca8408de6183364b4c17f341f06e875bc7a1c1)
(cherry picked from commit 489646b879ede582b6b00803edd3f777aede4d85)
The estimated utilization for a task:
util_est = max(util_avg, est.enqueue, est.ewma)
is defined based on:
- util_avg: the PELT defined utilization
- est.enqueued: the util_avg at the end of the last activation
- est.ewma: a exponential moving average on the est.enqueued samples
According to this definition, when a task suddenly changes its bandwidth
requirements from small to big, the EWMA will need to collect multiple
samples before converging up to track the new big utilization.
This slow convergence towards bigger utilization values is not
aligned to the default scheduler behavior, which is to optimize for
performance. Moreover, the est.ewma component fails to compensate for
temporarely utilization drops which spans just few est.enqueued samples.
To let util_est do a better job in the scenario depicted above, change
its definition by making util_est directly follow upward motion and
only decay the est.ewma on downward.
Bug: 120440300
Signed-off-by: Patrick Bellasi <patrick.bellasi@matbug.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Acked-by: Vincent Guittot <vincent.guittot@linaro.org>
Cc: Dietmar Eggemann <dietmar.eggemann@arm.com>
Cc: Douglas Raillard <douglas.raillard@arm.com>
Cc: Juri Lelli <juri.lelli@redhat.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Quentin Perret <qperret@google.com>
Cc: Rafael J . Wysocki <rafael.j.wysocki@intel.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: https://lkml.kernel.org/r/20191023205630.14469-1-patrick.bellasi@matbug.net
Signed-off-by: Ingo Molnar <mingo@kernel.org>
(cherry picked from commit b8c96361402aa3e74ad48ceef18aed99153d8da8)
Signed-off-by: Qais Yousef <qais.yousef@arm.com>
Change-Id: Iaa75dec917748375d9043c3ebf21bf272299c8dd
Use rcu_read_lock_sched() & rcu_read_unlock_sched() to mark the
beginning & end of a RCU-sched critical section instead.
Bug: 171362096
Signed-off-by: Neal Liu <neal.liu@mediatek.com>
Change-Id: Idb40e2c2356621398e06944f7cb9b8bc5ef1d92a
commit 262e6ae7081d ("modules: inherit TAINT_PROPRIETARY_MODULE")
changes the size of 'struct module' a bit by adding a single boolean
value to the middle. Move things around a bit and take up a space to
preserve the abi so that nothing changes with the abi before that commit
was merged.
This might be able to be dropped at the next Android KABI "Break", if
one happens.
Bug: 171277690
Fixes: 262e6ae7081d ("modules: inherit TAINT_PROPRIETARY_MODULE")
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Ie31a6fcea384ad665248c87f7abfde4d214da70a
If a TAINT_PROPRIETARY_MODULE exports symbol, inherit the taint flag
for all modules importing these symbols, and don't allow loading
symbols from TAINT_PROPRIETARY_MODULE modules if the module previously
imported gplonly symbols. Add a anti-circumvention devices so people
don't accidentally get themselves into trouble this way.
Comment from Greg:
"Ah, the proven-to-be-illegal "GPL Condom" defense :)"
Bug: 171277690
[jeyu: pr_info -> pr_err and pr_warn as per discussion]
Link: http://lore.kernel.org/r/20200730162957.GA22469@lst.de
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jessica Yu <jeyu@kernel.org>
(cherry picked from commit 262e6ae7081df304fc625cf368d5c2cbba2bb991)
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Id7c1af6bb8523bc39bda1efc661929d9ea0ccb20
Report the GPLONLY status through a new argument.
Bug: 157965270
Bug: 171277690
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jessica Yu <jeyu@kernel.org>
(cherry picked from commit ef1dac6021cc8ec5de02ce31722bf26ac4ed5523)
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I93285e06e380509b11356256da4d3d5a8738e252
Use the same spelling variant as the rest of the file.
Bug: 157965270
Bug: 171277690
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jessica Yu <jeyu@kernel.org>
(cherry picked from commit cd8732cdcc37d7077c4fa2c966b748c0662b607e)
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I0ad6d1dcbe39053566bb922b9a71359f753df85c
each_symbol_section is only used inside of module.c.
Bug: 157965270
Bug: 171277690
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jessica Yu <jeyu@kernel.org>
(cherry picked from commit a54e04914c211b5678602a46b3ede5d82ec1327d)
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I5debe30f150847281874d9b2c47952f9036d37d2
* refs/heads/tmp-8540985:
ANDROID: trace: sched: add sched blocked tracepoint which dumps out context of sleep.
ANDROID: ABI: update allowed list for QCOM
ANDROID: Update KMI_GENERATION after KMI change
ANDROID: GKI: update the .xml file with the October 15 ABI breakages
ANDROID: GKI: fs.h: add Android ABI padding to struct file
ANDROID: vendor_hooks: Add a vendor data to file struct
ANDROID: vendor_hooks: Extend the vendor data array in task_struct
ANDROID: GKI: add fields required to enable CONFIG_TRANSPARENT_HUGEPAGE
ANDROID: Drop abi_gki_aarch64_workarounds
UPSTREAM: ehci-hcd: Move include to keep CRC stable
ANDROID: GKI: update xiaomi symbol list
ANDROID: GKI: update Vivo symbol list
ANDROID: sysrq: add vendor hook for sysrq crash information
ANDROID: ABI: update allowed list for galaxy
ANDROID: GKI: update Vivo symbol list
ANDROID: adding __nocfi to cpuidle_enter_state
ANDROID: ABI: update allowed list for galaxy
ANDROID: workqueue: add vendor hook for wq lockup information
Change-Id: I29b7a5396075c41257cba3d4595356df755490f1
Signed-off-by: Blagovest Kolenichev <bkolenichev@codeaurora.org>
Declare war on uninterruptible sleep. Add a tracepoint which
walks the kernel stack and dumps the first non-scheduler function
called before the scheduler is invoked.
Bug: 120445457
Change-Id: I19e965d5206329360a92cbfe2afcc8c30f65c229
Signed-off-by: Riley Andrews <riandrews@google.com>
[astrachan: deleted an unnecessary whitespace change]
Signed-off-by: Alistair Strachan <astrachan@google.com>
Bug: 170916884
Signed-off-by: Todd Kjos <tkjos@google.com>
- Add the hook to provide additional information like
a task scheduling log.
Bug: 169374262
Signed-off-by: Sangmoon Kim <sangmoon.kim@samsung.com>
Change-Id: I203dbc6faa77687ea48769f76658d28b29ef46fd
This change is for general scheduler improvement.
Change-Id: I1eaa2993c17a50d436b939523bb2158b88d6a8e1
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
With non-canonical CFI, LLVM generates jump table entries for external
symbols in modules and as a result, a function pointer passed from a
module to the core kernel will have a different address.
Disable the warning for now.
Bug: 145210207
Signed-off-by: Daniel Mentz <danielmentz@google.com>
Change-Id: I576a07206a465902773481e51a84529f0ac2e84b
* remotes/origin/tmp-e32adae:
ANDROID: ABI: Update allowed list for QCOM
Revert "UPSTREAM: ehci-hcd: Move include to keep CRC stable"
Revert "ANDROID: Update android/abi_gki_aarch64.xml"
ANDROID: Update android/abi_gki_aarch64.xml
UPSTREAM: ehci-hcd: Move include to keep CRC stable
UPSTREAM: kbuild: use CONFIG_CC_VERSION_TEXT to construct LINUX_COMPILER macro
UPSTREAM: kbuild: do not pass $(KBUILD_CFLAGS) to scripts/mkcompile_h
UPSTREAM: kbuild: ensure full rebuild when the compiler is updated
ANDROID: abi: update for hikey960
ANDROID: dts: hi3660: Fix duplicate adv7533 nodes
ANDROID: kallsyms: ignore ThinLTO+CFI hash suffix in kallsyms_lookup_name()
ANDROID: Refresh ABI.xmls with libabigail 1.8.0-1dca710a
ANDROID: ABI: update allowed list for QCOM
ANDROID: KMI symbol lists: migrate section name
ANDROID: ABI: Update allowed list for GALAXY
ANDROID: hikey960_gki.fragment: Remove UFS and USB bits
ANDROID: lkdtm/usercopy: Use __va_function to find proper vm_mmap address
ANDROID: mm: add generic __va_function and __pa_function
ANDROID: vendor_hooks: Add hooks for debugging exception context
FROMGIT: mm, oom_adj: don't loop through tasks in __set_oom_adj when not necessary
Change-Id: I84ca8d4c3849984c3b18432e9e42136adf6c5d5c
Signed-off-by: Jeevan Shriram <jshriram@codeaurora.org>
- Add EXPORT_SYMBOL_GPL for find_task_by_vpid() so that drivers
can be loadable as a module.
- This API is required by loadable driver module from samsung to
read process related information based on pid and thread id.
To get information on when a certain process or thread was started,
duration of run, Average load contributed by it.
Signed-off-by: Abhilasha Rao <abhilasha.hv@samsung.corp-partner.google.com>
Bug: 158067689
Change-Id: I0db9cc50c93eedff0f3e9dea0ac09a5d17d118f0
(cherry picked from commit bee18dd57e89f4e7aa79f6054b9238b99e45c191)
- Add EXPORT_SYMBOL_GPL for runqueues().
- This API is required by loadable driver module,to get number of
jobs in the run queue (state R) or waiting for disk I/O (state D)
averaged over 1 min.
Signed-off-by: Abhilasha Rao <abhilasha.hv@samsung.corp-partner.google.com>
Bug: 158067689
Change-Id: I3e80a46bef2e7c92714b68cc5b6b617ac50bc478
(cherry picked from commit 6b0a9dc6df8d8be21c8d178a01e0711b0fe6ce73)