Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit dc36be44 authored by Paul E. McKenney's avatar Paul E. McKenney
Browse files

Merge branches 'barrier.2012.05.09a', 'fixes.2012.04.26a',...

Merge branches 'barrier.2012.05.09a', 'fixes.2012.04.26a', 'inline.2012.05.02b' and 'srcu.2012.05.07b' into HEAD

barrier:  Reduce the amount of disturbance by rcu_barrier() to the rest of
    	the system.  This branch also includes improvements to
    	RCU_FAST_NO_HZ, which are included here due to conflicts.
fixes:  Miscellaneous fixes.
inline:  Remaining changes from an abortive attempt to inline
    	preemptible RCU's __rcu_read_lock().  These are (1) making
    	exit_rcu() avoid unnecessary work and (2) avoiding having
    	preemptible RCU record a blocked thread when the scheduler
    	declines to do a context switch.
srcu:	Lai Jiangshan's algorithmic implementation of SRCU, including
    	call_srcu().
Loading
Loading
Loading
Loading
+14 −1
Original line number Original line Diff line number Diff line
@@ -47,6 +47,16 @@ irqreader Says to invoke RCU readers from irq level. This is currently
		permit this.  (Or, more accurately, variants of RCU that do
		permit this.  (Or, more accurately, variants of RCU that do
		-not- permit this know to ignore this variable.)
		-not- permit this know to ignore this variable.)


n_barrier_cbs	If this is nonzero, RCU barrier testing will be conducted,
		in which case n_barrier_cbs specifies the number of
		RCU callbacks (and corresponding kthreads) to use for
		this testing.  The value cannot be negative.  If you
		specify this to be non-zero when torture_type indicates a
		synchronous RCU implementation (one for which a member of
		the synchronize_rcu() rather than the call_rcu() family is
		used -- see the documentation for torture_type below), an
		error will be reported and no testing will be carried out.

nfakewriters	This is the number of RCU fake writer threads to run.  Fake
nfakewriters	This is the number of RCU fake writer threads to run.  Fake
		writer threads repeatedly use the synchronous "wait for
		writer threads repeatedly use the synchronous "wait for
		current readers" function of the interface selected by
		current readers" function of the interface selected by
@@ -188,7 +198,7 @@ OUTPUT
The statistics output is as follows:
The statistics output is as follows:


	rcu-torture:--- Start of test: nreaders=16 nfakewriters=4 stat_interval=30 verbose=0 test_no_idle_hz=1 shuffle_interval=3 stutter=5 irqreader=1 fqs_duration=0 fqs_holdoff=0 fqs_stutter=3 test_boost=1/0 test_boost_interval=7 test_boost_duration=4
	rcu-torture:--- Start of test: nreaders=16 nfakewriters=4 stat_interval=30 verbose=0 test_no_idle_hz=1 shuffle_interval=3 stutter=5 irqreader=1 fqs_duration=0 fqs_holdoff=0 fqs_stutter=3 test_boost=1/0 test_boost_interval=7 test_boost_duration=4
	rcu-torture: rtc:           (null) ver: 155441 tfle: 0 rta: 155441 rtaf: 8884 rtf: 155440 rtmbe: 0 rtbke: 0 rtbre: 0 rtbf: 0 rtb: 0 nt: 3055767
	rcu-torture: rtc:           (null) ver: 155441 tfle: 0 rta: 155441 rtaf: 8884 rtf: 155440 rtmbe: 0 rtbe: 0 rtbke: 0 rtbre: 0 rtbf: 0 rtb: 0 nt: 3055767
	rcu-torture: Reader Pipe:  727860534 34213 0 0 0 0 0 0 0 0 0
	rcu-torture: Reader Pipe:  727860534 34213 0 0 0 0 0 0 0 0 0
	rcu-torture: Reader Batch:  727877838 17003 0 0 0 0 0 0 0 0 0
	rcu-torture: Reader Batch:  727877838 17003 0 0 0 0 0 0 0 0 0
	rcu-torture: Free-Block Circulation:  155440 155440 155440 155440 155440 155440 155440 155440 155440 155440 0
	rcu-torture: Free-Block Circulation:  155440 155440 155440 155440 155440 155440 155440 155440 155440 155440 0
