1. 09 11月, 2010 1 次提交
  2. 28 10月, 2010 4 次提交
    • T
      ext4,jbd2: convert tracepoints to use major/minor numbers · a269029d
      Theodore Ts'o 提交于
      Unfortunately perf can't deal with anything other than direct structure
      accesses in the TP_printk() section.  It will drop dead when it sees
      jbd2_dev_to_name() in the "print fmt" section of the tracepoint.
      
      Addresses-Google-Bug: 3138508
      Signed-off-by: N"Theodore Ts'o" <tytso@mit.edu>
      a269029d
    • E
      ext4: don't use ext4_allocation_contexts for tracing · 3e1e5f50
      Eric Sandeen 提交于
      Many tracepoints were populating an ext4_allocation_context
      to pass in, but this requires a slab allocation even when
      tracepoints are off.  In fact, 4 of 5 of these allocations
      were only for tracing.  In addition, we were only using a
      small fraction of the 144 bytes of this structure for this
      purpose.
      
      We can do away with all these alloc/frees of the ac and
      simply pass in the bits we care about, instead.
      
      I tested this by turning on tracing and running through
      xfstests on x86_64.  I did not actually do anything with
      the trace output, however.
      Signed-off-by: NEric Sandeen <sandeen@redhat.com>
      Signed-off-by: N"Theodore Ts'o" <tytso@mit.edu>
      3e1e5f50
    • E
      ext4: fix oops in trace_ext4_mb_release_group_pa · 4d547616
      Eric Sandeen 提交于
      Our QA reported an oops in the ext4_mb_release_group_pa tracing,
      and Josef Bacik pointed out that it was because we may have a
      non-null but uninitialized ac_inode in the allocation context.
      
      I can reproduce it when running xfstests with ext4 tracepoints on, 
      on a CONFIG_SLAB_DEBUG kernel.
      
      We call trace_ext4_mb_release_group_pa from 2 places, 
      ext4_mb_discard_group_preallocations and 
      ext4_mb_discard_lg_preallocations
      
      In both cases we allocate an ac as a container just for tracing (!)
      and never fill in the ac_inode.  There's no reason to be assigning,
      testing, or printing it as far as I can see, so just remove it from
      the tracepoint.
      Signed-off-by: NEric Sandeen <sandeen@redhat.com>
      Reviewed-by: NJosef Bacik <josef@redhat.com>
      Signed-off-by: N"Theodore Ts'o" <tytso@mit.edu>
      4d547616
    • W
      ext4: avoid null dereference in trace_ext4_mballoc_discard · b853fd36
      Wen Congyang 提交于
      ac->inode is set to null in function ext4_mb_release_group_pa(),
      and then trace_ext4_mballoc_discard(ac) is called, the kernel
      will panic.
      
      BUG: unable to handle kernel NULL pointer dereference at 000000a4
      IP: [<f87e1714>] ftrace_raw_event_ext4__mballoc+0x54/0xc0 [ext4]
      *pdpt = 0000000000abd001 *pde = 0000000000000000
      Oops: 0000 [#1] SMP
      
      Pid: 550, comm: flush-8:16 Not tainted 2.6.36-rc1 #1 SE7320EP2/Altos G530
      EIP: 0060:[<f87e1714>] EFLAGS: 00010206 CPU: 1
      EIP is at ftrace_raw_event_ext4__mballoc+0x54/0xc0 [ext4]
      EAX: f32ac840 EBX: f3f1cf88 ECX: f32ac840 EDX: 00000000
      ESI: f32ac83c EDI: f880b9d8 EBP: 00000000 ESP: f4b77ae4
       DS: 007b ES: 007b FS: 00d8 GS: 00e0 SS: 0068
      Process flush-8:16 (pid: 550, ti=f4b76000 task=f613e540 task.ti=f4b76000)
      Call Trace:
       [<f87f5ac1>] ? ext4_mb_release_group_pa+0x121/0x150 [ext4]
       [<f87f8356>] ? ext4_mb_discard_group_preallocations+0x336/0x400 [ext4]
       [<f87fb7f1>] ? ext4_mb_new_blocks+0x3d1/0x4f0 [ext4]
       [<c05a6c5b>] ? __make_request+0x10b/0x440
       [<f87f1fb4>] ? ext4_ext_map_blocks+0x1334/0x1980 [ext4]
       [<c04ac78a>] ? rb_reserve_next_event+0xaa/0x3b0
       [<f87d18d6>] ? ext4_map_blocks+0xd6/0x1d0 [ext4]
       [<f87d2da7>] ? mpage_da_map_blocks+0xc7/0x8a0 [ext4]
       [<c04c8a68>] ? find_get_pages_tag+0x38/0x110
       [<c04d23a5>] ? __pagevec_release+0x15/0x20
       [<f87d3ca5>] ? ext4_da_writepages+0x2b5/0x5d0 [ext4]
       [<c04cfbe0>] ? __writepage+0x0/0x30
       [<c04d0e34>] ? do_writepages+0x14/0x30
       [<c0526600>] ? writeback_single_inode+0xa0/0x240
       [<c0526971>] ? writeback_sb_inodes+0xc1/0x180
       [<c0526ab8>] ? writeback_inodes_wb+0x88/0x140
       [<c0526d7b>] ? wb_writeback+0x20b/0x320
       [<c045aca7>] ? lock_timer_base+0x27/0x50
       [<c0526fe0>] ? wb_do_writeback+0x150/0x190
       [<c05270a8>] ? bdi_writeback_thread+0x88/0x1f0
       [<c043b680>] ? complete+0x40/0x60
       [<c0527020>] ? bdi_writeback_thread+0x0/0x1f0
       [<c0469474>] ? kthread+0x74/0x80
       [<c0469400>] ? kthread+0x0/0x80
       [<c040a23e>] ? kernel_thread_helper+0x6/0x10
      Signed-off-by: NWen Congyang <wency@cn.fujitsu.com>
      Acked-by: NSteven Rostedt <rostedt@goodmis.org>
      Signed-off-by: N"Theodore Ts'o" <tytso@mit.edu>
      b853fd36
  3. 27 10月, 2010 1 次提交
    • W
      writeback: remove nonblocking/encountered_congestion references · 1b430bee
      Wu Fengguang 提交于
      This removes more dead code that was somehow missed by commit 0d99519e
      (writeback: remove unused nonblocking and congestion checks).  There are
      no behavior change except for the removal of two entries from one of the
      ext4 tracing interface.
      
      The nonblocking checks in ->writepages are no longer used because the
      flusher now prefer to block on get_request_wait() than to skip inodes on
      IO congestion.  The latter will lead to more seeky IO.
      
      The nonblocking checks in ->writepage are no longer used because it's
      redundant with the WB_SYNC_NONE check.
      
      We no long set ->nonblocking in VM page out and page migration, because
      a) it's effectively redundant with WB_SYNC_NONE in current code
      b) it's old semantic of "Don't get stuck on request queues" is mis-behavior:
         that would skip some dirty inodes on congestion and page out others, which
         is unfair in terms of LRU age.
      
      Inspired by Christoph Hellwig. Thanks!
      Signed-off-by: NWu Fengguang <fengguang.wu@intel.com>
      Cc: Theodore Ts'o <tytso@mit.edu>
      Cc: David Howells <dhowells@redhat.com>
      Cc: Sage Weil <sage@newdream.net>
      Cc: Steve French <sfrench@samba.org>
      Cc: Chris Mason <chris.mason@oracle.com>
      Cc: Jens Axboe <axboe@kernel.dk>
      Cc: Christoph Hellwig <hch@infradead.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      1b430bee
  4. 27 7月, 2010 1 次提交
  5. 09 6月, 2010 1 次提交
    • D
      writeback: pay attention to wbc->nr_to_write in write_cache_pages · 0b564927
      Dave Chinner 提交于
      If a filesystem writes more than one page in ->writepage, write_cache_pages
      fails to notice this and continues to attempt writeback when wbc->nr_to_write
      has gone negative - this trace was captured from XFS:
      
          wbc_writeback_start: towrt=1024
          wbc_writepage: towrt=1024
          wbc_writepage: towrt=0
          wbc_writepage: towrt=-1
          wbc_writepage: towrt=-5
          wbc_writepage: towrt=-21
          wbc_writepage: towrt=-85
      
      This has adverse effects on filesystem writeback behaviour. write_cache_pages()
      needs to terminate after a certain number of pages are written, not after a
      certain number of calls to ->writepage are made.  This is a regression
      introduced by 17bc6c30 ("vfs: Add
      no_nrwrite_index_update writeback control flag"), but cannot be reverted
      directly due to subsequent bug fixes that have gone in on top of it.
      Signed-off-by: NDave Chinner <dchinner@redhat.com>
      Reviewed-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      0b564927
  6. 28 5月, 2010 1 次提交
  7. 17 5月, 2010 2 次提交
  8. 01 1月, 2010 1 次提交
  9. 26 11月, 2009 1 次提交
    • L
      tracing: Convert some ext4 events to DEFINE_TRACE · b5eb34c3
      Li Zefan 提交于
      Use DECLARE_EVENT_CLASS to remove duplicate code:
      
         text    data     bss     dec     hex filename
       294695    6104     340  301139   49853 fs/ext4/ext4.o.old
       289983    6104     324  296411   485db fs/ext4/ext4.o
      
      5 events are convertd:
      
        ext4__write_begin: ext4_write_begin, ext4_da_write_begin
        ext4__write_end: ext4_{ordered, writeback, journalled}_write_end
      
      No change in functionality.
      Signed-off-by: NLi Zefan <lizf@cn.fujitsu.com>
      Cc: Theodore Ts'o <tytso@mit.edu>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      LKML-Reference: <4B0E2938.2040708@cn.fujitsu.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      b5eb34c3
  10. 25 11月, 2009 1 次提交
  11. 23 11月, 2009 3 次提交
  12. 30 9月, 2009 3 次提交
  13. 17 9月, 2009 1 次提交
  14. 16 9月, 2009 1 次提交
  15. 15 9月, 2009 1 次提交
  16. 17 9月, 2009 1 次提交
    • T
      ext4: fix tracepoint format string warnings · a3710fd1
      Theodore Ts'o 提交于
      Unlike on some other architectures ino_t is an unsigned int on s390.
      So add an explicit cast to avoid lots of compile warnings:
      
      In file included from include/trace/ftrace.h:285,
                       from include/trace/define_trace.h:61,
                       from include/trace/events/ext4.h:711,
                       from fs/ext4/super.c:50:
      include/trace/events/ext4.h: In function 'ftrace_raw_output_ext4_free_inode':
      include/trace/events/ext4.h:12: warning: format '%lu' expects type 'long unsigned int', but argument 4 has type 'ino_t'
      Signed-off-by: NHeiko Carstens <heiko.carstens@de.ibm.com>
      Signed-off-by: N"Theodore Ts'o" <tytso@mit.edu>
      a3710fd1
  17. 01 9月, 2009 1 次提交
  18. 17 9月, 2009 1 次提交
  19. 13 7月, 2009 1 次提交
    • L
      tracing/events: Move TRACE_SYSTEM outside of include guard · d0b6e04a
      Li Zefan 提交于
      If TRACE_INCLDUE_FILE is defined, <trace/events/TRACE_INCLUDE_FILE.h>
      will be included and compiled, otherwise it will be
      <trace/events/TRACE_SYSTEM.h>
      
      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: NLi 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: NIngo Molnar <mingo@elte.hu>
      d0b6e04a
  20. 15 6月, 2009 1 次提交
  21. 21 6月, 2009 1 次提交
  22. 17 6月, 2009 1 次提交