10 Apr, 2010

1 commit

  • * 'for-linus' of git://git.kernel.dk/linux-2.6-block: (34 commits)
    cfq-iosched: Fix the incorrect timeslice accounting with forced_dispatch
    loop: Update mtime when writing using aops
    block: expose the statistics in blkio.time and blkio.sectors for the root cgroup
    backing-dev: Handle class_create() failure
    Block: Fix block/elevator.c elevator_get() off-by-one error
    drbd: lc_element_by_index() never returns NULL
    cciss: unlock on error path
    cfq-iosched: Do not merge queues of BE and IDLE classes
    cfq-iosched: Add additional blktrace log messages in CFQ for easier debugging
    i2o: Remove the dangerous kobj_to_i2o_device macro
    block: remove 16 bytes of padding from struct request on 64bits
    cfq-iosched: fix a kbuild regression
    block: make CONFIG_BLK_CGROUP visible
    Remove GENHD_FL_DRIVERFS
    block: Export max number of segments and max segment size in sysfs
    block: Finalize conversion of block limits functions
    block: Fix overrun in lcm() and move it to lib
    vfs: improve writeback_inodes_wb()
    paride: fix off-by-one test
    drbd: fix al-to-on-disk-bitmap for 4k logical_block_size
    ...

    Linus Torvalds
     

19 Mar, 2010

2 commits

  • Conflicts:
    block/Kconfig

    Signed-off-by: Jens Axboe

    Jens Axboe
     
  • …/git/tip/linux-2.6-tip

    * 'perf-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (35 commits)
    perf: Fix unexported generic perf_arch_fetch_caller_regs
    perf record: Don't try to find buildids in a zero sized file
    perf: export perf_trace_regs and perf_arch_fetch_caller_regs
    perf, x86: Fix hw_perf_enable() event assignment
    perf, ppc: Fix compile error due to new cpu notifiers
    perf: Make the install relative to DESTDIR if specified
    kprobes: Calculate the index correctly when freeing the out-of-line execution slot
    perf tools: Fix sparse CPU numbering related bugs
    perf_event: Fix oops triggered by cpu offline/online
    perf: Drop the obsolete profile naming for trace events
    perf: Take a hot regs snapshot for trace events
    perf: Introduce new perf_fetch_caller_regs() for hot regs snapshot
    perf/x86-64: Use frame pointer to walk on irq and process stacks
    lockdep: Move lock events under lockdep recursion protection
    perf report: Print the map table just after samples for which no map was found
    perf report: Add multiple event support
    perf session: Change perf_session post processing functions to take histogram tree
    perf session: Add storage for seperating event types in report
    perf session: Change add_hist_entry to take the tree root instead of session
    perf record: Add ID and to recorded event data when recording multiple events
    ...

    Linus Torvalds
     

14 Mar, 2010

1 commit

  • …/git/tip/linux-2.6-tip

    * 'core-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
    locking: Make sparse work with inline spinlocks and rwlocks
    x86/mce: Fix RCU lockdep splats
    rcu: Increase RCU CPU stall timeouts if PROVE_RCU
    ftrace: Replace read_barrier_depends() with rcu_dereference_raw()
    rcu: Suppress RCU lockdep warnings during early boot
    rcu, ftrace: Fix RCU lockdep splat in ftrace_perf_buf_prepare()
    rcu: Suppress __mpol_dup() false positive from RCU lockdep
    rcu: Make rcu_read_lock_sched_held() handle !PREEMPT
    rcu: Add control variables to lockdep_rcu_dereference() diagnostics
    rcu, cgroup: Relax the check in task_subsys_state() as early boot is now handled by lockdep-RCU
    rcu: Use wrapper function instead of exporting tasklist_lock
    sched, rcu: Fix rcu_dereference() for RCU-lockdep
    rcu: Make task_subsys_state() RCU-lockdep checks handle boot-time use
    rcu: Fix holdoff for accelerated GPs for last non-dynticked CPU
    x86/gart: Unexport gart_iommu_aperture

    Fix trivial conflicts in kernel/trace/ftrace.c

    Linus Torvalds
     

