Re: [PATCH 0/1] random vs blk-mq

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 04/25/2014 08:03 AM, Theodore Ts'o wrote:
> On Fri, Apr 25, 2014 at 12:36:10AM -0700, Christoph Hellwig wrote:
>> But this also brings up an interesting question:  blk-mq currently
>> does not set QUEUE_FLAG_ADD_RANDOM in the default queue flags, so
>> simply converting a driver to blk-mq will mean it stops contributing
>> to the random pool.  Do we need a more fine grained way to control
>> this, especially for SCSI?
> 
> In general, more fine grained control is always good.
> 
> But getting the defaults right is even more important.  It occurs to
> me that what might make sense is to turn on QUEUE_FLAG_ADD_RANDOM if
> we know that it is a rotational disk.  But in the case where we know
> it's a SSD or a NVMe, it's likely that add_disk_randomness() is not
> going to do much in the way that's useful, since we estimate entropy
> credits based on the jiffies delta, so if we interrupts more
> frequently than the 10ms, we're not going to get any entropy credit
> anyway.

This is exactly why the flag was added in the first place:

commit e2e1a148bc45855816ae6b4692ce29d0020fa22e
Author: Jens Axboe <jaxboe@xxxxxxxxxxxx>
Date:   Wed Jun 9 10:42:09 2010 +0200

    block: add sysfs knob for turning off disk entropy contributions

    There are two reasons for doing this:

    - On SSD disks, the completion times aren't as random as they
      are for rotational drives. So it's questionable whether they
      should contribute to the random pool in the first place.

    - Calling add_disk_randomness() has a lot of overhead.

-- 
Jens Axboe

--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux