From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6774 invoked by alias); 10 Nov 2008 18:23:54 -0000 Received: (qmail 6754 invoked by uid 22791); 10 Nov 2008 18:23:54 -0000 X-Spam-Status: No, hits=0.4 required=5.0 tests=AWL,BAYES_20,J_CHICKENPOX_35,J_CHICKENPOX_36,J_CHICKENPOX_73,KAM_MX,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mx2.redhat.com (HELO mx2.redhat.com) (66.187.237.31) by sourceware.org (qpsmtpd/0.31) with ESMTP; Mon, 10 Nov 2008 18:23:11 +0000 Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id mAAINAhP025391 for ; Mon, 10 Nov 2008 13:23:10 -0500 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx2.corp.redhat.com (8.13.1/8.13.1) with ESMTP id mAAIN9tK030245; Mon, 10 Nov 2008 13:23:09 -0500 Received: from segfault.boston.devel.redhat.com (segfault.boston.devel.redhat.com [10.16.60.26]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id mAAIN86N013558; Mon, 10 Nov 2008 13:23:08 -0500 From: Jeff Moyer To: William Cohen Cc: systemtap@sourceware.org Subject: Re: Simplifying examples by improving vfs tapset References: <4905D5F6.60807@redhat.com> <49187622.1060709@redhat.com> X-PGP-KeyID: 1F78E1B4 X-PGP-CertKey: F6FE 280D 8293 F72C 65FD 5A58 1FF8 A7CA 1F78 E1B4 X-PCLoadLetter: What the f**k does that mean? Date: Mon, 10 Nov 2008 18:23:00 -0000 In-Reply-To: <49187622.1060709@redhat.com> (William Cohen's message of "Mon, 10 Nov 2008 12:57:54 -0500") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Scanned-By: MIMEDefang 2.58 on 172.16.27.26 Mailing-List: contact systemtap-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: systemtap-owner@sourceware.org X-SW-Source: 2008-q4/txt/msg00306.txt.bz2 William Cohen writes: > Jeff Moyer wrote: > >> What about readv and writev? I had modified my local copy of >> disktop.stp to take these into account (hooking into do_readv_writev). >> I will post those updates if you like, once I figure out why I ran into >> a problem with the array assignments. (I had to read from the io_stat >> array before writing to it, otherwise the written values didn't show >> up.) > > I didn't modify the vfs.readv and vfs.writev in the patch. However, it > looks like the same dev and ino variables could be made available for > vfs_writev and vfs_readv. > >> One other improvement that could be made to the script is AIO support. > > There is an example that examines rescheduling during AIO operations: > > http://sources.redhat.com/git/gitweb.cgi?p=systemtap.git;a=blob;f=testsuite/systemtap.examples/io/io_submit.stp; > > What additional support do you see needed for AIO? Perhaps my message was off-topic, as you were focusing on the tapset and I was focusing on the disktop.stp script. Sorry if this caused confusion. Anyway, below are answers to your questions. The disktop.stp script looks at the I/O sizes completed on behalf of a process in order to get a good idea of which processes are issuing the lion's share of I/O on the system. I think the easiest way to cover the AIO case is to instrument fs/aio.c:read_events, since it will be called in the context of the process issuing the I/O (though not necessarily the same thread). This is very different from io_submit.stp, which tries to determine the most frequent causes of scheduling inside of io_submit (a call that processes expect to complete relatively quickly). Cheers, Jeff