10 Mar, 2010

2 commits

  • Drop the obsolete "profile" naming used by perf for trace events.
    Perf can now do more than simple events counting, so generalize
    the API naming.

    Signed-off-by: Frederic Weisbecker
    Cc: Ingo Molnar
    Cc: Peter Zijlstra
    Cc: Paul Mackerras
    Cc: Steven Rostedt
    Cc: Masami Hiramatsu
    Cc: Jason Baron

    Frederic Weisbecker
     
  • We are taking a wrong regs snapshot when a trace event triggers.
    Either we use get_irq_regs(), which gives us the interrupted
    registers if we are in an interrupt, or we use task_pt_regs()
    which gives us the state before we entered the kernel, assuming
    we are lucky enough to be no kernel thread, in which case
    task_pt_regs() returns the initial set of regs when the kernel
    thread was started.

    What we want is different. We need a hot snapshot of the regs,
    so that we can get the instruction pointer to record in the
    sample, the frame pointer for the callchain, and some other
    things.

    Let's use the new perf_fetch_caller_regs() for that.

    Comparison with perf record -e lock: -R -a -f -g
    Before:

    perf [kernel] [k] __do_softirq
    |
    --- __do_softirq
    |
    |--55.16%-- __open
    |
    --44.84%-- __write_nocancel

    After:

    perf [kernel] [k] perf_tp_event
    |
    --- perf_tp_event
    |
    |--41.07%-- lock_acquire
    | |
    | |--39.36%-- _raw_spin_lock
    | | |
    | | |--7.81%-- hrtimer_interrupt
    | | | smp_apic_timer_interrupt
    | | | apic_timer_interrupt

    The old case was producing unreliable callchains. Now having
    right frame and instruction pointers, we have the trace we
    want.

    Also syscalls and kprobe events already have the right regs,
    let's use them instead of wasting a retrieval.

    v2: Follow the rename perf_save_regs() -> perf_fetch_caller_regs()

    Signed-off-by: Frederic Weisbecker
    Cc: Ingo Molnar
    Cc: Thomas Gleixner
    Cc: H. Peter Anvin
    Cc: Peter Zijlstra
    Cc: Paul Mackerras
    Cc: Steven Rostedt
    Cc: Arnaldo Carvalho de Melo
    Cc: Masami Hiramatsu
    Cc: Jason Baron
    Cc: Archs

    Frederic Weisbecker
     

09 Mar, 2010

1 commit


06 Mar, 2010

2 commits

  • * 'kvm-updates/2.6.34' of git://git.kernel.org/pub/scm/virt/kvm/kvm: (145 commits)
    KVM: x86: Add KVM_CAP_X86_ROBUST_SINGLESTEP
    KVM: VMX: Update instruction length on intercepted BP
    KVM: Fix emulate_sys[call, enter, exit]()'s fault handling
    KVM: Fix segment descriptor loading
    KVM: Fix load_guest_segment_descriptor() to inject page fault
    KVM: x86 emulator: Forbid modifying CS segment register by mov instruction
    KVM: Convert kvm->requests_lock to raw_spinlock_t
    KVM: Convert i8254/i8259 locks to raw_spinlocks
    KVM: x86 emulator: disallow opcode 82 in 64-bit mode
    KVM: x86 emulator: code style cleanup
    KVM: Plan obsolescence of kernel allocated slots, paravirt mmu
    KVM: x86 emulator: Add LOCK prefix validity checking
    KVM: x86 emulator: Check CPL level during privilege instruction emulation
    KVM: x86 emulator: Fix popf emulation
    KVM: x86 emulator: Check IOPL level during io instruction emulation
    KVM: x86 emulator: fix memory access during x86 emulation
    KVM: x86 emulator: Add Virtual-8086 mode of emulation
    KVM: x86 emulator: Add group9 instruction decoding
    KVM: x86 emulator: Add group8 instruction decoding
    KVM: do not store wqh in irqfd
    ...

    Trivial conflicts in Documentation/feature-removal-schedule.txt

    Linus Torvalds
     
  • * 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4: (36 commits)
    ext4: fix up rb_root initializations to use RB_ROOT
    ext4: Code cleanup for EXT4_IOC_MOVE_EXT ioctl
    ext4: Fix the NULL reference in double_down_write_data_sem()
    ext4: Fix insertion point of extent in mext_insert_across_blocks()
    ext4: consolidate in_range() definitions
    ext4: cleanup to use ext4_grp_offs_to_block()
    ext4: cleanup to use ext4_group_first_block_no()
    ext4: Release page references acquired in ext4_da_block_invalidatepages
    ext4: Fix ext4_quota_write cross block boundary behaviour
    ext4: Convert BUG_ON checks to use ext4_error() instead
    ext4: Use direct_IO_no_locking in ext4 dio read
    ext4: use ext4_get_block_write in buffer write
    ext4: mechanical rename some of the direct I/O get_block's identifiers
    ext4: make "offset" consistent in ext4_check_dir_entry()
    ext4: Handle non empty on-disk orphan link
    ext4: explicitly remove inode from orphan list after failed direct io
    ext4: fix error handling in migrate
    ext4: deprecate obsoleted mount options
    ext4: Fix fencepost error in chosing choosing group vs file preallocation.
    jbd2: clean up an assertion in jbd2_journal_commit_transaction()
    ...

    Linus Torvalds
     

