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

11 commits


30 Sep, 2006

1 commit

  • rcu_torture_read_lock and rcu_bh_torture_read_lock acquire locks without
    releasing them, and the matching functions rcu_torture_read_unlock and
    rcu_bh_torture_read_unlock get called with the corresponding locks held and
    release them. Add lock annotations to these four functions so that sparse
    can check callers for lock pairing, and so that sparse will not complain
    about these functions since they intentionally use locks in this manner.

    Signed-off-by: Josh Triplett
    Acked-by: Paul McKenney
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Josh Triplett
     

28 Jun, 2006

2 commits