From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.saout.de ([127.0.0.1]) by localhost (mail.saout.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id s2DAUT08Feua for ; Wed, 9 Nov 2011 21:58:25 +0100 (CET) Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mail.saout.de (Postfix) with ESMTP for ; Wed, 9 Nov 2011 21:58:24 +0100 (CET) Message-ID: <4EBAE96A.3020800@redhat.com> Date: Wed, 09 Nov 2011 21:58:18 +0100 From: Milan Broz MIME-Version: 1.0 References: <4EBAC310.6010104@alexanderkoch.net> <4EBACC60.4010907@redhat.com> <4EBAE1B0.2030205@alexanderkoch.net> In-Reply-To: <4EBAE1B0.2030205@alexanderkoch.net> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: Re: [dm-crypt] Testing TRIM with hdparm on dm-crypt List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alexander Koch Cc: dm-crypt@saout.de On 11/09/2011 09:25 PM, Alexander Koch wrote: >> You should be also able to trace discard (and other) block requests >> using blktrace/btrace, this should be really more user friendly :) > > I tried blktrace but didn't know which event to track. Supported list > includes READ, WRITE, BARRIER, SYNC, QUEUE, REQUEUE, ISSUE, COMPLETE, FS > and PC. man blkparse and search for "discard", it should be marked 'D' something like here, here using simulated scsi_debug device # modprobe scsi_debug dev_size_mb=16 sector_size=512 num_tgts=1 lbpu=1 # btrace /dev/ -a issue ... 8,144 1 19 0.002461433 2146 D D 0 + 32768 [mkfs.ext4] # fstrim ... 8,144 1 52 8.372211281 2239 D D 162 + 2 [fstrim] 8,144 1 53 8.382095450 2239 D D 168 + 28 [fstrim] 8,144 1 54 8.391463509 2239 D D 1222 + 15164 [fstrim] 8,144 1 55 8.402445119 2239 D D 18564 + 14204 [fstrim] Milan