13 Jan, 2010

1 commit

  • Add force_quiescent_state() testing to rcutorture, with a
    separate thread that repeatedly invokes force_quiescent_state()
    in bursts. This can greatly increase the probability of
    encountering certain types of race conditions.

    Suggested-by: Josh Triplett
    Signed-off-by: Paul E. McKenney
    Cc: laijs@cn.fujitsu.com
    Cc: dipankar@in.ibm.com
    Cc: mathieu.desnoyers@polymtl.ca
    Cc: josh@joshtriplett.org
    Cc: dvhltc@us.ibm.com
    Cc: niv@us.ibm.com
    Cc: peterz@infradead.org
    Cc: rostedt@goodmis.org
    Cc: Valdis.Kletnieks@vt.edu
    Cc: dhowells@redhat.com
    LKML-Reference:
    Signed-off-by: Ingo Molnar

    Paul E. McKenney
     

15 Dec, 2009

1 commit

  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/percpu: (34 commits)
    m68k: rename global variable vmalloc_end to m68k_vmalloc_end
    percpu: add missing per_cpu_ptr_to_phys() definition for UP
    percpu: Fix kdump failure if booted with percpu_alloc=page
    percpu: make misc percpu symbols unique
    percpu: make percpu symbols in ia64 unique
    percpu: make percpu symbols in powerpc unique
    percpu: make percpu symbols in x86 unique
    percpu: make percpu symbols in xen unique
    percpu: make percpu symbols in cpufreq unique
    percpu: make percpu symbols in oprofile unique
    percpu: make percpu symbols in tracer unique
    percpu: make percpu symbols under kernel/ and mm/ unique
    percpu: remove some sparse warnings
    percpu: make alloc_percpu() handle array types
    vmalloc: fix use of non-existent percpu variable in put_cpu_var()
    this_cpu: Use this_cpu_xx in trace_functions_graph.c
    this_cpu: Use this_cpu_xx for ftrace
    this_cpu: Use this_cpu_xx in nmi handling
    this_cpu: Use this_cpu operations in RCU
    this_cpu: Use this_cpu ops for VM statistics
    ...

    Fix up trivial (famous last words) global per-cpu naming conflicts in
    arch/x86/kvm/svm.c
    mm/slab.c

    Linus Torvalds
     

03 Dec, 2009

1 commit

  • Implement an synchronize_rcu_expedited() for preemptible RCU
    that actually is expedited. This uses
    synchronize_sched_expedited() to force all threads currently
    running in a preemptible-RCU read-side critical section onto the
    appropriate ->blocked_tasks[] list, then takes a snapshot of all
    of these lists and waits for them to drain.

    Signed-off-by: Paul E. McKenney
    Cc: laijs@cn.fujitsu.com
    Cc: dipankar@in.ibm.com
    Cc: mathieu.desnoyers@polymtl.ca
    Cc: josh@joshtriplett.org
    Cc: dvhltc@us.ibm.com
    Cc: niv@us.ibm.com
    Cc: peterz@infradead.org
    Cc: rostedt@goodmis.org
    Cc: Valdis.Kletnieks@vt.edu
    Cc: dhowells@redhat.com
    LKML-Reference:
    Signed-off-by: Ingo Molnar

    Paul E. McKenney
     

26 Oct, 2009

2 commits

  • Make rcutorture list the available torture_type values when it
    doesn't like the one specified.

    Signed-off-by: Paul E. McKenney
    Acked-by: Josh Triplett
    Reviewed-by: Lai Jiangshan
    Cc: dipankar@in.ibm.com
    Cc: mathieu.desnoyers@polymtl.ca
    Cc: dvhltc@us.ibm.com
    Cc: niv@us.ibm.com
    Cc: peterz@infradead.org
    Cc: rostedt@goodmis.org
    Cc: Valdis.Kletnieks@vt.edu
    Cc: dhowells@redhat.com
    Cc: avi@redhat.com
    Cc: mtosatti@redhat.com
    LKML-Reference:
    Signed-off-by: Ingo Molnar

    Paul E. McKenney
     
  • Adds the "srcu_expedited" torture type, and also renames
    sched_ops_sync to sched_sync_ops for consistency while we are in
    this file.

    Signed-off-by: Paul E. McKenney
    Acked-by: Josh Triplett
    Reviewed-by: Lai Jiangshan
    Cc: dipankar@in.ibm.com
    Cc: mathieu.desnoyers@polymtl.ca
    Cc: dvhltc@us.ibm.com
    Cc: niv@us.ibm.com
    Cc: peterz@infradead.org
    Cc: rostedt@goodmis.org
    Cc: Valdis.Kletnieks@vt.edu
    Cc: dhowells@redhat.com
    Cc: avi@redhat.com
    Cc: mtosatti@redhat.com
    LKML-Reference:
    Signed-off-by: Ingo Molnar

    Paul E. McKenney
     

03 Oct, 2009

1 commit

  • RCU does not do dynamic allocations but it increments per cpu variables
    a lot. These instructions results in a move to a register and then back
    to memory. This patch will make it use the inc/dec instructions on x86
    that do not need a register.

    Acked-by: Tejun Heo
    Acked-by: Paul E. McKenney
    Signed-off-by: Christoph Lameter
    Signed-off-by: Tejun Heo

    Christoph Lameter
     

24 Sep, 2009

1 commit

  • Move declarations and update storage classes to make checkpatch happy.

    Signed-off-by: Paul E. McKenney
    Cc: laijs@cn.fujitsu.com
    Cc: dipankar@in.ibm.com
    Cc: akpm@linux-foundation.org
    Cc: mathieu.desnoyers@polymtl.ca
    Cc: josh@joshtriplett.org
    Cc: dvhltc@us.ibm.com
    Cc: niv@us.ibm.com
    Cc: peterz@infradead.org
    Cc: rostedt@goodmis.org
    Cc: Valdis.Kletnieks@vt.edu
    Cc: dhowells@redhat.com
    LKML-Reference:
    Signed-off-by: Ingo Molnar

    Paul E. McKenney
     

19 Sep, 2009

1 commit

  • Fix a number of whitespace ^Ierrors in the include/linux/rcu*
    and the kernel/rcu* files.

    Signed-off-by: Paul E. McKenney
    Cc: laijs@cn.fujitsu.com
    Cc: dipankar@in.ibm.com
    Cc: akpm@linux-foundation.org
    Cc: mathieu.desnoyers@polymtl.ca
    Cc: josh@joshtriplett.org
    Cc: dvhltc@us.ibm.com
    Cc: niv@us.ibm.com
    Cc: peterz@infradead.org
    Cc: rostedt@goodmis.org
    Cc: Valdis.Kletnieks@vt.edu
    LKML-Reference:
    [ did more checkpatch fixlets ]
    Signed-off-by: Ingo Molnar

    Paul E. McKenney
     

18 Sep, 2009

1 commit

  • rcutorture already delays readers, but never for long enough to
    make RCU force a quiescent state. Add an occasional delay of
    50ms.

    Signed-off-by: Josh Triplett
    Signed-off-by: Paul E. McKenney
    Acked-by: Steven Rostedt
    Cc: laijs@cn.fujitsu.com
    Cc: dipankar@in.ibm.com
    Cc: akpm@linux-foundation.org
    Cc: mathieu.desnoyers@polymtl.ca
    Cc: josht@linux.vnet.ibm.com
    Cc: dvhltc@us.ibm.com
    Cc: niv@us.ibm.com
    Cc: peterz@infradead.org
    LKML-Reference:
    Signed-off-by: Ingo Molnar

    Josh Triplett
     

03 Jul, 2009

1 commit

  • This patch adds rcutorture tests for the new
    synchronize_sched_expedited() primitive, and also does some
    whitespace cleanups in kernel/rcutorture.c as well.

    Signed-off-by: Paul E. McKenney
    Cc: akpm@linux-foundation.org
    Cc: torvalds@linux-foundation.org
    Cc: davem@davemloft.net
    Cc: dada1@cosmosbay.com
    Cc: zbr@ioremap.net
    Cc: jeff.chua.linux@gmail.com
    Cc: paulus@samba.org
    Cc: laijs@cn.fujitsu.com
    Cc: jengelh@medozas.de
    Cc: r000n@r000n.net
    Cc: benh@kernel.crashing.org
    Cc: mathieu.desnoyers@polymtl.ca
    LKML-Reference:
    Signed-off-by: Ingo Molnar

    Paul E. McKenney
     

30 Mar, 2009

1 commit


08 Jan, 2009

