[prev in list] [next in list] [prev in thread] [next in thread]
List: linux-btrace
Subject: Re: Ask a question
From: Tao Ma <tm () tao ! ma>
Date: 2011-06-29 6:20:21
Message-ID: 4E0AC425.3030201 () tao ! ma
[Download RAW message or body]
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?
--
To unsubscribe from this list: send the line "unsubscribe linux-btrace" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic