Received: by 10.213.65.68 with SMTP id h4csp649918imn; Tue, 27 Mar 2018 06:21:23 -0700 (PDT) X-Google-Smtp-Source: AIpwx49r5LEl+RebMQ8/hTUkhbq6APBRCBZ6Sif8A8FSYo2Bi9Abr5bpxgz95Af+Y4E2REGmDBZJ X-Received: by 10.167.130.76 with SMTP id e12mr4193327pfn.192.1522156883035; Tue, 27 Mar 2018 06:21:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522156883; cv=none; d=google.com; s=arc-20160816; b=BSs0UOrAajLhYO1uyfGwNIin9ODax2T91TpLgoGTYxqtW5ZdY44BVybMVBT77u56ba 6gffJFfB1NGwXh3/R4QLOhQDLdHpXTfKXho/mLqRVnrkG9Wo2ft1VsJc8lPrRDpJ9eL5 iXaqkbeo68yHd5rxODsTibRleUje7zPuxw0tLTqP1zsEM+9PjGIPp5lMSY3Fm+8mdam5 NQGxpdkIS83drPp0jk59FDhzEBwVEwHcW91vlGmzO+7eVlm2pVHjWqWDNKaFM6riTapx tJQoVUBvhrT+D4Fjrx/7azO1fTk0C+0Oh/91mqjJLKA4oe3M5KA/O7sTdLSgh8/GCLoE dOVA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=bRxNgwlx8FM0WGqHoIoji0SSx2ulpiL35bkCbTkJCPE=; b=tnBsx2mepAkH8Ub8sLxRKQhrXcSZkubbGaWRzUwHLAi+0N1h1eeXm+C/YchOvkZDKm RNlIBj3vslPjCiqWE2wzFXxlfCQOwzyPv6cOk+6TtxQBGEsv+RsVAN9N2wRTukD1quG6 dmubDI+mni4UpH8Lgvy96zOHPGv7RFTShI6rqT3INN3RDcY/W03GwCcIR/Fmc+4AGzg9 2CTZH+keccHezWNcjrgyk/XEFdsIlUQwE9aLJiFDmpo/KIVZBdEL+aHqsNRRGrIE640q qlG9RyJoEFAHLtjqZp5nFnDDj61NEpugDnUAHD4FiCnGMvhbgKwQ2KbGcAh5JnRT+lj5 Nd/g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d68si931256pfl.337.2018.03.27.06.21.08; Tue, 27 Mar 2018 06:21:22 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752870AbeC0NQo (ORCPT + 99 others); Tue, 27 Mar 2018 09:16:44 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:42216 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752841AbeC0NQk (ORCPT ); Tue, 27 Mar 2018 09:16:40 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 1D571F8FE3; Tue, 27 Mar 2018 13:16:40 +0000 (UTC) Received: from localhost (unknown [10.18.25.149]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 81CDD6F9E6; Tue, 27 Mar 2018 13:16:37 +0000 (UTC) Date: Tue, 27 Mar 2018 09:16:37 -0400 From: Mike Snitzer To: yael.chemla@foss.arm.com Cc: 'Alasdair Kergon' , dm-devel@redhat.com, linux-kernel@vger.kernel.org, ofir.drang@gmail.com, 'Yael Chemla' , 'Eric Biggers' Subject: Re: [PATCH 2/2] md: dm-verity: allow parallel processing of bio blocks Message-ID: <20180327131636.GA26832@redhat.com> References: <1522003290-27243-1-git-send-email-yael.chemla@foss.arm.com> <1522003290-27243-2-git-send-email-yael.chemla@foss.arm.com> <20180327010633.GB23487@redhat.com> <001201d3c5a9$529b4a10$f7d1de30$@foss.arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <001201d3c5a9$529b4a10$f7d1de30$@foss.arm.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.1]); Tue, 27 Mar 2018 13:16:40 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.1]); Tue, 27 Mar 2018 13:16:40 +0000 (UTC) for IP:'10.11.54.5' DOMAIN:'int-mx05.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'msnitzer@redhat.com' RCPT:'' Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Mar 27 2018 at 4:55am -0400, yael.chemla@foss.arm.com wrote: > Hi Mike > I need to rewrite these patches according to issues you and Eric Biggers mentioned. > please drop this v1 patch. They've been dropped. BUT please do note that the patches I pushed to linux-dm.git were rebased ontop of the 'check_at_most_once' patch. I never did get an answer about how the sg array is free'd in certain error paths (see "FIXME:" in the 2nd patch). Also, I fixed some issues I saw in error paths, and lots of formatting. I'll be pretty frustrated if you submit v2 that is blind to the kinds of changes I made. I'll send you a private copy of the patches just so you have them for your reference. Thanks, Mike > -----Original Message----- > From: Mike Snitzer > Sent: Tuesday, 27 March 2018 4:07 > To: Yael Chemla > Cc: Alasdair Kergon ; dm-devel@redhat.com; linux-kernel@vger.kernel.org; ofir.drang@gmail.com; Yael Chemla > Subject: Re: [PATCH 2/2] md: dm-verity: allow parallel processing of bio blocks > > On Sun, Mar 25 2018 at 2:41pm -0400, > Yael Chemla wrote: > > > Allow parallel processing of bio blocks by moving to async. > > completion handling. This allows for better resource utilization of > > both HW and software based hash tfm and therefore better performance > > in many cases, depending on the specific tfm in use. > > > > Tested on ARM32 (zynq board) and ARM64 (Juno board). > > Time of cat command was measured on a filesystem with various file sizes. > > 12% performance improvement when HW based hash was used (ccree driver). > > SW based hash showed less than 1% improvement. > > CPU utilization when HW based hash was used presented 10% less > > context switch, 4% less cycles and 7% less instructions. No > > difference in CPU utilization noticed with SW based hash. > > > > Signed-off-by: Yael Chemla > > This one had various issues. I've fixed most of what I saw and staged in linux-next (purely for build test coverage purposes). I may drop this patch if others disagree with it (or my sg deallocation in the error path question isn't answered). > > I've staged the changes here (and in linux-next via 'for-next'): > https://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm.git/log/?h=dm-4.17 > > I switched all the new GFP_KERNEL uses to GFP_NOIO. The fact that you're doing allocations at all (per IO) is bad enough. Using GFP_KERNEL is a serious liability (risk of deadlock if dm-verity were to be used for something like.. swap.. weird setup but possible). > > But the gfp flags aside, the need for additional memory and the expectation of scalable async parallel IO is potentially at odds with changes like this (that I just staged, and had to rebase your 2 patches ontop of): > https://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm.git/commit/?h=dm-4.17&id=a89f6a2cfec86fba7a115642ff082cb4e9450ea6 > > So I'm particulalry interested to hear from google folks to understand if they are OK with your proposed verity async crypto API use. > > Mike >