From patchwork Mon Aug 6 04:51:10 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Douglas Gilbert X-Patchwork-Id: 10556477 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id E9D5513BB for ; Mon, 6 Aug 2018 04:51:27 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D812628FFB for ; Mon, 6 Aug 2018 04:51:27 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CC7F729006; Mon, 6 Aug 2018 04:51:27 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 780DF28FFB for ; Mon, 6 Aug 2018 04:51:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726873AbeHFG6m (ORCPT ); Mon, 6 Aug 2018 02:58:42 -0400 Received: from smtp.infotech.no ([82.134.31.41]:35018 "EHLO smtp.infotech.no" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726276AbeHFG6m (ORCPT ); Mon, 6 Aug 2018 02:58:42 -0400 Received: from localhost (localhost [127.0.0.1]) by smtp.infotech.no (Postfix) with ESMTP id 73248204258; Mon, 6 Aug 2018 06:51:25 +0200 (CEST) X-Virus-Scanned: by amavisd-new-2.6.6 (20110518) (Debian) at infotech.no Received: from smtp.infotech.no ([127.0.0.1]) by localhost (smtp.infotech.no [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id UN7QoE+gQHtn; Mon, 6 Aug 2018 06:51:19 +0200 (CEST) Received: from xtwo70.bingwo.ca (host-45-58-245-67.dyn.295.ca [45.58.245.67]) by smtp.infotech.no (Postfix) with ESMTPA id 74E09204177; Mon, 6 Aug 2018 06:51:17 +0200 (CEST) From: Douglas Gilbert To: linux-scsi@vger.kernel.org Cc: martin.petersen@oracle.com, hare@suse.de, bart.vanassche@wdc.com, jthumshirn@suse.de Subject: [RFC PATCH 0/5] sd: init_command() and sd_done() speed-ups Date: Mon, 6 Aug 2018 00:51:10 -0400 Message-Id: <20180806045115.7725-1-dgilbert@interlog.com> X-Mailer: git-send-email 2.17.1 Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This patchset is against Martin Petersen's (mkp) repository: https://git.kernel.org/pub/scm/linux/kernel/git/mkp/linux.git branch: 4.19/scsi Note: this is not the repository mkp uses for normal SCSI subsystem submissions (whose url ends with .../mkp/scsi.git). Note 2: even though the branch is called "4.19/scsi" it contains a somewhat dated lk 4.17.0-rc1. This patchset is on top of patches already made in this repository (and not in the mainline) to decrease the overhead that the sd driver adds in the sd_init_command() submission and the sd_done() response handling. On my laptop (i5-7200U) the submission path improved from around 380 nanoseconds per submission (mainline: lk 4.18.0-rc7) to 280 nanoseconds (mkp's repo (4.17.0-rc1) with this patchset). There was no measurable improvement from the work on the response path (i.e. sd_done()). It was tested with sgp_dd and the scsi_debug driver. Douglas Gilbert (5): add tweakable bounds_check flag, now off by default break sd_done sense processing out to own function streamline REQ_OP_READ-WRITE access streamline some logical operations make sd_done() REQ_OP_FLUSH handling explicit drivers/scsi/sd.c | 273 +++++++++++++++++++++++++++++----------------- drivers/scsi/sd.h | 1 + 2 files changed, 174 insertions(+), 100 deletions(-)