<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/kernel/rcu/srcu.c, branch v4.3</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v4.3</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v4.3'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2015-07-22T22:27:32Z</updated>
<entry>
<title>rcu: Rename rcu_lockdep_assert() to RCU_LOCKDEP_WARN()</title>
<updated>2015-07-22T22:27:32Z</updated>
<author>
<name>Paul E. McKenney</name>
<email>paulmck@linux.vnet.ibm.com</email>
</author>
<published>2015-06-18T22:50:02Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=f78f5b90c4ffa559e400c3919a02236101f29f3f'/>
<id>urn:sha1:f78f5b90c4ffa559e400c3919a02236101f29f3f</id>
<content type='text'>
This commit renames rcu_lockdep_assert() to RCU_LOCKDEP_WARN() for
consistency with the WARN() series of macros.  This also requires
inverting the sense of the conditional, which this commit also does.

Reported-by: Ingo Molnar &lt;mingo@kernel.org&gt;
Signed-off-by: Paul E. McKenney &lt;paulmck@linux.vnet.ibm.com&gt;
Reviewed-by: Ingo Molnar &lt;mingo@kernel.org&gt;
</content>
</entry>
<entry>
<title>rcu: Change return type to bool</title>
<updated>2015-07-15T21:43:53Z</updated>
<author>
<name>Nicholas Mc Guire</name>
<email>hofrat@osadl.org</email>
</author>
<published>2015-05-27T06:56:25Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=f765d1130700878c2275bc1ea09eed428f870a2a'/>
<id>urn:sha1:f765d1130700878c2275bc1ea09eed428f870a2a</id>
<content type='text'>
Type-checking coccinelle spatches are being used to locate type mismatches
between function signatures and return values in this case this produced:
./kernel/rcu/srcu.c:271 WARNING: return of wrong type
        int != unsigned long,

srcu_readers_active() returns an int that is the sum of per_cpu unsigned
long but the only user is cleanup_srcu_struct() which is using it as a
boolean (condition) to see if there is any readers rather than actually
using the approximate number of readers. The theoretically possible
unsigned long overflow case does not need to be handled explicitly - if
we had 4G++ readers then something else went wrong a long time ago.

proposal: change the return type to boolean. The function name is left
          unchanged as it fits the naming expectation for a boolean.

patch was compile tested for x86_64_defconfig (implies CONFIG_SRCU=y)

patch is against 4.1-rc5 (localversion-next is -next-20150525)

Signed-off-by: Nicholas Mc Guire &lt;hofrat@osadl.org&gt;
Signed-off-by: Paul E. McKenney &lt;paulmck@linux.vnet.ibm.com&gt;
</content>
</entry>
<entry>
<title>rcu: Convert ACCESS_ONCE() to READ_ONCE() and WRITE_ONCE()</title>
<updated>2015-05-27T19:56:15Z</updated>
<author>
<name>Paul E. McKenney</name>
<email>paulmck@linux.vnet.ibm.com</email>
</author>
<published>2015-03-03T22:57:58Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=7d0ae8086b828311250c6afdf800b568ac9bd693'/>
<id>urn:sha1:7d0ae8086b828311250c6afdf800b568ac9bd693</id>
<content type='text'>
This commit moves from the old ACCESS_ONCE() API to the new READ_ONCE()
and WRITE_ONCE() APIs.

