1. 27 1月, 2009 1 次提交
  2. 26 1月, 2009 1 次提交
    • A
      blktrace: add ftrace plugin · c71a8961
      Arnaldo Carvalho de Melo 提交于
      Impact: New way of using the blktrace infrastructure
      
      This drops the requirement of userspace utilities to use the blktrace
      facility.
      
      Configuration is done thru sysfs, adding a "trace" directory to the
      partition directory where blktrace can be enabled for the associated
      request_queue.
      
      The same filters present in the IOCTL interface are present as sysfs
      device attributes.
      
      The /sys/block/sdX/sdXN/trace/enable file allows tracing without any
      filters.
      
      The other files in this directory: pid, act_mask, start_lba and end_lba
      can be used with the same meaning as with the IOCTL interface.
      
      Using the sysfs interface will only setup the request_queue->blk_trace
      fields, tracing will only take place when the "blk" tracer is selected
      via the ftrace interface, as in the following example:
      
      To see the trace, one can use the /d/tracing/trace file or the
      /d/tracign/trace_pipe file, with semantics defined in the ftrace
      documentation in Documentation/ftrace.txt.
      
      [root@f10-1 ~]# cat /t/trace
             kjournald-305   [000]  3046.491224:   8,1    A WBS 6367 + 8 <- (8,1) 6304
             kjournald-305   [000]  3046.491227:   8,1    Q   R 6367 + 8 [kjournald]
             kjournald-305   [000]  3046.491236:   8,1    G  RB 6367 + 8 [kjournald]
             kjournald-305   [000]  3046.491239:   8,1    P  NS [kjournald]
             kjournald-305   [000]  3046.491242:   8,1    I RBS 6367 + 8 [kjournald]
             kjournald-305   [000]  3046.491251:   8,1    D  WB 6367 + 8 [kjournald]
             kjournald-305   [000]  3046.491610:   8,1    U  WS [kjournald] 1
                <idle>-0     [000]  3046.511914:   8,1    C  RS 6367 + 8 [6367]
      [root@f10-1 ~]#
      
      The default line context (prefix) format is the one described in the ftrace
      documentation, with the blktrace specific bits using its existing format,
      described in blkparse(8).
      
      If one wants to have the classic blktrace formatting, this is possible by
      using:
      
      [root@f10-1 ~]# echo blk_classic > /t/trace_options
      [root@f10-1 ~]# cat /t/trace
        8,1    0  3046.491224   305  A WBS 6367 + 8 <- (8,1) 6304
        8,1    0  3046.491227   305  Q   R 6367 + 8 [kjournald]
        8,1    0  3046.491236   305  G  RB 6367 + 8 [kjournald]
        8,1    0  3046.491239   305  P  NS [kjournald]
        8,1    0  3046.491242   305  I RBS 6367 + 8 [kjournald]
        8,1    0  3046.491251   305  D  WB 6367 + 8 [kjournald]
        8,1    0  3046.491610   305  U  WS [kjournald] 1
        8,1    0  3046.511914     0  C  RS 6367 + 8 [6367]
      [root@f10-1 ~]#
      
      Using the ftrace standard format allows more flexibility, such
      as the ability of asking for backtraces via trace_options:
      
      [root@f10-1 ~]# echo noblk_classic > /t/trace_options
      [root@f10-1 ~]# echo stacktrace > /t/trace_options
      
      [root@f10-1 ~]# cat /t/trace
             kjournald-305   [000]  3318.826779:   8,1    A WBS 6375 + 8 <- (8,1) 6312
             kjournald-305   [000]  3318.826782:
       <= submit_bio
       <= submit_bh
       <= sync_dirty_buffer
       <= journal_commit_transaction
       <= kjournald
       <= kthread
       <= child_rip
             kjournald-305   [000]  3318.826836:   8,1    Q   R 6375 + 8 [kjournald]
             kjournald-305   [000]  3318.826837:
       <= generic_make_request
       <= submit_bio
       <= submit_bh
       <= sync_dirty_buffer
       <= journal_commit_transaction
       <= kjournald
       <= kthread
      
      Please read the ftrace documentation to use aditional, standardized
      tracing filters such as /d/tracing/trace_cpumask, etc.
      
      See also /d/tracing/trace_mark to add comments in the trace stream,
      that is equivalent to the /d/block/sdaN/msg interface.
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      c71a8961
  3. 26 11月, 2008 1 次提交
  4. 09 10月, 2008 3 次提交
  5. 03 7月, 2008 1 次提交
  6. 13 6月, 2008 1 次提交
  7. 28 5月, 2008 2 次提交
  8. 13 5月, 2008 1 次提交
  9. 28 1月, 2008 1 次提交
  10. 11 1月, 2008 2 次提交
  11. 27 11月, 2007 1 次提交
    • A
      blktrace: Make sure BLKTRACETEARDOWN does the full cleanup. · 35fc51e7
      Aneesh Kumar K.V 提交于
      if blktrace program segfault it will not be able
      to call BLKTRACETEARDOWN. Now if we run the blktrace
      again that would result in a failure to create the
      block/<device> debugfs directory.This will result
      in blk_remove_root() to be called which will set
      blk_tree_root to NULL. But the  debugfs block dir
      still exist because it contain subdirectory.
      
      Now if we try to fix it using BLKTRACETEARDOWN
      it won't work because blk_tree_root is NULL.
      
      Fix the same.
      
      Tested as below
      
      root@qemu-image:/home/kvaneesh/blktrace# ./blktrace  -d /dev/hdc
      Segmentation fault
      root@qemu-image:/home/kvaneesh/blktrace# ./blktrace  -d /dev/hdc
      BLKTRACESETUP: No such file or directory
      Failed to start trace on /dev/hdc
      root@qemu-image:/home/kvaneesh/blktrace# ./blktrace  -k /dev/hdc
      root@qemu-image:/home/kvaneesh/blktrace# ./blktrace  -d /dev/hdc
      Signed-off-by: NAneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
      Signed-off-by: NJens Axboe <jens.axboe@oracle.com>
      35fc51e7
  12. 17 10月, 2007 1 次提交
  13. 10 10月, 2007 1 次提交
  14. 27 7月, 2007 1 次提交
  15. 24 7月, 2007 1 次提交
  16. 13 2月, 2007 1 次提交
  17. 12 2月, 2007 1 次提交
  18. 08 12月, 2006 1 次提交
  19. 04 12月, 2006 2 次提交
  20. 01 12月, 2006 1 次提交
    • O
      [PATCH] blktrace: add timestamp message · be1c6341
      Olaf Kirch 提交于
      This adds a new timestamp message to blktrace, giving the timeofday when
      we starting tracing. This helps user space correlate block trace events
      with eg an application strace.
      
      This requires a (compatible) update to blkparse. The changed blkparse
      is still able to process traces generated by older kernels, and older
      versions of blkparse should silently ignore the new records (because
      they have a pid of 0).
      Signed-off-by: NOlaf Kirch <okir@suse.de>
      Signed-off-by: NJens Axboe <jens.axboe@oracle.com>
      be1c6341
  21. 01 10月, 2006 3 次提交
  22. 30 9月, 2006 1 次提交
  23. 27 9月, 2006 1 次提交
    • T
      [PATCH] inode_diet: Replace inode.u.generic_ip with inode.i_private · 8e18e294
      Theodore Ts'o 提交于
      The following patches reduce the size of the VFS inode structure by 28 bytes
      on a UP x86.  (It would be more on an x86_64 system).  This is a 10% reduction
      in the inode size on a UP kernel that is configured in a production mode
      (i.e., with no spinlock or other debugging functions enabled; if you want to
      save memory taken up by in-core inodes, the first thing you should do is
      disable the debugging options; they are responsible for a huge amount of bloat
      in the VFS inode structure).
      
      This patch:
      
      The filesystem or device-specific pointer in the inode is inside a union,
      which is pretty pointless given that all 30+ users of this field have been
      using the void pointer.  Get rid of the union and rename it to i_private, with
      a comment to explain who is allowed to use the void pointer.  This is just a
      cleanup, but it allows us to reuse the union 'u' for something something where
      the union will actually be used.
      
      [judith@osdl.org: powerpc build fix]
      Signed-off-by: N"Theodore Ts'o" <tytso@mit.edu>
      Signed-off-by: NJudith Lebzelter <judith@osdl.org>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      8e18e294
  24. 25 7月, 2006 1 次提交
  25. 06 7月, 2006 1 次提交
  26. 01 7月, 2006 1 次提交
  27. 24 3月, 2006 1 次提交