[Top][All Lists]

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

Re: [PATCH 08/10] scsi/scsi_bus: Add scsi_device_get

From: Maxim Levitsky
Subject: Re: [PATCH 08/10] scsi/scsi_bus: Add scsi_device_get
Date: Wed, 30 Sep 2020 21:04:09 +0300
User-agent: Evolution 3.36.3 (3.36.3-1.fc32)

On Wed, 2020-09-30 at 19:46 +0200, Paolo Bonzini wrote:
> On 30/09/20 16:32, Maxim Levitsky wrote:
> > >   Compared to Maxim's patch, I am avoiding the extra argument
> > >   to do_scsi_device_find by moving the RCU_READ_LOCK_GUARD()
> > >   out of do_scsi_device_find itself.
> > Which is a good idea, although my mindset was like, I got a device,
> > lets just grab a ref to it before it disappears and then do
> > whatever I want.
> Understood, but "I got a device, I know I'm under RCU so it can't
> disappear" is more efficient and just as common.  This also explains the
> difference in patch 7.

Fair point. I am still learing to correctly use RCU.

Best regards,
        Maxim Levitsky
> Paolo

reply via email to

[Prev in Thread] Current Thread [Next in Thread]