1 commit

  • This patch fixes an rcutorture bug found by Eric Sesterhenn that
    resulted in oopses in response to "rmmod rcutorture". The problem
    was in some new code that attempted to handle the case where a system
    is shut down while rcutorture is still running, for example, when
    rcutorture is built into the kernel so that it cannot be removed.
    The fix causes the rcutorture threads to "park" in an
    schedule_timeout_uninterruptible(MAX_SCHEDULE_TIMEOUT) rather than
    trying to get them to terminate cleanly. Concurrent shutdown and
    rmmod is illegal.

    I believe that this is 2.6.29 material, as it is used in some testing
    setups.

    For reference, here are the rcutorture operating modes:

    CONFIG_RCU_TORTURE_TEST=m

    This is the normal rcutorture build. Use "modprobe rcutorture"
    (with optional arguments) to start, and "rmmod rcutorture" to
    stop. If you shut the system down without doing the rmmod, you
    should see console output like:

    rcutorture thread rcu_torture_writer parking due to system shutdown

    One for each rcutorture kthread.

    CONFIG_RCU_TORTURE_TEST=y
    CONFIG_RCU_TORTURE_TEST_RUNNABLE=n

    Use this if you want rcutorture built in, but don't want the
    test to start running during early boot. To start the
    torturing:

    echo 1 > /proc/sys/kernel/rcutorture_runnable

    To stop the torturing, s/1/0/

    You will get "parking" console messages as noted above when
    you shut the system down.

    CONFIG_RCU_TORTURE_TEST=y
    CONFIG_RCU_TORTURE_TEST_RUNNABLE=y

    Same as above, except that the torturing starts during early
    boot. Only for the stout of heart and strong of stomach.
    The same /proc entry noted above may be used to control the
    test.

    Located-by: Eric Sesterhenn
    Tested-by: Eric Sesterhenn
    Signed-off-by: Paul E. McKenney
    Signed-off-by: Ingo Molnar

    Paul E. McKenney
     

05 Jan, 2009

1 commit

  • Fix an rcutorture bug that prevents the shutdown notifier from ever
    actually having any effect, due to the fact that kthreads ignore all
    signals.

    Signed-off-by: Paul E. McKenney
    Signed-off-by: Ingo Molnar

    Paul E. McKenney
     

01 Jan, 2009

1 commit

  • Impact: use new cpumask API.

    rcu_ctrlblk contains a cpumask, and it's highly optimized so I don't want
    a cpumask_var_t (ie. a pointer) for the CONFIG_CPUMASK_OFFSTACK case. It
    could use a dangling bitmap, and be allocated in __rcu_init to save memory,
    but for the moment we use a bitmap.

    (Eventually 'struct cpumask' will be undefined for CONFIG_CPUMASK_OFFSTACK,
    so we use a bitmap here to show we really mean it).

    We remove on-stack cpumasks, using cpumask_var_t for
    rcu_torture_shuffle_tasks() and for_each_cpu_and in force_quiescent_state().

    Signed-off-by: Rusty Russell

    Rusty Russell
     

17 Dec, 2008

1 commit

  • Impact: fix very rare reboot hang

    Because rcutorture ignored all signals, it does not terminate in
    response to the signals sent at shutdown time. This can cause strange
    failures due to its continuing to make use of kernel function too late
    in the shutdown sequence. This patch therefore adds a shutdown notifier
    to rcutorture, causing it to shut down in response to a reboot or an
    orderly shutdown.

    Signed-off-by: Paul E. McKenney
    Signed-off-by: Ingo Molnar

    Paul E. McKenney
     

21 Oct, 2008

1 commit

  • A consolidated implementation will provide this generically through
    asm/byteorder, remove direct includes to avoid breakage when the
    changeover to the new implementation occurs.

    This hunk was lost from commit 1d8cca44b6a244b7e378546d719041819049a0f9
    ("byteorder: provide swabb.h generically in asm/byteorder.h")

    Signed-off-by: Harvey Harrison
    Signed-off-by: Linus Torvalds

    Harvey Harrison
     

26 Jun, 2008

