From owner-svn-src-all@freebsd.org Mon Oct 5 09:20:10 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 30CF7A11C2C; Mon, 5 Oct 2015 09:20:10 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 080E5DDA; Mon, 5 Oct 2015 09:20:10 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t959K99g039986; Mon, 5 Oct 2015 09:20:09 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t959K9aO039985; Mon, 5 Oct 2015 09:20:09 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201510050920.t959K9aO039985@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 5 Oct 2015 09:20:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r288757 - stable/10/sys/cam/ctl X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2015 09:20:10 -0000 Author: mav Date: Mon Oct 5 09:20:09 2015 New Revision: 288757 URL: https://svnweb.freebsd.org/changeset/base/288757 Log: MFC r287784: Implement data/status aggregation for secondary HA node. For short read requests this reduces latency by 30%, reporting command completion after two interlink roundtrips instead of full three. Modified: stable/10/sys/cam/ctl/ctl.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl.c ============================================================================== --- stable/10/sys/cam/ctl/ctl.c Mon Oct 5 09:19:14 2015 (r288756) +++ stable/10/sys/cam/ctl/ctl.c Mon Oct 5 09:20:09 2015 (r288757) @@ -980,6 +980,8 @@ ctl_isc_event_handler(ctl_ha_channel cha * when the datamove is complete. */ io->io_hdr.serializing_sc = msg->hdr.serializing_sc; + if (msg->hdr.status == CTL_SUCCESS) + io->io_hdr.status = msg->hdr.status; if (msg->dt.sg_sequence == 0) { i = msg->dt.kern_sg_entries + @@ -1062,6 +1064,8 @@ ctl_isc_event_handler(ctl_ha_channel cha memcpy(&io->scsiio.sense_data, &msg->scsi.sense_data, msg->scsi.sense_len); + if (msg->hdr.status == CTL_SUCCESS) + io->io_hdr.flags |= CTL_FLAG_STATUS_SENT; } ctl_enqueue_isc(io); break; @@ -12209,6 +12213,7 @@ ctl_datamove(union ctl_io *io) msg.hdr.original_sc = io->io_hdr.original_sc; msg.hdr.serializing_sc = io; msg.hdr.nexus = io->io_hdr.nexus; + msg.hdr.status = io->io_hdr.status; msg.dt.flags = io->io_hdr.flags; /* * We convert everything into a S/G list here. We can't @@ -12592,10 +12597,12 @@ ctl_datamove_remote_xfer(union ctl_io *i * failure. */ if ((rq == NULL) - && ((io->io_hdr.status & CTL_STATUS_MASK) != CTL_STATUS_NONE)) + && ((io->io_hdr.status & CTL_STATUS_MASK) != CTL_STATUS_NONE && + (io->io_hdr.status & CTL_STATUS_MASK) != CTL_SUCCESS)) ctl_set_busy(&io->scsiio); - if ((io->io_hdr.status & CTL_STATUS_MASK) != CTL_STATUS_NONE) { + if ((io->io_hdr.status & CTL_STATUS_MASK) != CTL_STATUS_NONE && + (io->io_hdr.status & CTL_STATUS_MASK) != CTL_SUCCESS) { if (rq != NULL) ctl_dt_req_free(rq);