04 Mar, 2010

1 commit

  • Change the pair of rcu_dereference() calls in
    ftrace_perf_buf_prepare() to rcu_dereference_sched().

    Signed-off-by: Paul E. McKenney
    Acked-by: Frederic Weisbecker
    Cc: Steven Rostedt
    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: Valdis.Kletnieks@vt.edu
    Cc: dhowells@redhat.com
    Cc: Frederic Weisbecker
    LKML-Reference:
    Signed-off-by: Ingo Molnar

    Paul E. McKenney
     

01 Mar, 2010

3 commits

  • Signed-off-by: Avi Kivity

    Avi Kivity
     
  • Signed-off-by: Avi Kivity
    Signed-off-by: Marcelo Tosatti

    Avi Kivity
     
  • …git/tip/linux-2.6-tip

    * 'perf-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (172 commits)
    perf_event, amd: Fix spinlock initialization
    perf_event: Fix preempt warning in perf_clock()
    perf tools: Flush maps on COMM events
    perf_events, x86: Split PMU definitions into separate files
    perf annotate: Handle samples not at objdump output addr boundaries
    perf_events, x86: Remove superflous MSR writes
    perf_events: Simplify code by removing cpu argument to hw_perf_group_sched_in()
    perf_events, x86: AMD event scheduling
    perf_events: Add new start/stop PMU callbacks
    perf_events: Report the MMAP pgoff value in bytes
    perf annotate: Defer allocating sym_priv->hist array
    perf symbols: Improve debugging information about symtab origins
    perf top: Use a macro instead of a constant variable
    perf symbols: Check the right return variable
    perf/scripts: Tag syscall_name helper as not yet available
    perf/scripts: Add perf-trace-python Documentation
    perf/scripts: Remove unnecessary PyTuple resizes
    perf/scripts: Add syscall tracing scripts
    perf/scripts: Add Python scripting engine
    perf/scripts: Remove check-perf-trace from listed scripts
    ...

    Fix trivial conflict in tools/perf/util/probe-event.c

    Linus Torvalds
     

25 Feb, 2010

