Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp3523739ybg; Mon, 28 Oct 2019 14:18:42 -0700 (PDT) X-Google-Smtp-Source: APXvYqwxRZMZP1Ko+9HmOKNlMS0lOIHyWaQjrc/1NxFbs+dC0n2cLsuCyztET8/p0Xkz4GQZsM6I X-Received: by 2002:a17:906:1a13:: with SMTP id i19mr17092082ejf.46.1572297522838; Mon, 28 Oct 2019 14:18:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1572297522; cv=none; d=google.com; s=arc-20160816; b=EK7iWQlGsx61R9O2ryvuHiJ9mvdkBKRN8Uf8C319cggXVQ/LR4t2jP+OA+A8FJIhQI m6VE7ay0mlhW3uBWmE4HnGpQPI5KjHVFtlr39mgaE2g7/U2+NrOW62LNH5VRyX56NlZQ qxjUnQ47F3EIdJSTbb68+eWbD32/TwlTLQdLtadvyw0JDd5CXFqPURBn8VznfI+b9UKl wFCys+0VWklbJm9MmzVMhAZSx60impu2d0N35stq4y7kwmCGavifNcw55f+Dd/U6kwwm c8D2MeprosyTRMyRO8bfZCawmqM1JJ/VP6CJ9I77qGKNf+FHfsjYmvjIlZ3Ufj93qGmj oasQ== 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:dkim-signature; bh=Sa3P8nLwwlTZwyaRaz0s2YzXRegwMv9tr7o9w4K0q3o=; b=GchlalVhFCBhHCVtqVUnYwwgzLgn39mXTiXMfbS6tYhLJuE+A02jWcjIxC5bo4AmKe quiTdtiB87T51oN/gO5cOyzyaa/9bF+SfpA66UQf5HQKjelJ69hR4g86ziB3WMLzS0Kc V6WlV5G8HHXZ5VdCLzY+5Yb4hjz/mIAOPU5gLRygCTSgs+9MGNWtDSzIEGKRI511FZCI z4e9vdsrbrZ9WpgHQmjQ/sR1THZzOTfjvl92fXWnaKqWPMwyif78JToMQ9OfwUQvV7JC b7KCZ6fz8+GSi77lh4Gkmx8q2j62pk8Lez3wZaHSeLJ/UMOVXOT0VVFTw/I2c1eHtmEG 5kGA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=qzBWPnA0; 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 f19si8483212eda.435.2019.10.28.14.18.19; Mon, 28 Oct 2019 14:18:42 -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; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=qzBWPnA0; 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 S1732744AbfJ1Q2Y (ORCPT + 99 others); Mon, 28 Oct 2019 12:28:24 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:46212 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730753AbfJ1Q2X (ORCPT ); Mon, 28 Oct 2019 12:28:23 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=Sa3P8nLwwlTZwyaRaz0s2YzXRegwMv9tr7o9w4K0q3o=; b=qzBWPnA0XzM1xaxsIShT31ME5 A3BnPkqOCf8XCWTUeaR6IQwDXfcdx+lYNJlfk2tXFnrHm/BMTZz+UCZVrsQFb49pHQyrhzvErbOGH sYSq3tNE8IK8iUGQ2WwKpnHbCBmOzKUkXaQN/iZGzxoJgIZFBRM11XeUUKyynEBf3lQjKGWHnRY6Y E8ixajlOv6yLmiwzcUY3oXZtE2ToA8RIOy/t/Z24+7Wv/tHDBRoJE+VrPhgKPpLCMbimKhIUMhGmC LjmYqrp13SV5UBV1V27ocmcIgOdw1KM0+8WH9vtUznT9S/rvsMwmuRHRnzojOdQeNoNAkeUaXmWsS EVvq6M+jg==; Received: from hch by bombadil.infradead.org with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1iP7sO-0004uZ-9Z; Mon, 28 Oct 2019 16:28:16 +0000 Date: Mon, 28 Oct 2019 09:28:16 -0700 From: Christoph Hellwig To: Jason Gunthorpe Cc: Sultan Alsawaf , "Martin K. Petersen" , Thomas Hellstrom , Palmer Dabbelt , Sakari Ailus , Ming Lei , Gal Pressman , linux-kernel@vger.kernel.org Subject: Re: [PATCH] scatterlist: Speed up for_each_sg() loop macro Message-ID: <20191028162816.GA17182@infradead.org> References: <20191025213359.7538-1-sultan@kerneltoast.com> <20191028141734.GD29652@ziepe.ca> <20191028161848.GA32593@sultan-box.localdomain> <20191028162320.GF29652@ziepe.ca> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191028162320.GF29652@ziepe.ca> User-Agent: Mutt/1.12.1 (2019-06-15) X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Oct 28, 2019 at 01:23:20PM -0300, Jason Gunthorpe wrote: > This testing is making assumptions about how 'nr' is used and the > construction of the sgl though > > If any chains are partially populated, or for some reason the driver > starts at a different sgl, it will break. You'll need to somehow > show none of those possibilities are happening. And there is nothing forcing a particular layout, there just happens to be a layout that the generic allocator gives you. I'm not even sure the original patch handles the SCSI case of small inlines segments properly.