Linux btrace development
 help / color / mirror / Atom feed
From: Tao Ma <tm@tao.ma>
To: linux-btrace@vger.kernel.org
Subject: Re: Ask a question
Date: Wed, 29 Jun 2011 06:20:21 +0000	[thread overview]
Message-ID: <4E0AC425.3030201@tao.ma> (raw)
In-Reply-To: <201106291407157819892@gmail.com>

On 06/29/2011 02:07 PM, majianpeng wrote:
>    Hi all:
>          At present,I wanted to use blktrace.So I readed source and founded the problem.
>          Following is my step:
>          1:mount  -t debugfs debugfs /sys/kernel/debug
>          2:blktrace -d /dev/sdb &
>             $pid
>          3:kill -9 $pid
>          I found some file in /sys/kernel/debug/block.
You shouldn't use -9 to kill it directly. use -2 so that blktrace can
capture the signal and exit as expected.

Having said that, blktrace -k /dev/sdb should help in this case.

Thanks
Tao
>          
> 	     If a btrace is ruing,but I call ioctl(BLKTRACETEARDOWN) 
> 		case BLKTRACETEARDOWN:
>                ret = blk_trace_remove(q);
> 		int blk_trace_remove(struct request_queue *q)
>  297 {               
>  298         struct blk_trace *bt;
>  299 
>  300         bt = xchg(&q->blk_trace, NULL);
>  301         if (!bt)
>  302                 return -EINVAL;
>  303                 
>  304         if (bt->trace_state != Blktrace_running)
>  305                 blk_trace_cleanup(bt);
>  306                 
>  307         return 0;
>  308 }       
>         But the btrace is in blktrace_running, so bt did not cleanup.
>         When and Who cleanup btrace?

      reply	other threads:[~2011-06-29  6:20 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-29  6:07 Ask a question majianpeng
2011-06-29  6:20 ` Tao Ma [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4E0AC425.3030201@tao.ma \
    --to=tm@tao.ma \
    --cc=linux-btrace@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox