On Tue, 2018-10-16 at 01:19 -0400, Martin K. Petersen wrote:
> Bart,
> 
> > During the 2018 edition of LSF/MM there was a session about increasing
> > SCSI disk probing concurrency. This patch series implements what has
> > been proposed during that session, namely: - Make sure that the driver
> > core is aware of asynchronous SCSI LUN probing.  - Avoid unnecessary
> > serialization between sd_probe() and sd_remove() because this could
> > lead to a deadlock.
> 
> I like it.
> 
> What kind of testing have you done with $BIGNUM devices? Got any numbers
> to share?

Hi Martin,

For the following test:

modprobe -r scsi_debug; time modprobe scsi_debug delay=0 max_luns=256

I obtained the following time measurements:
* Kernel 4.15.0: 2.2s.
* Kernel 4.19-rc6 with this patch series applied: 2.3s.

This is not what I had expected. I think this small increase is because the
current sd code scans multiple LUNs associated with the same SCSI host
concurrently while apparently the device core scans such LUNs sequentially.
>From the driver core:

void __device_attach_async_helper(void *_dev, async_cookie_t cookie)
{
        [ ... ]
        bus_for_each_drv(dev->bus, NULL, &data, __device_attach_driver);
        [ ... ]
}

static int __device_attach(struct device *dev, bool allow_async)
{
        [ ... ]
                        async_schedule(__device_attach_async_helper, dev);
        [ ... ]
}

Do you want me to look into modifying __device_attach_async_helper() such
that it calls __device_attach_driver() concurrently instead of sequentially
in case of multiple LUNs?

Thanks,

Bart.

Reply via email to