Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753930AbZDNIxK (ORCPT ); Tue, 14 Apr 2009 04:53:10 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751627AbZDNIwz (ORCPT ); Tue, 14 Apr 2009 04:52:55 -0400 Received: from cn.fujitsu.com ([222.73.24.84]:59744 "EHLO song.cn.fujitsu.com" rhost-flags-OK-FAIL-OK-OK) by vger.kernel.org with ESMTP id S1751427AbZDNIwy (ORCPT ); Tue, 14 Apr 2009 04:52:54 -0400 Message-ID: <49E44F15.9030906@cn.fujitsu.com> Date: Tue, 14 Apr 2009 16:53:41 +0800 From: Li Zefan User-Agent: Thunderbird 2.0.0.9 (X11/20071115) MIME-Version: 1.0 To: Ingo Molnar CC: Steven Rostedt , Tom Zanussi , Jens Axboe , Arnaldo Carvalho de Melo , "Theodore Ts'o" , Shawn Du , LKML , linux-btrace@vger.kernel.org Subject: Re: PATCH 1/3] blktrace: support per-partition tracing References: <49E42620.4050701@cn.fujitsu.com> <20090414080919.GB27003@elte.hu> <49E448F6.5010506@cn.fujitsu.com> <20090414083856.GF27003@elte.hu> In-Reply-To: <20090414083856.GF27003@elte.hu> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1465 Lines: 44 >>> Lets note that this approach still has the (long existing) >>> limitation that only one device can be block-traced at a time. >>> >> No, both userspace blktrace and ftrace-plugin trace can trace >> more than one device at a time. >> >> # btrace /dev/sda /dev/dm-0 >> >> or >> >> # echo 1 > /sys/block/sda/trace/enable >> # echo 1 > /sys/block/dm-0/trace/enable > > When they are independent - but not multiple partitions at a time: > The only way to trace multipl partitions is to trace the whole sda, or set trace/start_lsa and trace/end_lsa properly. > [root@aldebaran ~]# echo 1 > /sys/block/sda/sda1/trace/enable > [root@aldebaran ~]# echo 1 > /sys/block/sda/sda2/trace/enable > -bash: echo: write error: Device or resource busy That's because struct blk_trace is attached to struct request_queue, sda1 and sda2 share the same rq: # echo 1 > /sys/block/sda/sda1/trace/enable # cat /sys/block/sda/sda1/trace/enable 1 # cat /sys/block/sda/sda2/trace/enable 1 > [root@aldebaran ~]# > > Nor did i see any "trace all block IO in the system" kind of > functionality in blktrace. (or maybe there's one that i missed?) > Right, and the only way to do this is 'blktrace sda sdb sdc ...' -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/