From patchwork Thu Mar 26 22:15:00 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Disseldorp X-Patchwork-Id: 11461333 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id B9E3D1668 for ; Thu, 26 Mar 2020 22:15:12 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id A461220658 for ; Thu, 26 Mar 2020 22:15:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726954AbgCZWPM (ORCPT ); Thu, 26 Mar 2020 18:15:12 -0400 Received: from mx2.suse.de ([195.135.220.15]:56040 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726296AbgCZWPM (ORCPT ); Thu, 26 Mar 2020 18:15:12 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 8BD91ABBD; Thu, 26 Mar 2020 22:15:10 +0000 (UTC) From: David Disseldorp To: target-devel@vger.kernel.org Cc: linux-scsi@vger.kernel.org, martin.petersen@oracle.com, bvanassche@acm.org Subject: [PATCH v2 0/5] scsi: target: Date: Thu, 26 Mar 2020 23:15:00 +0100 Message-Id: <20200326221505.5303-1-ddiss@suse.de> X-Mailer: git-send-email 2.16.4 Sender: target-devel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: target-devel@vger.kernel.org These changes remove unnecessary heap allocations in the XCOPY READ/WRITE dispatch loop. Synthetic benchmarks on my laptop using the libiscsi iscsi-dd utility (--xcopy --max 1 --blocks 65535 src=dst) against a target backed by an 8G zram (DEBUG_KMEMLEAK=y) iblock backstore (avg across four runs) show: before: 5.30845G/s after: 5.99056G/s (approx. +12.8%) Changes since v1: - drop RFC - rework 3/5 and 5/5 following Christoph's feedback Feedback appreciated. Cheers, David ---------------------------------------------------------------- David Disseldorp (5): scsi: target: use #def for xcopy descriptor len scsi: target: drop xcopy DISK BLOCK LENGTH debug scsi: target: avoid per-loop XCOPY buffer allocations scsi: target: increase XCOPY I/O size scsi: target: use the stack for XCOPY passthrough cmds drivers/target/target_core_xcopy.c | 160 ++++++++++------------------- drivers/target/target_core_xcopy.h | 9 +- 2 files changed, 55 insertions(+), 114 deletions(-)