Signed-off-by: Paul E. McKenney &lt;paulmck@linux.vnet.ibm.com&gt;
[ paulmck:  Updated to include kernel/torture.c as suggested by Jason Low. ]
</content>
</entry>
<entry>
<title>Merge branches 'doc.2015.02.26a', 'earlycb.2015.03.03a', 'fixes.2015.03.03a', 'gpexp.2015.02.26a', 'hotplug.2015.03.20a', 'sysidle.2015.02.26b' and 'tiny.2015.02.26a' into HEAD</title>
<updated>2015-03-20T15:31:01Z</updated>
<author>
<name>Paul E. McKenney</name>
<email>paulmck@linux.vnet.ibm.com</email>
</author>
<published>2015-03-20T15:31:01Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=42528795ac1c8d7ba021797ec004904168956d64'/>
<id>urn:sha1:42528795ac1c8d7ba021797ec004904168956d64</id>
<content type='text'>
doc.2015.02.26a:  Documentation changes
earlycb.2015.03.03a:  Permit early-boot RCU callbacks
fixes.2015.03.03a:  Miscellaneous fixes
gpexp.2015.02.26a:  In-kernel expediting of normal grace periods
hotplug.2015.03.20a:  CPU hotplug fixes
sysidle.2015.02.26b:  NO_HZ_FULL_SYSIDLE fixes
tiny.2015.02.26a:  TINY_RCU fixes
</content>
</entry>
<entry>
<title>rcu: Update from rcu_expedited variable to rcu_gp_is_expedited()</title>
<updated>2015-02-26T20:03:01Z</updated>
<author>
<name>Paul E. McKenney</name>
<email>paulmck@linux.vnet.ibm.com</email>
</author>
<published>2015-02-19T00:39:09Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=5afff48bdf7481570c9385a8a674a81ffb8f09ee'/>
<id>urn:sha1:5afff48bdf7481570c9385a8a674a81ffb8f09ee</id>
<content type='text'>
This commit updates open-coded tests of the rcu_expedited variable
to instead use rcu_gp_is_expedited().

Signed-off-by: Paul E. McKenney &lt;paulmck@linux.vnet.ibm.com&gt;
</content>
</entry>
<entry>
<title>rcu: Consolidate rcu_synchronize and wakeme_after_rcu()</title>
<updated>2015-02-26T01:03:03Z</updated>
<author>
<name>Paul E. McKenney</name>
<email>paulmck@linux.vnet.ibm.com</email>
</author>
<published>2015-01-11T03:47:10Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=ee376dbdf27728a2f3d30e2ba10fa387cc4c645b'/>
<id>urn:sha1:ee376dbdf27728a2f3d30e2ba10fa387cc4c645b</id>
<content type='text'>
There are currently duplicate identical definitions of the
rcu_synchronize() structure and the wakeme_after_rcu() function.
Thie commit therefore consolidates them.

Signed-off-by: Paul E. McKenney &lt;paulmck@linux.vnet.ibm.com&gt;
</content>
</entry>
<entry>
<title>rcu: Expand SRCU -&gt;completed to 64 bits</title>
<updated>2015-01-06T19:04:26Z</updated>
<author>
<name>Paul E. McKenney</name>
<email>paulmck@linux.vnet.ibm.com</email>
</author>
<published>2014-11-24T04:30:06Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=a5c198f4f7da6cc48116ca239c59c9f44b753364'/>
<id>urn:sha1:a5c198f4f7da6cc48116ca239c59c9f44b753364</id>
<content type='text'>
When rcutorture used only the low-order 32 bits of the grace-period
number, it was not a problem for SRCU to use a 32-bit completed field.
However, rcutorture now uses the full 64 bits on 64-bit systems, so
this commit converts SRCU's -&gt;completed field to unsigned long so as to
provide 64 bits on 64-bit systems.

Signed-off-by: Paul E. McKenney &lt;paulmck@linux.vnet.ibm.com&gt;
</content>
</entry>
<entry>
<title>rcu: Eliminate read-modify-write ACCESS_ONCE() calls</title>
<updated>2014-07-09T16:14:49Z</updated>
<author>
<name>Paul E. McKenney</name>
<email>paulmck@linux.vnet.ibm.com</email>
</author>
<published>2014-06-02T21:54:34Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=a792563bd47632d85158c72e2acf4484eed0ec32'/>
<id>urn:sha1:a792563bd47632d85158c72e2acf4484eed0ec32</id>
<content type='text'>
RCU contains code of the following forms:

	ACCESS_ONCE(x)++;
	ACCESS_ONCE(x) += y;
	ACCESS_ONCE(x) -= y;

Now these constructs do operate correctly, but they really result in a
pair of volatile accesses, one to do the load and another to do the store.
This can be confusing, as the casual reader might well assume that (for
example) gcc might generate a memory-to-memory add instruction for each
of these three cases.  In fact, gcc will do no such thing.  Also, there
is a good chance that the kernel will move to separate load and store
variants of ACCESS_ONCE(), and constructs like the above could easily
confuse both people and scripts attempting to make that sort of change.
Finally, most of RCU's read-modify-write uses of ACCESS_ONCE() really
only need the store to be volatile, so that the read-modify-write form
might be misleading.

