RE: SCSI adapter: how to freeze and thaw I/O on hibernation?

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

 



> From: Ming Lei <tom.leiming@xxxxxxxxx>
> Sent: Wednesday, May 29, 2019 7:57 PM
> On Thu, May 23, 2019 at 11:18 AM Dexuan Cui <decui@xxxxxxxxxxxxx> wrote:
> > ...
> > I checked some PCI HBA drivers, and they use scsi_block_requests(), but
> > as I described above, I don't know how setting a flag can prevent another
> > CPU from submitting I/O requests.
> >
> scsi_device_quiesce() has been called by scsi_dev_type_suspend() to prevent
> any non-pm request from entering queue.

Oh, yes, you're right! I think I overlooked this function. So it looks all the sdevs
are suspended and resumed automatically in drivers/scsi/scsi_pm.c, and the
low level SCSI adapter driver only needs to suspend/resume the state of the
adapter. 

But why do we need to call scsi_block_requests() in some low level SCSI adapter
drivers's .suspend? e.g. in mpt3sas_driver's scsih_suspend(): if no new I/O
requests can be submitted from the sdevs in the hibernation scenario, can you
please explain why we need the scsi_block_requests() here?

> Or do you still see IO requests coming during hibernation?
No. I just didn't realize how scsi_bus_pm_ops works. Thanks for your reply!

Thanks,
-- Dexuan




[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