From owner-freebsd-hackers@FreeBSD.ORG Tue Sep 6 08:50:13 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 72C8F16A41F for ; Tue, 6 Sep 2005 08:50:13 +0000 (GMT) (envelope-from nikhildharashivkar@gmail.com) Received: from rproxy.gmail.com (rproxy.gmail.com [64.233.170.202]) by mx1.FreeBSD.org (Postfix) with ESMTP id 940D843D72 for ; Tue, 6 Sep 2005 08:50:07 +0000 (GMT) (envelope-from nikhildharashivkar@gmail.com) Received: by rproxy.gmail.com with SMTP id r35so949256rna for ; Tue, 06 Sep 2005 01:50:06 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=B0kfD1DkNejNi7kMKCxasYbR9MWCVHITZsZ8mOLkIYd62pwvuYIvmFR/MOX5tCTTVSos69pQu+0fFWHKYCU3AEzvYfeZPnfGx7XDrM1UICahXt4aWbshHlMjTgqI4EFAzWVUhuTWORLlLNLJl2FVwuBYz+Gny3SXrVKw0w4+7C8= Received: by 10.38.151.48 with SMTP id y48mr541908rnd; Tue, 06 Sep 2005 01:50:06 -0700 (PDT) Received: by 10.38.12.59 with HTTP; Tue, 6 Sep 2005 01:50:06 -0700 (PDT) Message-ID: <17db6d3a05090601501cb43d96@mail.gmail.com> Date: Tue, 6 Sep 2005 14:20:06 +0530 From: Nikhil Dharashivkar To: Peter Jeremy In-Reply-To: <17db6d3a050906014048e2045b@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <17db6d3a0509051000622868bc@mail.gmail.com> <431C8D5B.7080309@samsco.org> <431C92F2.9090104@persistent.co.in> <431C93DD.20402@samsco.org> <17db6d3a0509052203b1da14a@mail.gmail.com> <20050906081855.GA26550@cirb503493.alcatel.com.au> <17db6d3a050906014048e2045b@mail.gmail.com> Cc: freebsd-hackers@freebsd.org Subject: Re: Adding new option to ktrace X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Sep 2005 08:50:13 -0000 Sorry it's struct bio instead of struct dio. On 9/6/05, Nikhil Dharashivkar wrote: > Yes, it is ok if i loose data in ktrace queue when crash occurs. > Basically, I want to give an Disk IO trace support to ktrace on > FreeBSD. > So, what I am thinking to use struct dio in dastrategy > routine to trace the IO. > I 'll use this struct to generate ktr_request. Throught > ktr_writerequest it will be written in ktrace.out . > Is it possible ? >=20 >=20 >=20 > On 9/6/05, Peter Jeremy wrote: > > On Tue, 2005-Sep-06 10:33:53 +0530, Nikhil Dharashivkar wrote: > > > Thanks for replying me. Basically what happend, while testing > > >scsi driver on freebsd, at some point it crashes. So, there is no way > > >to know how much IO is performed. To know the IO state just before the > > >driver fails, i selected ktrace to print IO information whatever i ll > > >get from dastrategy routine. > > > > It's not clear how ktrace is going to help here. The ktrXXX(9) > > functions place ktr_request events in a queue. A kernel thread then > > dumps the queue entries into a file via the normal buffer cache. The > > data on disk is typically about 30 seconds behind real time. If the > > system crashes, you will lose any events that are still in the buffer > > cache or ktr_todo queue. > > > > Another problem is that since ktrace generates disk I/O, it is likely > > to disturb your testing. > > > > A better approach would seem to be to build a circular buffer and > > store the I/O requests in the buffer. When the system crashes, you > > can look at the last entries in the buffer. > > > > -- > > Peter Jeremy > > >=20 >=20 > -- > Thanks and Regards, > Nikhil. >=20 --=20 Thanks and Regards, Nikhil.