1 commit

  • GCC 4.5 introduces behavior that forces the alignment of structures to
    use the largest possible value. The default value is 32 bytes, so if
    some structures are defined with a 4-byte alignment and others aren't
    declared with an alignment constraint at all - it will align at 32-bytes.

    For things like the ftrace events, this results in a non-standard array.
    When initializing the ftrace subsystem, we traverse the _ftrace_events
    section and call the initialization callback for each event. When the
    structures are misaligned, we could be treating another part of the
    structure (or the zeroed out space between them) as a function pointer.

    This patch forces the alignment for all the ftrace_event_call structures
    to 4 bytes.

    Without this patch, the kernel fails to boot very early when built with
    gcc 4.5.

    It's trivial to check the alignment of the members of the array, so it
    might be worthwhile to add something to the build system to do that
    automatically. Unfortunately, that only covers this case. I've asked one
    of the gcc developers about adding a warning when this condition is seen.

    Cc: stable@kernel.org
    Signed-off-by: Jeff Mahoney
    LKML-Reference:
    Signed-off-by: Steven Rostedt

    Jeff Mahoney
     

16 Feb, 2010

1 commit

  • The functions used to implement the TRACE_EVENT macro show up in
    function tracing. This is considered a distraction, and these should
    not be displayed. For example:

    -0 [000] 57.202149: task_of -0 [000] 57.202149: ftrace_raw_event_sched_stat_wait -0 [000] 57.202150: ftrace_raw_event_id_sched_stat_template -0 [000] 57.202150: sched_stat_wait: comm=sshd pid=2735 delay=19207 [ns]

    The "ftrace_raw_event_*" traces are just the utility functions used
    by TRACE_EVENT tracepoints.

    Cc: Thomas Gleixner
    Requested-by: Peter Zijlstra
    Signed-off-by: Steven Rostedt

    Steven Rostedt
     

31 Jan, 2010

1 commit


29 Jan, 2010

1 commit

  • Introduce ftrace_perf_buf_prepare() and ftrace_perf_buf_submit() to
    gather the common code that operates on raw events sampling buffer.
    This cleans up redundant code between regular trace events, syscall
    events and kprobe events.

    Changelog v1->v2:
    - Rename function name as per Masami and Frederic's suggestion
    - Add __kprobes for ftrace_perf_buf_prepare() and make
    ftrace_perf_buf_submit() inline as per Masami's suggestion
    - Export ftrace_perf_buf_prepare since modules will use it

    Signed-off-by: Xiao Guangrong
    Acked-by: Masami Hiramatsu
    Cc: Ingo Molnar
    Cc: Steven Rostedt
    Cc: Paul Mackerras
    Cc: Jason Baron
    Cc: Peter Zijlstra
    LKML-Reference:
    Signed-off-by: Frederic Weisbecker

    Xiao Guangrong
     

13 Jan, 2010

1 commit


07 Jan, 2010

2 commits

  • The previous patches added the use of print_fmt string and changes
    the trace_define_field() function to also create the fields and
    format output for the event format files.

    text data bss dec hex filename
    5857201 1355780 9336808 16549789 fc879d vmlinux
    5884589 1351684 9337896 16574169 fce6d9 vmlinux-orig

    The above shows the size of the vmlinux after this patch set
    compared to the vmlinux-orig which is before the patch set.

    This saves us 27k on text, 1k on bss and adds just 4k of data.

    The total savings of 24k in size.

    Signed-off-by: Lai Jiangshan
    LKML-Reference:
    Acked-by: Masami Hiramatsu
    Signed-off-by: Steven Rostedt

    Lai Jiangshan
     
  • This is part of a patch set that removes the show_format method
    in the ftrace event macros.

    The print_fmt field is added to hold the string that shows
    the print_fmt in the event format files. This patch only adds
    the field but it is currently not used. Later patches will use
    this field to enable us to remove the show_format field
    and function.

    Signed-off-by: Lai Jiangshan
    LKML-Reference:
    Signed-off-by: Steven Rostedt

    Lai Jiangshan
     

01 Jan, 2010

1 commit


30 Dec, 2009

1 commit


28 Dec, 2009

1 commit

  • Quoted from Ingo:

    | This reminds me - i think we should eliminate CONFIG_EVENT_PROFILE -
    | it's an unnecessary Kconfig complication. If both PERF_EVENTS and
    | EVENT_TRACING is enabled we should expose generic tracepoints.
    |
    | Nor is it limited to event 'profiling', so it has become a misnomer as
    | well.

    Signed-off-by: Li Zefan
    Cc: Frederic Weisbecker
    Cc: Steven Rostedt
    Cc: Peter Zijlstra
    Cc: Paul Mackerras
    LKML-Reference:
    Signed-off-by: Ingo Molnar

    Li Zefan
     