@@ -230,6 +240,9 @@ o "rtmbe": A non-zero value indicates that rcutorture believes that
	rcu_assign_pointer() and rcu_dereference() are not working
	rcu_assign_pointer() and rcu_dereference() are not working
	correctly.  This value should be zero.
	correctly.  This value should be zero.


o	"rtbe": A non-zero value indicates that one of the rcu_barrier()
	family of functions is not working correctly.

o	"rtbke": rcutorture was unable to create the real-time kthreads
o	"rtbke": rcutorture was unable to create the real-time kthreads
	used to force RCU priority inversion.  This value should be zero.
	used to force RCU priority inversion.  This value should be zero.


+85 −3
Original line number Original line Diff line number Diff line
@@ -2330,18 +2330,100 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
	ramdisk_size=	[RAM] Sizes of RAM disks in kilobytes
	ramdisk_size=	[RAM] Sizes of RAM disks in kilobytes
			See Documentation/blockdev/ramdisk.txt.
			See Documentation/blockdev/ramdisk.txt.


	rcupdate.blimit=	[KNL,BOOT]
	rcutree.blimit=	[KNL,BOOT]
			Set maximum number of finished RCU callbacks to process
			Set maximum number of finished RCU callbacks to process
			in one batch.
			in one batch.


	rcupdate.qhimark=	[KNL,BOOT]
	rcutree.qhimark=	[KNL,BOOT]
			Set threshold of queued
			Set threshold of queued
			RCU callbacks over which batch limiting is disabled.
			RCU callbacks over which batch limiting is disabled.


	rcupdate.qlowmark=	[KNL,BOOT]
	rcutree.qlowmark=	[KNL,BOOT]
			Set threshold of queued RCU callbacks below which
			Set threshold of queued RCU callbacks below which
			batch limiting is re-enabled.
			batch limiting is re-enabled.


	rcutree.rcu_cpu_stall_suppress=	[KNL,BOOT]
			Suppress RCU CPU stall warning messages.

	rcutree.rcu_cpu_stall_timeout= [KNL,BOOT]
			Set timeout for RCU CPU stall warning messages.

	rcutorture.fqs_duration= [KNL,BOOT]
			Set duration of force_quiescent_state bursts.

	rcutorture.fqs_holdoff= [KNL,BOOT]
			Set holdoff time within force_quiescent_state bursts.

	rcutorture.fqs_stutter= [KNL,BOOT]
			Set wait time between force_quiescent_state bursts.

	rcutorture.irqreader= [KNL,BOOT]
			Test RCU readers from irq handlers.

	rcutorture.n_barrier_cbs= [KNL,BOOT]
			Set callbacks/threads for rcu_barrier() testing.

	rcutorture.nfakewriters= [KNL,BOOT]
			Set number of concurrent RCU writers.  These just
			stress RCU, they don't participate in the actual
			test, hence the "fake".

	rcutorture.nreaders= [KNL,BOOT]
			Set number of RCU readers.

	rcutorture.onoff_holdoff= [KNL,BOOT]
			Set time (s) after boot for CPU-hotplug testing.

	rcutorture.onoff_interval= [KNL,BOOT]
			Set time (s) between CPU-hotplug operations, or
			zero to disable CPU-hotplug testing.

	rcutorture.shuffle_interval= [KNL,BOOT]
			Set task-shuffle interval (s).  Shuffling tasks
			allows some CPUs to go into dyntick-idle mode
			during the rcutorture test.

	rcutorture.shutdown_secs= [KNL,BOOT]
			Set time (s) after boot system shutdown.  This
			is useful for hands-off automated testing.

	rcutorture.stall_cpu= [KNL,BOOT]
			Duration of CPU stall (s) to test RCU CPU stall
			warnings, zero to disable.

	rcutorture.stall_cpu_holdoff= [KNL,BOOT]
			Time to wait (s) after boot before inducing stall.

	rcutorture.stat_interval= [KNL,BOOT]
			Time (s) between statistics printk()s.

	rcutorture.stutter= [KNL,BOOT]
			Time (s) to stutter testing, for example, specifying
			five seconds causes the test to run for five seconds,
			wait for five seconds, and so on.  This tests RCU's
			ability to transition abruptly to and from idle.

	rcutorture.test_boost= [KNL,BOOT]
			Test RCU priority boosting?  0=no, 1=maybe, 2=yes.
			"Maybe" means test if the RCU implementation
			under test support RCU priority boosting.

	rcutorture.test_boost_duration= [KNL,BOOT]
			Duration (s) of each individual boost test.

	rcutorture.test_boost_interval= [KNL,BOOT]
			Interval (s) between each boost test.

	rcutorture.test_no_idle_hz= [KNL,BOOT]
			Test RCU's dyntick-idle handling.  See also the
			rcutorture.shuffle_interval parameter.

	rcutorture.torture_type= [KNL,BOOT]
			Specify the RCU implementation to test.

	rcutorture.verbose= [KNL,BOOT]
			Enable additional printk() statements.

	rdinit=		[KNL]
	rdinit=		[KNL]
			Format: <full_path>
			Format: <full_path>
			Run specified binary instead of /init from the ramdisk,
			Run specified binary instead of /init from the ramdisk,
