public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: Jens Axboe <axboe@kernel.dk>
To: James Bottomley <James.Bottomley@HansenPartnership.com>,
	linux-scsi <linux-scsi@vger.kernel.org>
Cc: Xuewei Zhang <xueweiz@google.com>,
	linux-block@vger.kernel.org, linux-kernel@vger.kernel.org,
	Mikael Pettersson <mikpelinux@gmail.com>
Subject: Re: [PATCH] scsi: sd: fix entropy gathering for most rotational disks
Date: Tue, 12 Feb 2019 09:06:29 -0700	[thread overview]
Message-ID: <e9a411a2-49e2-4897-4e02-1cf790465cbd@kernel.dk> (raw)
In-Reply-To: <1549987525.3173.17.camel@HansenPartnership.com>

On 2/12/19 9:05 AM, James Bottomley wrote:
> The problem is that the default for MQ is not to gather entropy,
> whereas the default for the legacy queue was always to gather it.  The
> original attempt to fix entropy gathering for rotational disks under MQ
> added an else branch in sd_read_block_characteristics(). 
> Unfortunately, the entire check isn't reached if the device has no
> characteristics VPD page.  Since this page was only introduced in SBC-3 
> and its optional anyway, most less expensive rotational disks don't
> have one, meaning they all stopped gathering entropy when we made MQ
> the default.  In a wholly unrelated change, openssl and openssh won't
> function until the random number generator is initialised, meaning lots
> of people have been seeing large delays before they could log into
> systems with default MQ kernels due to this lack of entropy, because it
> now can take tens of minutes to initialise the kernel random number
> generator.
> 
> The fix is to set the non-rotational and add-randomness flags
> unconditionally early on in the disk initialization path, so they can
> be reset only if the device actually reports being non-rotational via
> the VPD page.

Reviewed-by: Jens Axboe <axboe@kernel.dk>

-- 
Jens Axboe

  reply	other threads:[~2019-02-12 16:06 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-12 16:05 [PATCH] scsi: sd: fix entropy gathering for most rotational disks James Bottomley
2019-02-12 16:06 ` Jens Axboe [this message]
2019-02-12 16:59   ` Martin K. Petersen
2019-02-12 20:00     ` Xuewei Zhang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e9a411a2-49e2-4897-4e02-1cf790465cbd@kernel.dk \
    --to=axboe@kernel.dk \
    --cc=James.Bottomley@HansenPartnership.com \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=mikpelinux@gmail.com \
    --cc=xueweiz@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox