Re: [EXT] Re: [PATCH v2 04/14] qla2xxx: Optimize NPIV tear down process

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

 



On Thu, 2019-09-26 at 16:56 +0000, Quinn Tran wrote:
>     
>     Are you missing a negation in this last line?
>     Also, what's the point of adding this loop? 
> 
> QT:  good catch.  The idea is to not sleep the full 10Hz, if the
> vref_count already reaches zero or reaches zero under
> 10Hz.  Otherwise, loop/wait for 10Hz.   We're trying to get NPIV tear
> down to go faster.

AFAIU, wait_event_timeout() returns before the timeout has elapsed, if
the tested condition becomes true _and_ the wait queue is woken up. 
Thus the loop shouldn't be necessary. Are you missing a wake_up() call
to vref_waitq somewhere? 

Perhaps you should replace all calls to 

        atomic_dec(&X->vref_count);

with something like

        if (atomic_dec_and_test(&X->vref_count))
                wake_up(&X->vref_waitq);

??

Martin





[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