This commit therefore changes the above forms in RCU so that each instance
of ACCESS_ONCE() either does a load or a store, but not both.  In a few
cases, ACCESS_ONCE() was not critical, for example, for maintaining
statisitics.  In these cases, ACCESS_ONCE() has been dispensed with
entirely.

Suggested-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Signed-off-by: Paul E. McKenney &lt;paulmck@linux.vnet.ibm.com&gt;
</content>
</entry>
<entry>
<title>rcu: Ensure kernel/rcu/rcu.h can be sourced/used stand-alone</title>
<updated>2014-02-26T14:35:18Z</updated>
<author>
<name>Paul Gortmaker</name>
<email>paul.gortmaker@windriver.com</email>
</author>
<published>2014-02-19T19:33:27Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=5cb5c6e18f822b19bd41a2c0f9930c82b3ec0bc9'/>
<id>urn:sha1:5cb5c6e18f822b19bd41a2c0f9930c82b3ec0bc9</id>
<content type='text'>
The kbuild test bot uncovered an implicit dependence on the
trace header being present before rcu.h in ia64 allmodconfig
that looks like this:

In file included from kernel/ksysfs.c:22:0:
kernel/rcu/rcu.h: In function '__rcu_reclaim':
kernel/rcu/rcu.h:107:3: error: implicit declaration of function 'trace_rcu_invoke_kfree_callback' [-Werror=implicit-function-declaration]
kernel/rcu/rcu.h:112:3: error: implicit declaration of function 'trace_rcu_invoke_callback' [-Werror=implicit-function-declaration]
cc1: some warnings being treated as errors

Looking at other rcu.h users, we can find that they all
were sourcing the trace header in advance of rcu.h itself,
as seen in the context of this diff.  There were also some
inconsistencies as to whether it was or wasn't sourced based
on the parent tracing Kconfig.

Rather than "fix" it at each use site, and have inconsistent
use based on whether "#ifdef CONFIG_RCU_TRACE" was used or not,
lets just source the trace header just once, in the actual consumer
of it, which is rcu.h itself.  We include it unconditionally, as
build testing shows us that is a hard requirement for some files.

Reported-by: kbuild test robot &lt;fengguang.wu@intel.com&gt;
Signed-off-by: Paul Gortmaker &lt;paul.gortmaker@windriver.com&gt;
Signed-off-by: Paul E. McKenney &lt;paulmck@linux.vnet.ibm.com&gt;
</content>
</entry>
<entry>
<title>rcu: Move SRCU grace period work to power efficient workqueue</title>
<updated>2014-02-17T23:02:14Z</updated>
<author>
<name>Shaibal Dutta</name>
<email>shaibal.dutta@broadcom.com</email>
</author>
<published>2014-01-31T19:53:06Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=ae1670339c95c3ff96ab10582506cf827c5fecc8'/>
<id>urn:sha1:ae1670339c95c3ff96ab10582506cf827c5fecc8</id>
<content type='text'>
For better use of CPU idle time, allow the scheduler to select the CPU
on which the SRCU grace period work would be scheduled. This improves
idle residency time and conserves power.

This functionality is enabled when CONFIG_WQ_POWER_EFFICIENT is selected.

Cc: Lai Jiangshan &lt;laijs@cn.fujitsu.com&gt;
Cc: "Paul E. McKenney" &lt;paulmck@linux.vnet.ibm.com&gt;
Cc: Dipankar Sarma &lt;dipankar@in.ibm.com&gt;
Signed-off-by: Shaibal Dutta &lt;shaibal.dutta@broadcom.com&gt;
[zoran.markovic@linaro.org: Rebased to latest kernel version. Added commit
message. Fixed code alignment.]
Signed-off-by: Zoran Markovic &lt;zoran.markovic@linaro.org&gt;
Signed-off-by: Paul E. McKenney &lt;paulmck@linux.vnet.ibm.com&gt;
Reviewed-by: Josh Triplett &lt;josh@joshtriplett.org&gt;
</content>
</entry>
</feed>