+11 −3
Original line number Original line Diff line number Diff line
@@ -5607,14 +5607,13 @@ F: net/rds/
READ-COPY UPDATE (RCU)
READ-COPY UPDATE (RCU)
M:	Dipankar Sarma <dipankar@in.ibm.com>
M:	Dipankar Sarma <dipankar@in.ibm.com>
M:	"Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
M:	"Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
W:	http://www.rdrop.com/users/paulmck/rclock/
W:	http://www.rdrop.com/users/paulmck/RCU/
S:	Supported
S:	Supported
T:	git git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu.git
T:	git git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu.git
F:	Documentation/RCU/
F:	Documentation/RCU/
X:	Documentation/RCU/torture.txt
F:	include/linux/rcu*
F:	include/linux/rcu*
F:	include/linux/srcu*
F:	kernel/rcu*
F:	kernel/rcu*
F:	kernel/srcu*
X:	kernel/rcutorture.c
X:	kernel/rcutorture.c


REAL TIME CLOCK (RTC) SUBSYSTEM
REAL TIME CLOCK (RTC) SUBSYSTEM
@@ -6131,6 +6130,15 @@ S: Maintained
F:	include/linux/sl?b*.h
F:	include/linux/sl?b*.h
F:	mm/sl?b.c
F:	mm/sl?b.c


SLEEPABLE READ-COPY UPDATE (SRCU)
M:	Lai Jiangshan <laijs@cn.fujitsu.com>
M:	"Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
W:	http://www.rdrop.com/users/paulmck/RCU/
S:	Supported
T:	git git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu.git
F:	include/linux/srcu*
F:	kernel/srcu*

SMC91x ETHERNET DRIVER
SMC91x ETHERNET DRIVER
M:	Nicolas Pitre <nico@fluxnic.net>
M:	Nicolas Pitre <nico@fluxnic.net>
S:	Odd Fixes
S:	Odd Fixes
+1 −0
Original line number Original line Diff line number Diff line
@@ -705,6 +705,7 @@ static void stack_proc(void *arg)
	struct task_struct *from = current, *to = arg;
	struct task_struct *from = current, *to = arg;


	to->thread.saved_task = from;
	to->thread.saved_task = from;
	rcu_switch_from(from);
	switch_to(from, to, from);
	switch_to(from, to, from);
}
}


