No description
Find a file
Sebastian Andrzej Siewior 0790ed6238 mm/memcg: disable migration instead of preemption in drain_all_stock().
Before the for-each-CPU loop, preemption is disabled so that so that
drain_local_stock() can be invoked directly instead of scheduling a
worker.  Ensuring that drain_local_stock() completed on the local CPU is
not correctness problem.  It _could_ be that the charging path will be
forced to reclaim memory because cached charges are still waiting for
their draining.

Disabling preemption before invoking drain_local_stock() is problematic
on PREEMPT_RT due to the sleeping locks involved.  To ensure that no CPU
migrations happens across for_each_online_cpu() it is enouhg to use
migrate_disable() which disables migration and keeps context preemptible
to a sleeping lock can be acquired.  A race with CPU hotplug is not a
problem because pcp data is not going away.  In the worst case we just
schedule draining of an empty stock.

Use migrate_disable() instead of get_cpu() around the
for_each_online_cpu() loop.

Link: https://lkml.kernel.org/r/20220226204144.1008339-7-bigeasy@linutronix.de
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Acked-by: Michal Hocko <mhocko@suse.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: kernel test robot <oliver.sang@intel.com>
Cc: Michal Hocko <mhocko@kernel.org>
Cc: Michal Koutný <mkoutny@suse.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Roman Gushchin <roman.gushchin@linux.dev>
Cc: Shakeel Butt <shakeelb@google.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Vladimir Davydov <vdavydov.dev@gmail.com>
Cc: Waiman Long <longman@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2022-03-22 15:57:03 -07:00
arch Fix for the SLS mitigation, which makes a "SETcc/RET" pair grow to 2022-03-20 09:46:52 -07:00
block block/bfq-iosched.c: use "false" rather than "BLK_RW_ASYNC" 2022-03-22 15:57:01 -07:00
certs
crypto
Documentation mm/memcg: disable threshold event handlers on PREEMPT_RT 2022-03-22 15:57:02 -07:00
drivers remove bdi_congested() and wb_congested() and related functions 2022-03-22 15:57:01 -07:00
fs mm: fs: fix lru_cache_disabled race in bh_lru 2022-03-22 15:57:01 -07:00
include mm/memcg: retrieve parent memcg from css.parent 2022-03-22 15:57:02 -07:00
init
ipc
kernel configs/debug: restore DEBUG_INFO=y for overriding 2022-03-17 11:02:13 -07:00
lib
LICENSES
mm mm/memcg: disable migration instead of preemption in drain_all_stock(). 2022-03-22 15:57:03 -07:00
net net: dsa: Add missing of_node_put() in dsa_port_parse_of 2022-03-17 13:13:27 +01:00
samples
scripts scripts/spelling.txt: add more spellings to spelling.txt 2022-03-22 15:57:00 -07:00
security
sound
tools selftests: memcg: test high limit for single entry allocation 2022-03-22 15:57:02 -07:00
usr
virt
.clang-format
.cocciconfig
.get_maintainer.ignore
.gitattributes
.gitignore
.mailmap MAINTAINERS: Update Jisheng's email address 2022-03-08 17:30:32 +01:00
COPYING
CREDITS
Kbuild
Kconfig
MAINTAINERS Add Paolo Abeni to networking maintainers 2022-03-15 12:16:10 -07:00
Makefile Linux 5.17 2022-03-20 13:14:17 -07:00
README

Linux kernel
============

There are several guides for kernel developers and users. These guides can
be rendered in a number of formats, like HTML and PDF. Please read
Documentation/admin-guide/README.rst first.

In order to build the documentation, use ``make htmldocs`` or
``make pdfdocs``.  The formatted documentation can also be read online at:

    https://www.kernel.org/doc/html/latest/

There are various text files in the Documentation/ subdirectory,
several of them using the Restructured Text markup notation.

Please read the Documentation/process/changes.rst file, as it contains the
requirements for building and running the kernel, and information about
the problems which may result by upgrading your kernel.