Go to file
Waiman Long 86f4f43dc8 rcu: Move rcu_dynticks_eqs_online() to rcu_cpu_starting()
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2065994

commit 2caebefb00f03b5ba13d44aa6cc3723759b43822
Author: Paul E. McKenney <paulmck@kernel.org>
Date:   Wed, 28 Jul 2021 12:38:42 -0700

    rcu: Move rcu_dynticks_eqs_online() to rcu_cpu_starting()

    The purpose of rcu_dynticks_eqs_online() is to adjust the ->dynticks
    counter of an incoming CPU when required.  It is currently invoked
    from rcutree_prepare_cpu(), which runs before the incoming CPU is
    running, and thus on some other CPU.  This makes the per-CPU accesses in
    rcu_dynticks_eqs_online() iffy at best, and it all "works" only because
    the running CPU cannot possibly be in dyntick-idle mode, which means
    that rcu_dynticks_eqs_online() never has any effect.

    It is currently OK for rcu_dynticks_eqs_online() to have no effect, but
    only because the CPU-offline process just happens to leave ->dynticks in
    the correct state.  After all, if ->dynticks were in the wrong state on a
    just-onlined CPU, rcutorture would complain bitterly the next time that
    CPU went idle, at least in kernels built with CONFIG_RCU_EQS_DEBUG=y,
    for example, those built by rcutorture scenario TREE04.  One could
    argue that this means that rcu_dynticks_eqs_online() is unnecessary,
    however, removing it would make the CPU-online process vulnerable to
    slight changes in the CPU-offline process.

    One could also ask why it is safe to move the rcu_dynticks_eqs_online()
    call so late in the CPU-online process.  Indeed, there was a time when it
    would not have been safe, which does much to explain its current location.
    However, the marking of a CPU as online from an RCU perspective has long
    since moved from rcutree_prepare_cpu() to rcu_cpu_starting(), and all
    that is required is that ->dynticks be set correctly by the time that
    the CPU is marked as online from an RCU perspective.  After all, the RCU
    grace-period kthread does not check to see if offline CPUs are also idle.
    (In case you were curious, this is one reason why there is quiescent-state
    reporting as part of the offlining process.)

    This commit therefore moves the call to rcu_dynticks_eqs_online() from
    rcutree_prepare_cpu() to rcu_cpu_starting(), this latter being guaranteed
    to be running on the incoming CPU.  The call to this function must of
    course be placed before this rcu_cpu_starting() announces this CPU's
    presence to RCU.

    Reported-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
    Signed-off-by: Paul E. McKenney <paulmck@kernel.org>

Signed-off-by: Waiman Long <longman@redhat.com>
2022-03-24 17:15:42 -04:00
Documentation rcu: Fix undefined Kconfig macros 2022-03-24 17:15:39 -04:00
LICENSES LICENSES/dual/CC-BY-4.0: Git rid of "smart quotes" 2021-07-15 06:31:24 -06:00
arch rcu: Fix undefined Kconfig macros 2022-03-24 17:15:39 -04:00
block Merge: block: kabi: reserve padding space for public structure 2022-03-16 17:05:57 +00:00
certs
crypto crypto: api - Move cryptomgr soft dependency into algapi 2022-03-14 21:10:24 +01:00
drivers Merge: powerpc/ibmvnic: DLPAR fix kernel Oops when add of vNIC device 2022-03-22 09:34:34 +00:00
fs Merge: ext4: fix remount with 'abort' option 2022-02-22 13:41:16 +00:00
include rcu-tasks: Remove second argument of rcu_read_unlock_trace_special() 2022-03-24 17:15:41 -04:00
init Merge: kernel: Include RHEL Ecosystem message 2022-01-17 14:51:30 +00:00
ipc memcg: enable accounting for new namesapces and struct nsproxy 2021-11-29 11:41:20 -05:00
kernel rcu: Move rcu_dynticks_eqs_online() to rcu_cpu_starting() 2022-03-24 17:15:42 -04:00
lib lib/iov_iter: initialize "flags" in new pipe_buffer 2022-03-10 14:05:45 +01:00
mm mm: fix invalid page pointer returned with FOLL_PIN gups 2022-02-22 15:09:25 +08:00
net Merge: tipc: improve size validations for received domain records 2022-02-24 16:31:54 +00:00
redhat [redhat] kernel-5.14.0-74.el9 2022-03-22 10:33:25 +00:00
samples Merge: Update NFS to upstream v5.16 2022-02-21 14:38:40 +00:00
scripts Merge: Enable AMX(TMUL) for Sapphire Rapids 2021-12-22 19:34:58 -03:00
security selinux: fix double free of cond_list on error paths 2022-02-09 11:14:49 +01:00
sound ALSA: memalloc: Unify x86 SG-buffer handling (take#3) 2022-02-02 12:32:08 +01:00
tools torture: Make torture.sh print the number of files to be compressed 2022-03-24 17:15:37 -04:00
usr
virt KVM: Remove kvm_is_transparent_hugepage() and PageTransCompoundMap() 2022-01-17 07:35:36 +00:00
.clang-format
.cocciconfig
.get_maintainer.conf get_maintainer.conf: Update with new location of RHMAINTAINERS 2022-01-19 14:26:16 -05:00
.get_maintainer.ignore
.gitattributes gitattributes: Remove unnecesary export restrictions 2021-08-30 10:50:35 -04:00
.gitignore gitlab: Add CI job for packaging scripts 2021-08-30 10:49:13 -04:00
.gitlab-ci.yml Merge: CI: Use 9.0-rt branch for rhel-9 realtime_check 2022-03-16 21:14:58 +00:00
.mailmap m68k updates for v5.14 2021-06-28 14:01:03 -07:00
COPYING
CREDITS
Kbuild
Kconfig Introduce CONFIG_RH_DISABLE_DEPRECATED 2021-08-30 10:50:55 -04:00
Kconfig.redhat Rename RH_DISABLE_DEPRECATED to RHEL_DIFFERENCES 2021-08-30 14:29:36 -04:00
MAINTAINERS Merge: ALSA: backport for RHEL 9.0 2022-02-19 02:58:02 +00:00
Makefile block: move CONFIG_BLOCK guard to top Makefile 2021-12-06 16:42:52 +08:00
Makefile.rhelver [redhat] kernel-5.14.0-74.el9 2022-03-22 10:33:25 +00:00
README
makefile redhat: Change Makefile target names to dist- 2021-08-30 10:50:11 -04: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.