Skip to content
Snippets Groups Projects
  1. Oct 29, 2009
    • Tejun Heo's avatar
      percpu: make percpu symbols in oprofile unique · b3e9f672
      Tejun Heo authored
      
      This patch updates percpu related symbols in oprofile such that percpu
      symbols are unique and don't clash with local symbols.  This serves
      two purposes of decreasing the possibility of global percpu symbol
      collision and allowing dropping per_cpu__ prefix from percpu symbols.
      
      * drivers/oprofile/cpu_buffer.c: s/cpu_buffer/op_cpu_buffer/
      
      Partly based on Rusty Russell's "alloc_percpu: rename percpu vars
      which cause name clashes" patch.
      
      Signed-off-by: default avatarTejun Heo <tj@kernel.org>
      Acked-by: default avatarRobert Richter <robert.richter@amd.com>
      Cc: Rusty Russell <rusty@rustcorp.com.au>
      b3e9f672
  2. Oct 09, 2009
    • Robert Richter's avatar
      oprofile: warn on freeing event buffer too early · c0868934
      Robert Richter authored
      
      A race shouldn't happen since all workqueues or handlers are canceled
      or flushed before the event buffer is freed. A warning is triggered
      now if the buffer is freed too early.
      
      Also, this patch adds some comments about event buffer protection,
      reworks some code and adds code to clear buffer_pos during alloc and
      free of the event buffer.
      
      Cc: David Rientjes <rientjes@google.com>
      Cc: Stephane Eranian <eranian@google.com>
      Signed-off-by: default avatarRobert Richter <robert.richter@amd.com>
      c0868934
    • David Rientjes's avatar
      oprofile: fix race condition in event_buffer free · 066b3aa8
      David Rientjes authored
      
      Looking at the 2.6.31-rc9 code, it appears there is a race condition
      in the event_buffer cleanup code path (shutdown). This could lead to
      kernel panic as some CPUs may be operating on the event buffer AFTER
      it has been freed. The attached patch solves the problem and makes
      sure CPUs check if the buffer is not NULL before they access it as
      some may have been spinning on the mutex while the buffer was being
      freed.
      
      The race may happen if the buffer is freed during pending reads. But
      it is not clear why there are races in add_event_entry() since all
      workqueues or handlers are canceled or flushed before the event buffer
      is freed.
      
      Signed-off-by: default avatarDavid Rientjes <rientjes@google.com>
      Signed-off-by: default avatarStephane Eranian <eranian@google.com>
      Signed-off-by: default avatarRobert Richter <robert.richter@amd.com>
      066b3aa8
  3. Sep 23, 2009
  4. Sep 22, 2009
  5. Jul 20, 2009
  6. Jul 10, 2009
  7. Jun 12, 2009
  8. Jun 11, 2009
  9. May 07, 2009
  10. Mar 30, 2009
  11. Feb 05, 2009
  12. Jan 22, 2009
  13. Jan 17, 2009
  14. Jan 11, 2009
    • Rusty Russell's avatar
      cpumask: convert misc driver functions · f7df8ed1
      Rusty Russell authored
      
      Impact: use new cpumask API.
      
      Convert misc driver functions to use struct cpumask.
      
      To Do:
        - Convert iucv_buffer_cpumask to cpumask_var_t.
      
      Signed-off-by: default avatarRusty Russell <rusty@rustcorp.com.au>
      Signed-off-by: default avatarMike Travis <travis@sgi.com>
      Acked-by: default avatarDean Nelson <dcn@sgi.com>
      Cc: Robert Richter <robert.richter@amd.com>
      Cc: oprofile-list@lists.sf.net
      Cc: Jeremy Fitzhardinge <jeremy@xensource.com>
      Cc: Chris Wright <chrisw@sous-sol.org>
      Cc: virtualization@lists.osdl.org
      Cc: xen-devel@lists.xensource.com
      Cc: Ursula Braun <ursula.braun@de.ibm.com>
      Cc: linux390@de.ibm.com
      Cc: linux-s390@vger.kernel.org
      f7df8ed1
  15. Jan 07, 2009
  16. Jan 05, 2009
  17. Dec 31, 2008
    • Nick Piggin's avatar
      shrink struct dentry · c2452f32
      Nick Piggin authored
      
      struct dentry is one of the most critical structures in the kernel. So it's
      sad to see it going neglected.
      
      With CONFIG_PROFILING turned on (which is probably the common case at least
      for distros and kernel developers), sizeof(struct dcache) == 208 here
      (64-bit). This gives 19 objects per slab.
      
      I packed d_mounted into a hole, and took another 4 bytes off the inline
      name length to take the padding out from the end of the structure. This
      shinks it to 200 bytes. I could have gone the other way and increased the
      length to 40, but I'm aiming for a magic number, read on...
      
      I then got rid of the d_cookie pointer. This shrinks it to 192 bytes. Rant:
      why was this ever a good idea? The cookie system should increase its hash
      size or use a tree or something if lookups are a problem. Also the "fast
      dcookie lookups" in oprofile should be moved into the dcookie code -- how
      can oprofile possibly care about the dcookie_mutex? It gets dropped after
      get_dcookie() returns so it can't be providing any sort of protection.
      
      At 192 bytes, 21 objects fit into a 4K page, saving about 3MB on my system
      with ~140 000 entries allocated. 192 is also a multiple of 64, so we get
      nice cacheline alignment on 64 and 32 byte line systems -- any given dentry
      will now require 3 cachelines to touch all fields wheras previously it
      would require 4.
      
      I know the inline name size was chosen quite carefully, however with the
      reduction in cacheline footprint, it should actually be just about as fast
      to do a name lookup for a 36 character name as it was before the patch (and
      faster for other sizes). The memory footprint savings for names which are
      <= 32 or > 36 bytes long should more than make up for the memory cost for
      33-36 byte names.
      
      Performance is a feature...
      
      Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      c2452f32
  18. Dec 29, 2008
Loading