- 12 Dec, 2013 10 commits
-
-
Paul E. McKenney authored
Merge branches 'doc.2013.12.03a', 'fixes.2013.12.12a', 'rcutorture.2013.12.03a' and 'sparse.2013.12.12a' into HEAD doc.2013.12.03a: Topic branch for documentation changes. fixes.2013.12.12a: Topic branch for miscellaneous fixes. rcutorture.2013.12.03a: Topic branch for new rcutorture/KVM scripting. sparse.2013.12.12a: Topic branch for sparse-RCU changes.
-
Teodora Baluta authored
Function prototypes don't need to have the "extern" keyword since this is the default behavior. Its explicit use is redundant. This commit therefore removes them. Signed-off-by:
Teodora Baluta <teobaluta@gmail.com> Signed-off-by:
Paul E. McKenney <paulmck@linux.vnet.ibm.com>
-
Teodora Baluta authored
Function prototypes don't need to have the "extern" keyword since this is the default behavior. Its explicit use is redundant. This commit therefore removes them. Signed-off-by:
Teodora Baluta <teobaluta@gmail.com> Signed-off-by:
Paul E. McKenney <paulmck@linux.vnet.ibm.com>
-
Chen Gang authored
If the rcutorture SRCU output exceeds 4096 bytes, for example, if you have more than about 75 CPUs, it will overflow the current statically allocated buffer. This commit therefore replaces this static buffer with a dynamically buffer whose size is based on the number of CPUs. Benefits: - Avoids both buffer overflow and output truncation. - Handles an arbitrarily large number of CPUs. - Straightforward implementation. Shortcomings: - Some memory is wasted: 1 cpu now comsumes 50 - 60 bytes, and this patch provides 200 bytes. Therefore, for 1K CPUs, roughly 100KB of memory will be wasted. However, the memory is freed immediately after printing, so this wastage should not be a problem in practice. Testing (Fedora16 2 CPUs, 2GB RAM x86_64): - as module, with/without "torture_type=srcu". - build-in not boot runnable, with/without "torture_type=srcu". - build-in let boot runnable, with/without "torture_type=srcu". Signed-off-by:
Chen Gang <gang.chen@asianux.com> Signed-off-by:
Paul E. McKenney <paulmck@linux.vnet.ibm.com>
-
Paul E. McKenney authored
Whenever a CPU receives a scheduling-clock interrupt, RCU checks to see if the RCU core needs anything from this CPU. If so, RCU raises RCU_SOFTIRQ to carry out any needed processing. This approach has worked well historically, but it is undesirable on NO_HZ_FULL CPUs. Such CPUs are expected to spend almost all of their time in userspace, so that scheduling-clock interrupts can be disabled while there is only one runnable task on the CPU in question. Unfortunately, raising any softirq has the potential to wake up ksoftirqd, which would provide the second runnable task on that CPU, preventing disabling of scheduling-clock interrupts. What is needed instead is for RCU to leave NO_HZ_FULL CPUs alone, relying on the grace-period kthreads' quiescent-state forcing to do any needed RCU work on behalf of those CPUs. This commit therefore refrains from raising RCU_SOFTIRQ on any NO_HZ_FULL CPUs during any grace periods that have been in effect for less than one second. The one-second limit handles the case where an inappropriate workload is running on a NO_HZ_FULL CPU that features lots of scheduling-clock interrupts, but no idle or userspace time. Reported-by:
Mike Galbraith <bitbucket@online.de> Signed-off-by:
Paul E. McKenney <paulmck@linux.vnet.ibm.com> Tested-by:
Mike Galbraith <bitbucket@online.de> Toasted-by:
Frederic Weisbecker <fweisbec@gmail.com>
-
Lai Jiangshan authored
After commit #10f39bb1 (rcu: protect __rcu_read_unlock() against scheduler-using irq handlers), it is no longer possible to enter the main body of rcu_read_lock_special() from an NMI, interrupt, or softirq handler. In theory, this implies that the check for "in_irq() || in_serving_softirq()" must always fail, so that in theory this check could be removed entirely. In practice, this commit wraps this condition with a WARN_ON_ONCE(). If this warning never triggers, then the condition will be removed entirely. [ paulmck: And one way of triggering the WARN_ON() is if a scheduling clock interrupt occurs in an RCU read-side critical section, setting RCU_READ_UNLOCK_NEED_QS, which is handled by rcu_read_unlock_special(). Updated this commit to return if only that bit was set. ] Signed-off-by:
Lai Jiangshan <laijs@cn.fujitsu.com> Signed-off-by:
Paul E. McKenney <paulmck@linux.vnet.ibm.com>
-
Paul E. McKenney authored
There is currently no way to initialize a global RCU-protected pointer without either putting up with sparse complaints or open-coding an obscure cast. This commit therefore creates RCU_INITIALIZER(), which is intended to be used as follows: struct foo __rcu *p = RCU_INITIALIZER(&my_rcu_structure); This commit also applies RCU_INITIALIZER() to eliminate repeated open-coded obscure casts in __rcu_assign_pointer(), RCU_INIT_POINTER(), and RCU_POINTER_INITIALIZER(). This commit also inlines __rcu_assign_pointer() into its only caller, rcu_assign_pointer(). Suggested-by:
Steven Rostedt <rostedt@goodmis.org> Signed-off-by:
Paul E. McKenney <paulmck@linux.vnet.ibm.com> Reviewed-by:
Josh Triplett <josh@joshtriplett.org>
-
Josh Triplett authored
The rcu_assign_pointer() primitive needs to use ACCESS_ONCE to make the assignment to the destination pointer volatile, to protect against compilers too clever for their own good. Signed-off-by:
Josh Triplett <josh@joshtriplett.org> Signed-off-by:
Paul E. McKenney <paulmck@linux.vnet.ibm.com>
-
Paul E. McKenney authored
Although rcu_assign_pointer() can be used to assign a constant NULL pointer, doing so gets you an unnecessary memory barrier and in some circumstances, sparse warnings. This commit therefore changes the rcu_assign_pointer() of NULL in __bond_release_one() to RCU_INIT_POINTER(). Signed-off-by:
Paul E. McKenney <paulmck@linux.vnet.ibm.com> Reviewed-by:
Josh Triplett <josh@joshtriplett.org>
-
Paul E. McKenney authored
The rcu_assign_pointer() macro, as with most cpp macros, must not evaluate its argument more than once. And it in fact does not. But this might not be obvious to the casual observer, because one of the arguments appears no less than three times. However, but one expansion is only visible to sparse (__CHECKER__), and one lives inside a typeof (where it will never be evaluated), so this is in fact safe. This commit therefore adds a comment making this explicit. Reported-by:
Josh Triplett <josh@joshtriplett.org> Signed-off-by:
Paul E. McKenney <paulmck@linux.vnet.ibm.com> Reviewed-by:
Josh Triplett <josh@joshtriplett.org>
-
- 09 Dec, 2013 4 commits
-
-
Paul E. McKenney authored
Currently blocking in an RCU callback function will result in "scheduling while atomic", which could be triggered for any number of reasons. To aid debugging, this patch introduces a rcu_callback_map that is used to tie the inappropriate voluntary context switch back to the fact that the function is being invoked from within a callback. Signed-off-by:
Paul E. McKenney <paulmck@linux.vnet.ibm.com>
-
Paul E. McKenney authored
This commit documents the memory-barrier guarantees provided by synchronize_srcu() and call_srcu(). Signed-off-by:
Paul E. McKenney <paulmck@linux.vnet.ibm.com>
-
Paul E. McKenney authored
Each element of the rcu_state structure's ->levelspread[] array is intended to contain the per-level fanout, where the zero-th element corresponds to the root of the rcu_node tree, and the last element corresponds to the leaves. In the CONFIG_RCU_FANOUT_EXACT case, this means that the last element should be filled in from CONFIG_RCU_FANOUT_LEAF (or from the rcu_fanout_leaf boot parameter, if provided) and that the remaining elements should be filled in from CONFIG_RCU_FANOUT. Unfortunately, the current code in rcu_init_levelspread() takes the opposite approach, placing CONFIG_RCU_FANOUT_LEAF in the zero-th element and CONFIG_RCU_FANOUT in the remaining elements. For typical power-of-two values, this generates odd but functional rcu_node trees. However, other values, for example CONFIG_RCU_FANOUT=3 and CONFIG_RCU_FANOUT_LEAF=2, generate trees that can leave some CPUs out of the grace-period computation, resulting in too-short grace periods and therefore a broken RCU implementation. This commit therefore fixes rcu_init_levelspread() to set the last ->levelspread[] array element from CONFIG_RCU_FANOUT_LEAF and the remaining elements from CONFIG_RCU_FANOUT, thus generating the intended rcu_node trees. Signed-off-by:
Paul E. McKenney <paulmck@linux.vnet.ibm.com>
-
Fengguang Wu authored
This commit fixes the following coccinelle warning: kernel/rcu/tree.c:712:9-10: WARNING: return of 0/1 in function 'rcu_lockdep_current_cpu_online' with return type bool Return statements in functions returning bool should use true/false instead of 1/0. Generated by: coccinelle/misc/boolreturn.cocci Signed-off-by:
Fengguang Wu <fengguang.wu@intel.com> Signed-off-by:
Paul E. McKenney <paulmck@linux.vnet.ibm.com>
-
- 03 Dec, 2013 26 commits
-
-
Paul E. McKenney authored
All of the rcutorture scripts has the usual GPL header, which contains a long-obsolete postal address for FSF. To avoid the need to track the FSF office's movements, this commit substitutes the URL where GPL may be found. Reported-by:
Greg KH <gregkh@linuxfoundation.org> Reported-by:
Steven Rostedt <rostedt@goodmis.org> Signed-off-by:
Paul E. McKenney <paulmck@linux.vnet.ibm.com>
-
Paul E. McKenney authored
Signed-off-by:
Paul E. McKenney <paulmck@linux.vnet.ibm.com> Cc: Greg KH <gregkh@linuxfoundation.org>
-
Paul E. McKenney authored
The output of the rcutorture scripts often requires interpretation, so this commit simplifies this interpretation by tagging messages as BUGs (colored red) or WARNINGs (colored yellow). Reported-by:
Ingo Molnar <mingo@kernel.org> Signed-off-by:
Paul E. McKenney <paulmck@linux.vnet.ibm.com> Cc: Greg KH <gregkh@linuxfoundation.org>
-
Paul E. McKenney authored
Repeatedly running a given test, for example, by repeating the name as in "--configs "TREE08 TREE08 TREE08" records the results only of the last run of this test. This is because the earlier results are overwritten by the later results. This commit therefore checks for earlier results, using numbered file extensions to distinguish multiple runs. The earlier example would therefore create directories TREE01, TREE01.2, and TREE01.3. Signed-off-by:
Paul E. McKenney <paulmck@linux.vnet.ibm.com> Cc: Greg KH <gregkh@linuxfoundation.org>
-
Paul E. McKenney authored
The commit causes kvm.sh to invoke kvm-recheck.sh at the end of each run, and causes kvm-recheck.sh to print only the name of the test, not the full path to the corresponding Kconfig file. Signed-off-by:
Paul E. McKenney <paulmck@linux.vnet.ibm.com> Cc: Greg KH <gregkh@linuxfoundation.org>
-
Paul E. McKenney authored
Signed-off-by:
Paul E. McKenney <paulmck@linux.vnet.ibm.com> Cc: Greg KH <gregkh@linuxfoundation.org>
-
Paul E. McKenney authored
The TREE08 Kconfig fragment does not enable tracing, which is appropriate for its test case. However, this can be inconvenient in cases where TREE08 locates RCU bugs. This commit therefore adds a TREE08-T that differs from TREE08 only in enabling CONFIG_RCU_TRACE. Signed-off-by:
Paul E. McKenney <paulmck@linux.vnet.ibm.com> Cc: Greg KH <gregkh@linuxfoundation.org>
-
Paul E. McKenney authored
This commit adds the --kmake-arg to kvm.sh, which allows passing in things like "V=1" to see the build commands, as well as enabling the CROSS_COMPILE= make macro used for cross-building. Signed-off-by:
Paul E. McKenney <paulmck@linux.vnet.ibm.com> Cc: Greg KH <gregkh@linuxfoundation.org>
-
Paul E. McKenney authored
This commit adds the --no-initrd argument to kvm.sh, which permits initrd to be contained in a root partition specified by the --bootargs argument. Without --no-initrd, the kernel build expects an initrd directory in the same rcutorture directory that contains bin and configs. Signed-off-by:
Paul E. McKenney <paulmck@linux.vnet.ibm.com> Cc: Greg KH <gregkh@linuxfoundation.org>
-
Paul E. McKenney authored
This commits adds the --qemu-args argument to kvm.sh that is required to pass boot devices down through to qemu. Signed-off-by:
Paul E. McKenney <paulmck@linux.vnet.ibm.com> Cc: Greg KH <gregkh@linuxfoundation.org>
-
Paul E. McKenney authored
This commit allows easy specification of trace_event lists, among other things. Signed-off-by:
Paul E. McKenney <paulmck@linux.vnet.ibm.com> Cc: Greg KH <gregkh@linuxfoundation.org>
-
Paul E. McKenney authored
This commit adds --buildonly, which does the builds specified by the --configs argument, but does not boot or test the resulting kernels. Signed-off-by:
Paul E. McKenney <paulmck@linux.vnet.ibm.com> Cc: Greg KH <gregkh@linuxfoundation.org>
-
Paul E. McKenney authored
Don't grab the configuration fragment from the configs directory because it might well have been changed since the test was run. Instead, use the ConfigFragment file that was placed in the results directory. Signed-off-by:
Paul E. McKenney <paulmck@linux.vnet.ibm.com> Cc: Greg KH <gregkh@linuxfoundation.org>
-
Paul E. McKenney authored
As it stands, the default kernel boot parameters generated from the Kconfig fragment will override any supplied with the .boot file that can optionally accompany a Kconfig fragment. Rearrange ordering to permit the specific .boot arguments to override those generated by analyzing the Kconfig fragment. Signed-off-by:
Paul E. McKenney <paulmck@linux.vnet.ibm.com> Cc: Greg KH <gregkh@linuxfoundation.org>
-
Paul E. McKenney authored
This commit expands the checks for what architecture is running to generate additional qemu-system- commands, then uses the resulting qemu-system- command name to choose different qemu arguments as needed for different architectures. Signed-off-by:
Paul E. McKenney <paulmck@linux.vnet.ibm.com> Cc: Greg KH <gregkh@linuxfoundation.org>
-
Paul E. McKenney authored
The --rcu-kvm argument was intended to allow the scripts to live in an alternate location. Unfortunately, this prevents the kvm.sh script from using common functions until after it finished parsing arguments, because it doesn't know where to find them until then. However, "cp -a" and "ln -s" work pretty well, so lack of an --rcu-kvm argument can be easily worked around. This commit therefore removes this argument. Signed-off-by:
Paul E. McKenney <paulmck@linux.vnet.ibm.com> Cc: Greg KH <gregkh@linuxfoundation.org>
-
Paul E. McKenney authored
The qemu -name argument doesn't seem to be useful in this environment, so this commit removes it. Signed-off-by:
Paul E. McKenney <paulmck@linux.vnet.ibm.com> Cc: Greg KH <gregkh@linuxfoundation.org>
-
Paul E. McKenney authored
The task of working out which flavor of qemu to use gets more complex as more types of CPUs are supported. Adding Power makes three in addition to 32-bit and 64-bit x86, so it is time to pull this out into a function. This commit therefore creates an identify_qemu function and also adds a --qemu-cmd command-line argument for the inevitable case where the identify_qemu cannot figure it out. Signed-off-by:
Paul E. McKenney <paulmck@linux.vnet.ibm.com> Cc: Greg KH <gregkh@linuxfoundation.org>
-
Paul E. McKenney authored
The commit uses configcheck.sh from within configinit.sh, replacing the imperfect inline expansion that was there before. Signed-off-by:
Paul E. McKenney <paulmck@linux.vnet.ibm.com> Cc: Greg KH <gregkh@linuxfoundation.org>
-
Paul E. McKenney authored
This commit drops no-longer-needed diagnostics from the output. Some of them are retained in logfiles, in case they are ever needed. Signed-off-by:
Paul E. McKenney <paulmck@linux.vnet.ibm.com> Cc: Greg KH <gregkh@linuxfoundation.org>
-
Paul E. McKenney authored
The TINY_RCU test cases were first put in place many years ago, and have been incrementally modified rather than being reworked. This commit therefore completes a long-overdue reworking of the TINY_RCU test cases. Signed-off-by:
Paul E. McKenney <paulmck@linux.vnet.ibm.com> Cc: Greg KH <gregkh@linuxfoundation.org>
-
Paul E. McKenney authored
The TREE_RCU test cases were first put in place many years ago, and have been incrementally modified rather than being reworked. This commit therefore completes a long-overdue reworking of the TREE_RCU test cases. Signed-off-by:
Paul E. McKenney <paulmck@linux.vnet.ibm.com> Cc: Greg KH <gregkh@linuxfoundation.org>
-
Paul E. McKenney authored
Use .boot facility to ease inclusion of SRCU into automated testing. Signed-off-by:
Paul E. McKenney <paulmck@linux.vnet.ibm.com> Cc: Greg KH <gregkh@linuxfoundation.org>
-
Paul E. McKenney authored
The v3.12 version of the kernel added the CONFIG_NO_HZ_FULL_SYSIDLE Kconfig parameter, so this commit adds a version transition at that point. Signed-off-by:
Paul E. McKenney <paulmck@linux.vnet.ibm.com> Cc: Greg KH <gregkh@linuxfoundation.org>
-
Paul E. McKenney authored
Some Kconfig fragments require rcutorture module parameters to do optimal testing, for example, a configuration for SRCU would need rcutorture.torture_type=srcu. This commit therefore adds a per-Kconfig-fragment boot-parameter capability. Signed-off-by:
Paul E. McKenney <paulmck@linux.vnet.ibm.com> Cc: Greg KH <gregkh@linuxfoundation.org>
-
Paul E. McKenney authored
Different Kconfig parameters apply to different kernel versions, as do different rcutorture module parameters. This commit allows the rcutorture test scripts to adjust for different kernel versions. Signed-off-by:
Paul E. McKenney <paulmck@linux.vnet.ibm.com> Cc: Greg KH <gregkh@linuxfoundation.org>
-