1. 24 9月, 2013 1 次提交
  2. 30 7月, 2013 1 次提交
    • S
      rcu: Add const annotation to char * for RCU tracepoints and functions · e66c33d5
      Steven Rostedt (Red Hat) 提交于
      All the RCU tracepoints and functions that reference char pointers do
      so with just 'char *' even though they do not modify the contents of
      the string itself. This will cause warnings if a const char * is used
      in one of these functions.
      
      The RCU tracepoints store the pointer to the string to refer back to them
      when the trace output is displayed. As this can be minutes, hours or
      even days later, those strings had better be constant.
      
      This change also opens the door to allow the RCU tracepoint strings and
      their addresses to be exported so that userspace tracing tools can
      translate the contents of the pointers of the RCU tracepoints.
      Signed-off-by: NSteven Rostedt <rostedt@goodmis.org>
      e66c33d5
  3. 11 6月, 2013 5 次提交
  4. 29 1月, 2013 1 次提交
  5. 09 1月, 2013 1 次提交
  6. 14 11月, 2012 1 次提交
  7. 23 9月, 2012 3 次提交
  8. 03 7月, 2012 1 次提交
  9. 22 2月, 2012 4 次提交
  10. 12 12月, 2011 7 次提交
  11. 31 10月, 2011 2 次提交
  12. 29 9月, 2011 6 次提交
  13. 21 5月, 2011 1 次提交
    • L
      sanitize <linux/prefetch.h> usage · 268bb0ce
      Linus Torvalds 提交于
      Commit e66eed65 ("list: remove prefetching from regular list
      iterators") removed the include of prefetch.h from list.h, which
      uncovered several cases that had apparently relied on that rather
      obscure header file dependency.
      
      So this fixes things up a bit, using
      
         grep -L linux/prefetch.h $(git grep -l '[^a-z_]prefetchw*(' -- '*.[ch]')
         grep -L 'prefetchw*(' $(git grep -l 'linux/prefetch.h' -- '*.[ch]')
      
      to guide us in finding files that either need <linux/prefetch.h>
      inclusion, or have it despite not needing it.
      
      There are more of them around (mostly network drivers), but this gets
      many core ones.
      Reported-by: NStephen Rothwell <sfr@canb.auug.org.au>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      268bb0ce
  14. 06 5月, 2011 2 次提交
    • E
      rcu: optimize rcutiny · b554d7de
      Eric Dumazet 提交于
      rcu_sched_qs() currently calls local_irq_save()/local_irq_restore() up
      to three times.
      
      Remove irq masking from rcu_qsctr_help() / invoke_rcu_kthread()
      and do it once in rcu_sched_qs() / rcu_bh_qs()
      
      This generates smaller code as well.
      
         text	   data	    bss	    dec	    hex	filename
         2314	    156	     24	   2494	    9be	kernel/rcutiny.old.o
         2250	    156	     24	   2430	    97e	kernel/rcutiny.new.o
      
      Fix an outdated comment for rcu_qsctr_help()
      Move invoke_rcu_kthread() definition before its use.
      Signed-off-by: NEric Dumazet <eric.dumazet@gmail.com>
      Signed-off-by: NPaul E. McKenney <paulmck@linux.vnet.ibm.com>
      Reviewed-by: NJosh Triplett <josh@joshtriplett.org>
      b554d7de
    • L
      rcu: introduce kfree_rcu() · 9ab1544e
      Lai Jiangshan 提交于
      Many rcu callbacks functions just call kfree() on the base structure.
      These functions are trivial, but their size adds up, and furthermore
      when they are used in a kernel module, that module must invoke the
      high-latency rcu_barrier() function at module-unload time.
      
      The kfree_rcu() function introduced by this commit addresses this issue.
      Rather than encoding a function address in the embedded rcu_head
      structure, kfree_rcu() instead encodes the offset of the rcu_head
      structure within the base structure.  Because the functions are not
      allowed in the low-order 4096 bytes of kernel virtual memory, offsets
      up to 4095 bytes can be accommodated.  If the offset is larger than
      4095 bytes, a compile-time error will be generated in __kfree_rcu().
      If this error is triggered, you can either fall back to use of call_rcu()
      or rearrange the structure to position the rcu_head structure into the
      first 4096 bytes.
      
      Note that the allowable offset might decrease in the future, for example,
      to allow something like kmem_cache_free_rcu().
      
      The new kfree_rcu() function can replace code as follows:
      
      	call_rcu(&p->rcu, simple_kfree_callback);
      
      where "simple_kfree_callback()" might be defined as follows:
      
      	void simple_kfree_callback(struct rcu_head *p)
      	{
      		struct foo *q = container_of(p, struct foo, rcu);
      
      		kfree(q);
      	}
      
      with the following:
      
      	kfree_rcu(&p->rcu, rcu);
      
      Note that the "rcu" is the name of a field in the structure being
      freed.  The reason for using this rather than passing in a pointer
      to the base structure is that the above approach allows better type
      checking.
      
      This commit is based on earlier work by Lai Jiangshan and Manfred Spraul:
      
      Lai's V1 patch: http://lkml.org/lkml/2008/9/18/1
      Manfred's patch: http://lkml.org/lkml/2009/1/2/115Signed-off-by: NLai Jiangshan <laijs@cn.fujitsu.com>
      Signed-off-by: NManfred Spraul <manfred@colorfullife.com>
      Signed-off-by: NPaul E. McKenney <paulmck@linux.vnet.ibm.com>
      Reviewed-by: NDavid Howells <dhowells@redhat.com>
      Reviewed-by: NJosh Triplett <josh@joshtriplett.org>
      9ab1544e
  15. 14 1月, 2011 1 次提交
  16. 30 11月, 2010 2 次提交
  17. 18 11月, 2010 1 次提交
    • P
      rcu: move TINY_RCU from softirq to kthread · b2c0710c
      Paul E. McKenney 提交于
      If RCU priority boosting is to be meaningful, callback invocation must
      be boosted in addition to preempted RCU readers.  Otherwise, in presence
      of CPU real-time threads, the grace period ends, but the callbacks don't
      get invoked.  If the callbacks don't get invoked, the associated memory
      doesn't get freed, so the system is still subject to OOM.
      
      But it is not reasonable to priority-boost RCU_SOFTIRQ, so this commit
      moves the callback invocations to a kthread, which can be boosted easily.
      Signed-off-by: NPaul E. McKenney <paul.mckenney@linaro.org>
      Signed-off-by: NPaul E. McKenney <paulmck@linux.vnet.ibm.com>
      b2c0710c