+35 −5
Original line number Original line Diff line number Diff line
@@ -30,6 +30,7 @@
 * This is only for internal list manipulation where we know
 * This is only for internal list manipulation where we know
 * the prev/next entries already!
 * the prev/next entries already!
 */
 */
#ifndef CONFIG_DEBUG_LIST
static inline void __list_add_rcu(struct list_head *new,
static inline void __list_add_rcu(struct list_head *new,
		struct list_head *prev, struct list_head *next)
		struct list_head *prev, struct list_head *next)
{
{
@@ -38,6 +39,10 @@ static inline void __list_add_rcu(struct list_head *new,
	rcu_assign_pointer(list_next_rcu(prev), new);
	rcu_assign_pointer(list_next_rcu(prev), new);
	next->prev = new;
	next->prev = new;
}
}
#else
extern void __list_add_rcu(struct list_head *new,
		struct list_head *prev, struct list_head *next);
#endif


/**
/**
 * list_add_rcu - add a new entry to rcu-protected list
 * list_add_rcu - add a new entry to rcu-protected list
@@ -108,7 +113,7 @@ static inline void list_add_tail_rcu(struct list_head *new,
 */
 */
static inline void list_del_rcu(struct list_head *entry)
static inline void list_del_rcu(struct list_head *entry)
{
{
	__list_del(entry->prev, entry->next);
	__list_del_entry(entry);
	entry->prev = LIST_POISON2;
	entry->prev = LIST_POISON2;
}
}


@@ -228,18 +233,43 @@ static inline void list_splice_init_rcu(struct list_head *list,
	})
	})


/**
/**
 * list_first_entry_rcu - get the first element from a list
 * Where are list_empty_rcu() and list_first_entry_rcu()?
 *
 * Implementing those functions following their counterparts list_empty() and
 * list_first_entry() is not advisable because they lead to subtle race
 * conditions as the following snippet shows:
 *
 * if (!list_empty_rcu(mylist)) {
 *	struct foo *bar = list_first_entry_rcu(mylist, struct foo, list_member);
 *	do_something(bar);
 * }
 *
 * The list may not be empty when list_empty_rcu checks it, but it may be when
 * list_first_entry_rcu rereads the ->next pointer.
 *
 * Rereading the ->next pointer is not a problem for list_empty() and
 * list_first_entry() because they would be protected by a lock that blocks
 * writers.
 *
 * See list_first_or_null_rcu for an alternative.
 */

/**
 * list_first_or_null_rcu - get the first element from a list
 * @ptr:        the list head to take the element from.
 * @ptr:        the list head to take the element from.
 * @type:       the type of the struct this is embedded in.
 * @type:       the type of the struct this is embedded in.
 * @member:     the name of the list_struct within the struct.
 * @member:     the name of the list_struct within the struct.
 *
 *
 * Note, that list is expected to be not empty.
 * Note that if the list is empty, it returns NULL.
 *
 *
 * This primitive may safely run concurrently with the _rcu list-mutation
 * This primitive may safely run concurrently with the _rcu list-mutation
 * primitives such as list_add_rcu() as long as it's guarded by rcu_read_lock().
 * primitives such as list_add_rcu() as long as it's guarded by rcu_read_lock().
 */
 */
#define list_first_entry_rcu(ptr, type, member) \
#define list_first_or_null_rcu(ptr, type, member) \
	list_entry_rcu((ptr)->next, type, member)
	({struct list_head *__ptr = (ptr); \
	  struct list_head __rcu *__next = list_next_rcu(__ptr); \
	  likely(__ptr != __next) ? container_of(__next, type, member) : NULL; \
	})


/**
/**
 * list_for_each_entry_rcu	-	iterate over rcu list of given type
 * list_for_each_entry_rcu	-	iterate over rcu list of given type
Loading