1. 30 Mar, 2010 1 commit
    • Tejun Heo's avatar
      include cleanup: Update gfp.h and slab.h includes to prepare for breaking... · 5a0e3ad6
      Tejun Heo authored
      include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h
      percpu.h is included by sched.h and module.h and thus ends up being
      included when building most .c files.  percpu.h includes slab.h which
      in turn includes gfp.h making everything defined by the two files
      universally available and complicating inclusion dependencies.
      percpu.h -> slab.h dependency is about to be removed.  Prepare for
      this change by updating users of gfp and slab facilities include those
      headers directly instead of assuming availability.  As this conversion
      needs to touch large number of source files, the following script is
      used as the basis of conversion.
      The script does the followings.
      * Scan files for gfp and slab usages and update includes such that
        only the necessary includes are there.  ie. if only gfp is used,
        gfp.h, if slab is used, slab.h.
      * When the script inserts a new include, it looks at the include
        blocks and try to put the new include such that its order conforms
        to its surrounding.  It's put in the include block which contains
        core kernel includes, in the same order that the rest are ordered -
        alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
        doesn't seem to be any matching order.
      * If the script can't find a place to put a new include (mostly
        because the file doesn't have fitting include block), it prints out
        an error message indicating which .h file needs to be added to the
      The conversion was done in the following steps.
      1. The initial automatic conversion of all .c files updated slightly
         over 4000 files, deleting around 700 includes and adding ~480 gfp.h
         and ~3000 slab.h inclusions.  The script emitted errors for ~400
      2. Each error was manually checked.  Some didn't need the inclusion,
         some needed manual addition while adding it to implementation .h or
         embedding .c file was more appropriate for others.  This step added
         inclusions to around 150 files.
      3. The script was run again and the output was compared to the edits
         from #2 to make sure no file was left behind.
      4. Several build tests were done and a couple of problems were fixed.
         e.g. lib/decompress_*.c used malloc/free() wrappers around slab
         APIs requiring slab.h to be added manually.
      5. The script was run on all .h files but without automatically
         editing them as sprinkling gfp.h and slab.h inclusions around .h
         files could easily lead to inclusion dependency hell.  Most gfp.h
         inclusion directives were ignored as stuff from gfp.h was usually
         wildly available and often used in preprocessor macros.  Each
         slab.h inclusion directive was examined and added manually as
      6. percpu.h was updated not to include slab.h.
      7. Build test were done on the following configurations and failures
         were fixed.  CONFIG_GCOV_KERNEL was turned off for all tests (as my
         distributed build env didn't work with gcov compiles) and a few
         more options had to be turned off depending on archs to make things
         build (like ipr on powerpc/64 which failed due to missing writeq).
         * x86 and x86_64 UP and SMP allmodconfig and a custom test config.
         * powerpc and powerpc64 SMP allmodconfig
         * sparc and sparc64 SMP allmodconfig
         * ia64 SMP allmodconfig
         * s390 SMP allmodconfig
         * alpha SMP allmodconfig
         * um on x86_64 SMP allmodconfig
      8. percpu.h modifications were reverted so that it could be applied as
         a separate patch and serve as bisection point.
      Given the fact that I had only a couple of failures from tests on step
      6, I'm fairly confident about the coverage of this conversion patch.
      If there is a breakage, it's likely to be something in one of the arch
      headers which should be easily discoverable easily on most builds of
      the specific arch.
      Signed-off-by: default avatarTejun Heo <tj@kernel.org>
      Guess-its-ok-by: default avatarChristoph Lameter <cl@linux-foundation.org>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
  2. 08 Mar, 2010 3 commits
  3. 27 Feb, 2010 1 commit
    • Tejun Heo's avatar
      percpu: Add __percpu sparse annotations to hw_breakpoint · 44ee6358
      Tejun Heo authored
      Add __percpu sparse annotations to hw_breakpoint.
      These annotations are to make sparse consider percpu variables to be
      in a different address space and warn if accessed without going
      through percpu accessors.  This patch doesn't affect normal builds.
      In kernel/hw_breakpoint.c, per_cpu(nr_task_bp_pinned, cpu)'s will
      trigger spurious noderef related warnings from sparse.  Changing it to
      &per_cpu(nr_task_bp_pinned[0], cpu) will work around the problem but
      deemed to ugly by the maintainer.  Leave it alone until better
      solution can be found.
      Signed-off-by: default avatarTejun Heo <tj@kernel.org>
      Cc: Stephen Rothwell <sfr@canb.auug.org.au>
      Cc: K.Prasad <prasad@linux.vnet.ibm.com>
      LKML-Reference: <4B7B4B7A.9050902@kernel.org>
      Signed-off-by: default avatarFrederic Weisbecker <fweisbec@gmail.com>
  4. 06 Dec, 2009 1 commit
  5. 27 Nov, 2009 1 commit
  6. 26 Nov, 2009 1 commit
    • Frederic Weisbecker's avatar
      hw-breakpoints: Simplify error handling in breakpoint creation requests · 605bfaee
      Frederic Weisbecker authored
      This simplifies the error handling when we create a breakpoint.
      We don't need to check the NULL return value corner case anymore
      since we have improved perf_event_create_kernel_counter() to
      always return an error code in the failure case.
      Signed-off-by: default avatarFrederic Weisbecker <fweisbec@gmail.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Cc: Prasad <prasad@linux.vnet.ibm.com>
      LKML-Reference: <1259210142-5714-3-git-send-regression-fweisbec@gmail.com>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
  7. 23 Nov, 2009 1 commit
  8. 10 Nov, 2009 1 commit
  9. 09 Nov, 2009 1 commit
  10. 01 Oct, 2009 1 commit
  11. 18 Sep, 2009 1 commit
  12. 15 Sep, 2009 1 commit
  13. 17 Aug, 2009 1 commit
  14. 13 Jul, 2009 1 commit
    • Li Zefan's avatar
      tracing/events: Move TRACE_SYSTEM outside of include guard · d0b6e04a
      Li Zefan authored
      If TRACE_INCLDUE_FILE is defined, <trace/events/TRACE_INCLUDE_FILE.h>
      will be included and compiled, otherwise it will be
      So TRACE_SYSTEM should be defined outside of #if proctection,
      just like TRACE_INCLUDE_FILE.
      Imaging this scenario:
       #include <trace/events/foo.h>
          -> TRACE_SYSTEM == foo
       #include <trace/events/bar.h>
          -> TRACE_SYSTEM == bar
       #define CREATE_TRACE_POINTS
       #include <trace/events/foo.h>
          -> TRACE_SYSTEM == bar !!!
      and then bar.h will be included and compiled.
      Signed-off-by: default avatarLi Zefan <lizf@cn.fujitsu.com>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      LKML-Reference: <4A5A9CF1.2010007@cn.fujitsu.com>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
  15. 16 Jun, 2009 3 commits
  16. 02 Jun, 2009 1 commit
  17. 07 May, 2009 1 commit
    • Steven Rostedt's avatar
      tracing: update sample with TRACE_INCLUDE_FILE · 71e1c8ac
      Steven Rostedt authored
      When creating trace events for ftrace, the header file with the TRACE_EVENT
      macros must also have a macro called TRACE_SYSTEM. This macro describes
      the name of the system the TRACE_EVENTS are defined for. It also doubles
      as a way for the define_trace.h file to include the file that included
      For example:
      in irq.h
       #define TRACE_SYSTEM irq
       #include <trace/define_trace.h>
      The define_trace will use TRACE_SYSTEM to include irq.h. But if the name
      of the trace system does not match the name of the trace header file,
      one can override it with:
      Which will change define_trace.h to inclued foo_trace.h instead of foo.h
      The sample comments this, but people that use the sample code will more
      likely use the code and not read the comments. This patch changes the
      sample code to use the TRACE_INCLUDE_FILE to better show developers how to
      use it.
      [ Impact: make sample less confusing to developers ]
      Reported-by: default avatarChristoph Hellwig <hch@lst.de>
      Signed-off-by: default avatarSteven Rostedt <rostedt@goodmis.org>
  18. 06 May, 2009 3 commits
  19. 15 Apr, 2009 1 commit
  20. 24 Mar, 2009 1 commit
  21. 10 Mar, 2009 1 commit
  22. 06 Jan, 2009 1 commit
  23. 16 Nov, 2008 2 commits
  24. 14 Oct, 2008 2 commits
  25. 22 Jul, 2008 2 commits
  26. 29 Apr, 2008 1 commit
  27. 20 Apr, 2008 2 commits
  28. 05 Mar, 2008 1 commit
  29. 14 Feb, 2008 1 commit
    • Mathieu Desnoyers's avatar
      Linux Kernel Markers: support multiple probes · fb40bd78
      Mathieu Desnoyers authored
      RCU style multiple probes support for the Linux Kernel Markers.  Common case
      (one probe) is still fast and does not require dynamic allocation or a
      supplementary pointer dereference on the fast path.
      - Move preempt disable from the marker site to the callback.
      Since we now have an internal callback, move the preempt disable/enable to the
      callback instead of the marker site.
      Since the callback change is done asynchronously (passing from a handler that
      supports arguments to a handler that does not setup the arguments is no
      arguments are passed), we can safely update it even if it is outside the
      preempt disable section.
      - Move probe arm to probe connection. Now, a connected probe is automatically
      Remove MARK_MAX_FORMAT_LEN, unused.
      This patch modifies the Linux Kernel Markers API : it removes the probe
      "arm/disarm" and changes the probe function prototype : it now expects a
      va_list * instead of a "...".
      If we want to have more than one probe connected to a marker at a given
      time (LTTng, or blktrace, ssytemtap) then we need this patch. Without it,
      connecting a second probe handler to a marker will fail.
      It allow us, for instance, to do interesting combinations :
      Do standard tracing with LTTng and, eventually, to compute statistics
      with SystemTAP, or to have a special trigger on an event that would call
      a systemtap script which would stop flight recorder tracing.
      Signed-off-by: default avatarMathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
      Cc: Christoph Hellwig <hch@infradead.org>
      Cc: Mike Mason <mmlnx@us.ibm.com>
      Cc: Dipankar Sarma <dipankar@in.ibm.com>
      Cc: David Smith <dsmith@redhat.com>
      Cc: "Paul E. McKenney" <paulmck@us.ibm.com>
      Cc: "Frank Ch. Eigler" <fche@redhat.com>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
  30. 25 Jan, 2008 1 commit