1. 06 5月, 2011 3 次提交
  2. 05 3月, 2011 1 次提交
  3. 08 10月, 2010 1 次提交
  4. 24 9月, 2010 1 次提交
  5. 20 8月, 2010 1 次提交
  6. 09 6月, 2010 1 次提交
  7. 12 5月, 2010 1 次提交
  8. 07 5月, 2010 1 次提交
    • T
      sched: replace migration_thread with cpu_stop · 969c7921
      Tejun Heo 提交于
      Currently migration_thread is serving three purposes - migration
      pusher, context to execute active_load_balance() and forced context
      switcher for expedited RCU synchronize_sched.  All three roles are
      hardcoded into migration_thread() and determining which job is
      scheduled is slightly messy.
      
      This patch kills migration_thread and replaces all three uses with
      cpu_stop.  The three different roles of migration_thread() are
      splitted into three separate cpu_stop callbacks -
      migration_cpu_stop(), active_load_balance_cpu_stop() and
      synchronize_sched_expedited_cpu_stop() - and each use case now simply
      asks cpu_stop to execute the callback as necessary.
      
      synchronize_sched_expedited() was implemented with private
      preallocated resources and custom multi-cpu queueing and waiting
      logic, both of which are provided by cpu_stop.
      synchronize_sched_expedited_count is made atomic and all other shared
      resources along with the mutex are dropped.
      
      synchronize_sched_expedited() also implemented a check to detect cases
      where not all the callback got executed on their assigned cpus and
      fall back to synchronize_sched().  If called with cpu hotplug blocked,
      cpu_stop already guarantees that and the condition cannot happen;
      otherwise, stop_machine() would break.  However, this patch preserves
      the paranoid check using a cpumask to record on which cpus the stopper
      ran so that it can serve as a bisection point if something actually
      goes wrong theree.
      
      Because the internal execution state is no longer visible,
      rcu_expedited_torture_stats() is removed.
      
      This patch also renames cpu_stop threads to from "stopper/%d" to
      "migration/%d".  The names of these threads ultimately don't matter
      and there's no reason to make unnecessary userland visible changes.
      
      With this patch applied, stop_machine() and sched now share the same
      resources.  stop_machine() is faster without wasting any resources and
      sched migration users are much cleaner.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Acked-by: NPeter Zijlstra <peterz@infradead.org>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Dipankar Sarma <dipankar@in.ibm.com>
      Cc: Josh Triplett <josh@freedesktop.org>
      Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
      Cc: Oleg Nesterov <oleg@redhat.com>
      Cc: Dimitri Sivanich <sivanich@sgi.com>
      969c7921
  9. 25 2月, 2010 2 次提交
    • P
      rcu: Fix rcutorture mod_timer argument to delay one jiffy · 6155fec9
      Paul E. McKenney 提交于
      The current "mod_timer(&t, 1)" potentially makes the timer fire
      immediately, change this to wait one jiffy.
      Signed-off-by: NDan Carpenter <error27@gmail.com>
      Signed-off-by: NPaul E. McKenney <paulmck@linux.vnet.ibm.com>
      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: <1266887105-1528-20-git-send-email-paulmck@linux.vnet.ibm.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      6155fec9
    • P
      rcu: Introduce lockdep-based checking to RCU read-side primitives · 632ee200
      Paul E. McKenney 提交于
      Inspection is proving insufficient to catch all RCU misuses,
      which is understandable given that rcu_dereference() might be
      protected by any of four different flavors of RCU (RCU, RCU-bh,
      RCU-sched, and SRCU), and might also/instead be protected by any
      of a number of locking primitives. It is therefore time to
      enlist the aid of lockdep.
      
      This set of patches is inspired by earlier work by Peter
      Zijlstra and Thomas Gleixner, and takes the following approach:
      
      o	Set up separate lockdep classes for RCU, RCU-bh, and RCU-sched.
      
      o	Set up separate lockdep classes for each instance of SRCU.
      
      o	Create primitives that check for being in an RCU read-side
      	critical section.  These return exact answers if lockdep is
      	fully enabled, but if unsure, report being in an RCU read-side
      	critical section.  (We want to avoid false positives!)
      	The primitives are:
      
      	For RCU: rcu_read_lock_held(void)
      
      	For RCU-bh: rcu_read_lock_bh_held(void)
      
      	For RCU-sched: rcu_read_lock_sched_held(void)
      
      	For SRCU: srcu_read_lock_held(struct srcu_struct *sp)
      
      o	Add rcu_dereference_check(), which takes a second argument
      	in which one places a boolean expression based on the above
      	primitives and/or lockdep_is_held().
      
      o	A new kernel configuration parameter, CONFIG_PROVE_RCU, enables
      	rcu_dereference_check().  This depends on CONFIG_PROVE_LOCKING,
      	and should be quite helpful during the transition period while
      	CONFIG_PROVE_RCU-unaware patches are in flight.
      
      The existing rcu_dereference() primitive does no checking, but
      upcoming patches will change that.
      Signed-off-by: NPaul E. McKenney <paulmck@linux.vnet.ibm.com>
      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: <1266887105-1528-1-git-send-email-paulmck@linux.vnet.ibm.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      632ee200
  10. 13 1月, 2010 1 次提交
  11. 03 12月, 2009 1 次提交
    • P
      rcu: Add expedited grace-period support for preemptible RCU · d9a3da06
      Paul E. McKenney 提交于
      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: NPaul E. McKenney <paulmck@linux.vnet.ibm.com>
      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: <1259784616158-git-send-email->
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      d9a3da06
  12. 29 10月, 2009 1 次提交
  13. 26 10月, 2009 2 次提交
  14. 03 10月, 2009 1 次提交
  15. 24 9月, 2009 1 次提交
  16. 19 9月, 2009 1 次提交
    • P
      rcu: Fix whitespace inconsistencies · a71fca58
      Paul E. McKenney 提交于
      Fix a number of whitespace ^Ierrors in the include/linux/rcu*
      and the kernel/rcu* files.
      Signed-off-by: NPaul E. McKenney <paulmck@linux.vnet.ibm.com>
      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: <20090918172819.GA24405@linux.vnet.ibm.com>
      [ did more checkpatch fixlets ]
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      a71fca58
  17. 18 9月, 2009 1 次提交
  18. 03 7月, 2009 1 次提交
    • P
      rcu: Add synchronize_sched_expedited() torture tests · 0acc512c
      Paul E. McKenney 提交于
      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: NPaul E. McKenney <paulmck@linux.vnet.ibm.com>
      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: <12459460981342-git-send-email->
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      0acc512c
  19. 30 3月, 2009 1 次提交
  20. 08 1月, 2009 1 次提交
    • P
      rcu: fix bug in rcutorture system-shutdown code · c9d557c1
      Paul E. McKenney 提交于
      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: NEric Sesterhenn <snakebyte@gmx.de>
      Tested-by: NEric Sesterhenn <snakebyte@gmx.de>
      Signed-off-by: NPaul E. McKenney <paulmck@linux.vnet.ibm.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      c9d557c1
  21. 05 1月, 2009 1 次提交
  22. 01 1月, 2009 1 次提交
    • R
      cpumask: convert RCU implementations · bd232f97
      Rusty Russell 提交于
      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: NRusty Russell <rusty@rustcorp.com.au>
      bd232f97
  23. 17 12月, 2008 1 次提交
  24. 21 10月, 2008 1 次提交
  25. 26 6月, 2008 1 次提交
  26. 24 6月, 2008 2 次提交
  27. 19 6月, 2008 1 次提交
    • P
      rcu: make rcutorture more vicious: reinstate boot-time testing · 31a72bce
      Paul E. McKenney 提交于
      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: NPaul E. McKenney <paulmck@linux.vnet.ibm.com>
      Suggested-by: NIngo Molnar <mingo@elte.hu>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      31a72bce
  28. 18 6月, 2008 2 次提交
    • P
      rcu: make rcutorture more vicious: add stutter feature · d120f65f
      Paul E. McKenney 提交于
      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: NIngo Molnar <mingo@elte.hu>
      Signed-off-by: NPaul E. McKenney <paulmck@linux.vnet.ibm.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      d120f65f
    • I
      rcutorture: WARN_ON_ONCE(1) when detecting an error · 5af970a4
      Ingo Molnar 提交于
      this makes it easier for automated tests to pick up such failures.
      5af970a4
  29. 19 5月, 2008 1 次提交
  30. 29 4月, 2008 1 次提交
  31. 20 4月, 2008 1 次提交
    • M
      generic: use new set_cpus_allowed_ptr function · f70316da
      Mike Travis 提交于
        * 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: NMike Travis <travis@sgi.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      f70316da
  32. 26 1月, 2008 1 次提交
    • G
      cpu-hotplug: replace lock_cpu_hotplug() with get_online_cpus() · 86ef5c9a
      Gautham R Shenoy 提交于
      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: NGautham R Shenoy <ego@in.ibm.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      86ef5c9a
  33. 17 10月, 2007 2 次提交