23 Dec, 2009

1 commit


14 Dec, 2009

5 commits

  • Conflicts:
    kernel/trace/trace_kprobe.c

    Merge reason: resolve the conflict.

    Signed-off-by: Ingo Molnar

    Ingo Molnar
     
  • Like total_profile_count, struct ftrace_event_call::profile_count
    is protected by event_mutex, so it doesn't need to be atomic_t.

    Signed-off-by: Li Zefan
    Acked-by: Steven Rostedt
    Cc: Jason Baron
    Cc: Masami Hiramatsu
    Cc: Peter Zijlstra
    LKML-Reference:
    Signed-off-by: Frederic Weisbecker

    Li Zefan
     
  • Move the printk from each ftrace_raw_reg_event_foo() to
    its caller ftrace_event_enable_disable(). This avoids each
    regfunc trace event callbacks to handle a same error report
    that can be carried from the caller.

    See how much space this saves:

    text data bss dec hex filename
    5345151 1961864 7103260 14410275 dbe223 vmlinux.o.old
    5331487 1961864 7103260 14396611 dbacc3 vmlinux.o

    Signed-off-by: Li Zefan
    Acked-by: Steven Rostedt
    Cc: Jason Baron
    LKML-Reference:
    [start cmdline record before calling regfunc to avoid lost
    window of pid to comm resolution]
    Signed-off-by: Frederic Weisbecker

    Li Zefan
     
  • Call trace_define_common_fields() in event_create_dir() only.
    This avoids trace events to handle it from their define_fields
    callbacks and shrinks the kernel code size:

    text data bss dec hex filename
    5346802 1961864 7103260 14411926 dbe896 vmlinux.o.old
    5345151 1961864 7103260 14410275 dbe223 vmlinux.o

    Signed-off-by: Li Zefan
    Acked-by: Steven Rostedt
    Cc: Ingo Molnar
    Cc: Jason Baron
    Cc: Masami Hiramatsu
    LKML-Reference:
    Signed-off-by: Frederic Weisbecker

    Li Zefan
     
  • Use a generic trace_event_raw_init() function for all event's raw_init
    callbacks (but kprobes) instead of defining the same version for each
    of these.
    This shrinks the kernel code:

    text data bss dec hex filename
    5355293 1961928 7103260 14420481 dc0a01 vmlinux.o.old
    5346802 1961864 7103260 14411926 dbe896 vmlinux.o

    raw_init can't be removed, because ftrace events and kprobe events
    use different raw_init callbacks. Though it's possible to totally
    remove raw_init, I choose to leave it as it is for now.

    Signed-off-by: Li Zefan
    Acked-by: Steven Rostedt
    Cc: Jason Baron
    Cc: Ingo Molnar
    LKML-Reference:
    Signed-off-by: Frederic Weisbecker

    Li Zefan
     

13 Dec, 2009

1 commit


12 Dec, 2009

1 commit


11 Dec, 2009

1 commit

  • * 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4: (47 commits)
    ext4: Fix potential fiemap deadlock (mmap_sem vs. i_data_sem)
    ext4: Do not override ext2 or ext3 if built they are built as modules
    jbd2: Export jbd2_log_start_commit to fix ext4 build
    ext4: Fix insufficient checks in EXT4_IOC_MOVE_EXT
    ext4: Wait for proper transaction commit on fsync
    ext4: fix incorrect block reservation on quota transfer.
    ext4: quota macros cleanup
    ext4: ext4_get_reserved_space() must return bytes instead of blocks
    ext4: remove blocks from inode prealloc list on failure
    ext4: wait for log to commit when umounting
    ext4: Avoid data / filesystem corruption when write fails to copy data
    ext4: Use ext4 file system driver for ext2/ext3 file system mounts
    ext4: Return the PTR_ERR of the correct pointer in setup_new_group_blocks()
    jbd2: Add ENOMEM checking in and for jbd2_journal_write_metadata_buffer()
    ext4: remove unused parameter wbc from __ext4_journalled_writepage()
    ext4: remove encountered_congestion trace
    ext4: move_extent_per_page() cleanup
    ext4: initialize moved_len before calling ext4_move_extents()
    ext4: Fix double-free of blocks with EXT4_IOC_MOVE_EXT
    ext4: use ext4_data_block_valid() in ext4_free_blocks()
    ...

    Linus Torvalds
     

