Received: by 10.213.65.68 with SMTP id h4csp430419imn; Tue, 27 Mar 2018 01:56:23 -0700 (PDT) X-Google-Smtp-Source: AG47ELu4tNdG80gYU0y5IifA/zYOWKCt/IVdozAH4pOXlRY9VU25cR4RpVnYkF3I7Wqat/67/BWc X-Received: by 2002:a17:902:464:: with SMTP id 91-v6mr43786621ple.126.1522140983431; Tue, 27 Mar 2018 01:56:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522140983; cv=none; d=google.com; s=arc-20160816; b=SDUFgAWlenzFyll9vf/wfD9jY6OEz5HWc1BqzaVEiqn09QW/IBhTG266x7fNp80+Wx xOdOivXcjE7zfuwKrshePVg8eBB90IWR4VClphhNIEtmluiLw+tvf8QRzpzdlOZm7Wmv uWUT3dB4yErhRrpFQ2TXnnKwiKXcu1vLuB98huPefgOxI2jYrkMjjFKFPYCpqurTvPlc 2UWT4X/Uo6UPH5lDzyukxFcq5L8H+Fn8kORiuyM5Zru5GCTiIhMYVu/ktrYJUdOqEZlX KsoFaO3qt771V/FRcNRADcmrM2KTX0th3vyi4iAI+jOP7+VHZru1j7N/7KqZaHJ5knJY w9Vw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:thread-index:content-language :content-transfer-encoding:mime-version:message-id:date:subject :in-reply-to:references:cc:to:from:arc-authentication-results; bh=3Kcy1+9BCj5n59gqdBpz5pNWEcE8tJYAI6BiHWHDVLk=; b=GE+BW/EJQvnf31aAJttTsJETtHWWl6LCgMsY+YK7kx/VN7vDxvFnaHXUr+470PYXim BM4Z/mvdOgTGROLmQ2kedRMK00mwKOWokX4B0QuwHomx9esA8CeRWT2ac9n2WrMZ6D3h YqATRQ9auYgFaqRqzrQQrTZ0v/xAVCSVXloC/5A7L84mlbYxRl5RDEgZXA2BUNkCEO5G 4TPa5C/3u7dR9VhK467NkGANZlfSnMGsYH9G8Yqv8B/u5gW8n3SxUAs7QypSpcTU/TC3 WBef818kM3HT6MMWPH7eW80CqVgWWlHpm3OVdkA7/or4cCpBJz9SZXCiz8sus/6mF7Me iZdg== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u69si601019pfg.292.2018.03.27.01.56.09; Tue, 27 Mar 2018 01:56:23 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752069AbeC0IzS convert rfc822-to-8bit (ORCPT + 99 others); Tue, 27 Mar 2018 04:55:18 -0400 Received: from foss.arm.com ([217.140.101.70]:51050 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751964AbeC0IzP (ORCPT ); Tue, 27 Mar 2018 04:55:15 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 4618F1435; Tue, 27 Mar 2018 01:55:15 -0700 (PDT) Received: from E111387 (unknown [10.46.2.1]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 2509E3F24A; Tue, 27 Mar 2018 01:55:12 -0700 (PDT) From: To: "'Mike Snitzer'" Cc: "'Alasdair Kergon'" , , , , "'Yael Chemla'" , "'Eric Biggers'" 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> In-Reply-To: <20180327010633.GB23487@redhat.com> Subject: RE: [PATCH 2/2] md: dm-verity: allow parallel processing of bio blocks Date: Tue, 27 Mar 2018 11:55:10 +0300 Message-ID: <001201d3c5a9$529b4a10$f7d1de30$@foss.arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8BIT X-Mailer: Microsoft Outlook 16.0 Content-Language: en-il Thread-Index: AQFItUMWMAamikjrHplfXoGQQvWTaQKnGKjBAn9tYqik0LKZYA== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Mike I need to rewrite these patches according to issues you and Eric Biggers mentioned. please drop this v1 patch. Thank you, Yael -----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