1 commit

  • This patch allows torturing RCU from irq handlers (timers, in this case).
    A new module parameter irqreader enables such additional torturing,
    and is enabled by default. Variants of RCU that do not tolerate readers
    being called from irq handlers (e.g., SRCU) ignore irqreader.

    Signed-off-by: Paul E. McKenney
    Cc: josh@freedesktop.org
    Cc: dvhltc@us.ibm.com
    Cc: niv@us.ibm.com
    Cc: dino@in.ibm.com
    Cc: akpm@linux-foundation.org
    Cc: torvalds@linux-foundation.org
    Cc: vegard.nossum@gmail.com
    Cc: adobriyan@gmail.com
    Cc: oleg@tv-sign.ru
    Cc: bunk@kernel.org
    Cc: rjw@sisk.pl
    Signed-off-by: Ingo Molnar

    Paul E. McKenney
     

24 Jun, 2008

2 commits

  • This patch aligns the rcutorture wakeup times to align with all other
    multiple-of-a-second wakeups to further decrease power consumption.

    Suggested-by: Arjan van de Ven
    Signed-off-by: Paul E. McKenney
    Cc: josh@freedesktop.org
    Cc: dvhltc@us.ibm.com
    Cc: niv@us.ibm.com
    Cc: dino@in.ibm.com
    Cc: akpm@linux-foundation.org
    Cc: torvalds@linux-foundation.org
    Cc: vegard.nossum@gmail.com
    Cc: adobriyan@gmail.com
    Cc: oleg@tv-sign.ru
    Cc: bunk@kernel.org
    Cc: rjw@sisk.pl
    Signed-off-by: Ingo Molnar

    Paul E. McKenney
     
  • Signed-off-by: Paul E. McKenney
    Cc: josh@freedesktop.org
    Cc: dvhltc@us.ibm.com
    Cc: niv@us.ibm.com
    Cc: dino@in.ibm.com
    Cc: akpm@linux-foundation.org
    Cc: torvalds@linux-foundation.org
    Cc: vegard.nossum@gmail.com
    Cc: adobriyan@gmail.com
    Cc: oleg@tv-sign.ru
    Cc: bunk@kernel.org
    Cc: rjw@sisk.pl
    Signed-off-by: Ingo Molnar

    Paul E. McKenney
     

19 Jun, 2008

1 commit

  • This patch re-institutes the ability to build rcutorture directly into
    the Linux kernel. The reason that this capability was removed was that
    this could result in your kernel being pretty much useless, as rcutorture
    would be running starting from early boot. This problem has been avoided
    by (1) making rcutorture run only three seconds of every six by default,
    (2) adding a CONFIG_RCU_TORTURE_TEST_RUNNABLE that permits rcutorture
    to be quiesced at boot time, and (3) adding a sysctl in /proc named
    /proc/sys/kernel/rcutorture_runnable that permits rcutorture to be
    quiesced and unquiesced when built into the kernel.

    Please note that this /proc file is -not- available when rcutorture
    is built as a module. Please also note that to get the earlier
    take-no-prisoners behavior, you must use the boot command line to set
    rcutorture's "stutter" parameter to zero.

    The rcutorture quiescing mechanism is currently quite crude: loops
    in each rcutorture process that poll a global variable once per tick.
    Suggestions for improvement are welcome. The default action will
    be to reduce the polling rate to a few times per second.

    Signed-off-by: Paul E. McKenney
    Suggested-by: Ingo Molnar
    Signed-off-by: Ingo Molnar

    Paul E. McKenney
     

18 Jun, 2008

2 commits

  • This patch takes a step towards making rcutorture more brutal by allowing
    the test to be automatically periodically paused, with the default being
    to run the test for five seconds then pause for five seconds and repeat.
    This behavior can be controlled using a new "stutter" module parameter, so
    that "stutter=0" gives the old default behavior of running continuously.

    Starting and stopping rcutorture more heavily stresses RCU's interaction
    with the scheduler, as well as exercising more paths through the
    grace-period detection code.

    Note that the default to "shuffle_interval" has also been adjusted from
    5 seconds to 3 seconds to provide varying overlap with the "stutter"
    interval.

    I am still unable to provoke the failures that Alexey has been seeing,
    even with this patch, but will be doing a few additional things to beef
    up rcutorture.

    Suggested-by: Ingo Molnar
    Signed-off-by: Paul E. McKenney
    Signed-off-by: Ingo Molnar

    Paul E. McKenney
     
  • this makes it easier for automated tests to pick up such failures.

    Ingo Molnar
     

19 May, 2008

1 commit


29 Apr, 2008

1 commit