10 Dec, 2009

1 commit

  • Compiling powerpc64 results in:

    include/trace/events/timer.h:279: warning:
    format '%lu' expects type 'long unsigned int', but argument 4 has type 'cputime_t'
    ....

    cputime_t on power is u64, which triggers the above warning.

    Cast the cputime_t to unsigned long long and fix the print format
    string. That works on both 32 and 64 bit architectures.

    While at it change the print format for long variables from %lu to %ld.

    Signed-off-by: Thomas Gleixner
    Cc: Xiao Guangrong

    Thomas Gleixner
     

06 Dec, 2009

2 commits

  • …git/tip/linux-2.6-tip

    * 'perf-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (470 commits)
    x86: Fix comments of register/stack access functions
    perf tools: Replace %m with %a in sscanf
    hw-breakpoints: Keep track of user disabled breakpoints
    tracing/syscalls: Make syscall events print callbacks static
    tracing: Add DEFINE_EVENT(), DEFINE_SINGLE_EVENT() support to docbook
    perf: Don't free perf_mmap_data until work has been done
    perf_event: Fix compile error
    perf tools: Fix _GNU_SOURCE macro related strndup() build error
    trace_syscalls: Remove unused syscall_name_to_nr()
    trace_syscalls: Simplify syscall profile
    trace_syscalls: Remove duplicate init_enter_##sname()
    trace_syscalls: Add syscall_nr field to struct syscall_metadata
    trace_syscalls: Remove enter_id exit_id
    trace_syscalls: Set event_enter_##sname->data to its metadata
    trace_syscalls: Remove unused event_syscall_enter and event_syscall_exit
    perf_event: Initialize data.period in perf_swevent_hrtimer()
    perf probe: Simplify event naming
    perf probe: Add --list option for listing current probe events
    perf probe: Add argv_split() from lib/argv_split.c
    perf probe: Move probe event utility functions to probe-event.c
    ...

    Linus Torvalds
     
  • …el/git/tip/linux-2.6-tip

    * 'tracing-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (40 commits)
    tracing: Separate raw syscall from syscall tracer
    ring-buffer-benchmark: Add parameters to set produce/consumer priorities
    tracing, function tracer: Clean up strstrip() usage
    ring-buffer benchmark: Run producer/consumer threads at nice +19
    tracing: Remove the stale include/trace/power.h
    tracing: Only print objcopy version warning once from recordmcount
    tracing: Prevent build warning: 'ftrace_graph_buf' defined but not used
    ring-buffer: Move access to commit_page up into function used
    tracing: do not disable interrupts for trace_clock_local
    ring-buffer: Add multiple iterations between benchmark timestamps
    kprobes: Sanitize struct kretprobe_instance allocations
    tracing: Fix to use __always_unused attribute
    compiler: Introduce __always_unused
    tracing: Exit with error if a weak function is used in recordmcount.pl
    tracing: Move conditional into update_funcs() in recordmcount.pl
    tracing: Add regex for weak functions in recordmcount.pl
    tracing: Move mcount section search to front of loop in recordmcount.pl
    tracing: Fix objcopy revision check in recordmcount.pl
    tracing: Check absolute path of input file in recordmcount.pl
    tracing: Correct the check for number of arguments in recordmcount.pl
    ...

    Linus Torvalds
     

04 Dec, 2009

1 commit


02 Dec, 2009

4 commits