Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp1703351imj; Sun, 10 Feb 2019 08:25:46 -0800 (PST) X-Google-Smtp-Source: AHgI3IYpYhfdwu1Lh1y62bHZjTD8QRIqSzFy2q3Nj3C1S5ya8bpCKTmlZhsjkki9PbaT0/Zw6L+M X-Received: by 2002:a63:c54b:: with SMTP id g11mr14137554pgd.441.1549815946503; Sun, 10 Feb 2019 08:25:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549815946; cv=none; d=google.com; s=arc-20160816; b=kQrQGPhYpEO1uImV9jFscJjqhlOCsyqRyG0+6sufVsU5XMXCQnPdoKaY/9vhbab9ql X4skML+vGs/eGvSq8+s9CrOtA/2ihBtxsCGk2lN8lAcWAFrfCR+GNA+QXX071vXn9MPw nQxe+FnXQLbg0vgwhaom6AP0UVF/wgn3LqyqYmP5RwUNoFDiwnOM7avI5Z5oQPGNe8ax ++2wIKKCDbjBfBk3RX8E/f2RG1wgtDVz8XTdO6uykn2qof/0sd1t0sA0+OfQBRcVxRSG x7MeuIhtcB9mZmz76fIq8SxuuZqQL+PtAeFAgGwkHc/uBI0UF6W22J2Jq/yQsUJg6z1q XbFw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:date:cc:to:from:subject:message-id :dkim-signature; bh=Kfqa2Y9OLp+SJSDEO0MyZPgQYAoY/FtZqKqOxN9N5fc=; b=K0hBHd2PwiXS7auV155ZeBRwrIeKAg1MI3j8TW+V4DhokpL+NW40HYwNdDV9mKVzEW MZduccGPxW/z4PI7Hbxh1+9By40m2UVPB5FMfD0zPQCC+CZKsNGdet0XhmSNmLxc7rF+ ZTV5HSJywVqjIKOXZlz2O+fF9J4qgbPiF4bvTh3F+RubegQn1tUzswZwZCtNRKz+OQni pJBFacQfpleR99siDgO+cB79I9HwXrVNIFT69wNX9fNQwx45Wb03C1+k4tLHpSjDRFsC dKkcugDHQIhtjJ/YzGtgkE6edUZzi1onHf+en4afWf3n5qMx/8fMLz8YERPZFZzq4/60 Cr6Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@hansenpartnership.com header.s=20151216 header.b=aHET9FOa; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=hansenpartnership.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z5si7407081pgf.261.2019.02.10.08.25.29; Sun, 10 Feb 2019 08:25:46 -0800 (PST) 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=@hansenpartnership.com header.s=20151216 header.b=aHET9FOa; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=hansenpartnership.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726788AbfBJQZ1 (ORCPT + 99 others); Sun, 10 Feb 2019 11:25:27 -0500 Received: from bedivere.hansenpartnership.com ([66.63.167.143]:38792 "EHLO bedivere.hansenpartnership.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726231AbfBJQZ0 (ORCPT ); Sun, 10 Feb 2019 11:25:26 -0500 Received: from localhost (localhost [127.0.0.1]) by bedivere.hansenpartnership.com (Postfix) with ESMTP id 2BCBD8EE241; Sun, 10 Feb 2019 08:25:26 -0800 (PST) Received: from bedivere.hansenpartnership.com ([127.0.0.1]) by localhost (bedivere.hansenpartnership.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id fz8C-htArOH3; Sun, 10 Feb 2019 08:25:26 -0800 (PST) Received: from [153.66.254.194] (unknown [50.35.68.20]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by bedivere.hansenpartnership.com (Postfix) with ESMTPSA id A07838EE11D; Sun, 10 Feb 2019 08:25:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=hansenpartnership.com; s=20151216; t=1549815925; bh=+AqdrZ9RAxtttyTqX/pJcpzsuQIc4/CvkdL2U3C2ICM=; h=Subject:From:To:Cc:Date:In-Reply-To:References:From; b=aHET9FOa4sb2ObobcyCddLV8zi+Z2hX4y7Zyze+6PbrIglt4wbIQEPHUGO7VsMByH blu4SYOCABn65EMxZN+/SdVdhFiix2gB9Zzs3mM2C/oB/Z6Lkq5snX0O9PbC3GMQd6 8FUlRyiCYgCvTk2gBIaNoGLu6eZJu/TILD/95v7Q= Message-ID: <1549815924.4142.8.camel@HansenPartnership.com> Subject: Re: [5.0-rc5 regression] "scsi: kill off the legacy IO path" causes 5 minute delay during boot on Sun Blade 2500 From: James Bottomley To: Jens Axboe , Mikael Pettersson Cc: Linux SPARC Kernel Mailing List , linux-block@vger.kernel.org, linux-kernel@vger.kernel.org Date: Sun, 10 Feb 2019 08:25:24 -0800 In-Reply-To: <3380ed8e-ae02-96f2-142b-7cce09459df8@kernel.dk> References: <1549736341.2971.7.camel@HansenPartnership.com> <1549813472.4142.3.camel@HansenPartnership.com> <3380ed8e-ae02-96f2-142b-7cce09459df8@kernel.dk> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.26.6 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, 2019-02-10 at 09:05 -0700, Jens Axboe wrote: > On 2/10/19 8:44 AM, James Bottomley wrote: > > On Sun, 2019-02-10 at 10:17 +0100, Mikael Pettersson wrote: > > > On Sat, Feb 9, 2019 at 7:19 PM James Bottomley > > > wrote: > > > > [...] > > > > I think the reason for this is that the block mq path doesn't > > > > feed > > > > the kernel entropy pool correctly, hence the need to install an > > > > entropy gatherer for systems that don't have other good random > > > > number sources. > > > > > > That does sound plausible, I admit I didn't even consider the > > > possibility that the old block I/O path also was an entropy > > > source. > > > > In theory, the new one should be as well since the rotational > > entropy > > collector is on the SCSI completion path. I'd seen the same > > problem > > but had assumed it was something someone had done to our internal > > entropy pool and thus hadn't bisected it. > > The difference is that the old stack included ADD_RANDOM by default, > so this check: > > if (blk_queue_add_random(q)) > add_disk_randomness(req->rq_disk); > > in scsi_end_request() would be true, and we'd add the randomness. For > sd, it seems to set it just fine for non-rotational drives. Could > this be because other devices don't? Maybe the below makes a > difference. No, in both we set it per the rotational parameters of the disk in sd.c:sd_read_block_characteristics() rot = get_unaligned_be16(&buffer[4]); if (rot == 1) { blk_queue_flag_set(QUEUE_FLAG_NONROT, q); blk_queue_flag_clear(QUEUE_FLAG_ADD_RANDOM, q); } else { blk_queue_flag_clear(QUEUE_FLAG_NONROT, q); blk_queue_flag_set(QUEUE_FLAG_ADD_RANDOM, q); } That check wasn't changed by the code removal. Although I suspect it should be unconditional: even SSDs have what would appear as seek latencies at least during writes depending on the time taken to find an erased block or even trigger garbage collection. The entropy collector is good at taking something completely regular and spotting the inconsistencies, so it won't matter that loads of "seeks" are deterministic. James