20 Apr, 2008

1 commit

  • * Use new set_cpus_allowed_ptr() function added by previous patch,
    which instead of passing the "newly allowed cpus" cpumask_t arg
    by value, pass it by pointer:

    -int set_cpus_allowed(struct task_struct *p, cpumask_t new_mask)
    +int set_cpus_allowed_ptr(struct task_struct *p, const cpumask_t *new_mask)

    * Modify CPU_MASK_ALL

    Depends on:
    [sched-devel]: sched: add new set_cpus_allowed_ptr function

    Signed-off-by: Mike Travis
    Signed-off-by: Ingo Molnar

    Mike Travis
     

26 Jan, 2008

1 commit

  • Replace all lock_cpu_hotplug/unlock_cpu_hotplug from the kernel and use
    get_online_cpus and put_online_cpus instead as it highlights the
    refcount semantics in these operations.

    The new API guarantees protection against the cpu-hotplug operation, but
    it doesn't guarantee serialized access to any of the local data
    structures. Hence the changes needs to be reviewed.

    In case of pseries_add_processor/pseries_remove_processor, use
    cpu_maps_update_begin()/cpu_maps_update_done() as we're modifying the
    cpu_present_map there.

    Signed-off-by: Gautham R Shenoy
    Signed-off-by: Ingo Molnar

    Gautham R Shenoy
     

17 Oct, 2007

2 commits

  • Repost of http://lkml.org/lkml/2007/8/10/472 made available by request.

    The locking used by get_random_bytes() can conflict with the
    preempt_disable() and synchronize_sched() form of RCU. This patch changes
    rcutorture's RNG to gather entropy from the new cpu_clock() interface
    (relying on interrupts, preemption, daemons, and rcutorture's reader
    thread's rock-bottom scheduling priority to provide useful entropy), and
    also adds and EXPORT_SYMBOL_GPL() to make that interface available to GPLed
    kernel modules such as rcutorture.

    Passes several hours of rcutorture.

    [ego@in.ibm.com: Use raw_smp_processor_id() in rcu_random()]
    Signed-off-by: Paul E. McKenney
    Cc: Ingo Molnar
    Signed-off-by: Gautham R Shenoy
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Paul E. McKenney
     
  • This patch cleans up duplicate includes in
    kernel/

    Signed-off-by: Jesper Juhl
    Acked-by: Paul E. McKenney
    Reviewed-by: Satyam Sharma
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jesper Juhl
     

18 Jul, 2007

1 commit

  • Currently, the freezer treats all tasks as freezable, except for the kernel
    threads that explicitly set the PF_NOFREEZE flag for themselves. This
    approach is problematic, since it requires every kernel thread to either
    set PF_NOFREEZE explicitly, or call try_to_freeze(), even if it doesn't
    care for the freezing of tasks at all.

    It seems better to only require the kernel threads that want to or need to
    be frozen to use some freezer-related code and to remove any
    freezer-related code from the other (nonfreezable) kernel threads, which is
    done in this patch.

    The patch causes all kernel threads to be nonfreezable by default (ie. to
    have PF_NOFREEZE set by default) and introduces the set_freezable()
    function that should be called by the freezable kernel threads in order to
    unset PF_NOFREEZE. It also makes all of the currently freezable kernel
    threads call set_freezable(), so it shouldn't cause any (intentional)
    change of behaviour to appear. Additionally, it updates documentation to
    describe the freezing of tasks more accurately.

    [akpm@linux-foundation.org: build fixes]
    Signed-off-by: Rafael J. Wysocki
    Acked-by: Nigel Cunningham
    Cc: Pavel Machek
    Cc: Oleg Nesterov
    Cc: Gautham R Shenoy
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Rafael J. Wysocki
     

09 May, 2007

4 commits


07 Mar, 2007

1 commit

  • rcutorture's module parameters currently use permissions of 0, so they
    don't show up in /sys/module/rcutorture/parameters. Change the permissions
    on all module parameters to world-readable (0444).

    rcutorture does all of its initialization and thread startup when loaded
    and relies on the parameters not changing during execution, so they should
    not permit writing. However, reading seems fine.

    Signed-off-by: Josh Triplett
    Cc: "Paul E. McKenney"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Josh Triplett
     

31 Dec, 2006

1 commit


08 Dec, 2006

1 commit


04 Oct, 2006

4 commits