RE: [EXT] Re: [PATCH] qedi: Fix cmd_cleanup_cmpl counter mismatch issue.

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

 



> >
> > Now that I am explaining it, it felt instead of pre-incrementing
> > cmd_cleanup_cmpl, it should be atomic variable. Do see any issue ?
> >
> 
> Yeah, atomic.
> 
> And then I guess for this:
> 
>         if (qedi_conn->cmd_cleanup_req > 0) {
>                 QEDI_INFO(&qedi->dbg_ctx, QEDI_LOG_TID,
>                           "Freeing tid=0x%x for cid=0x%x\n",
>                           cqe->itid, qedi_conn->iscsi_conn_id);
>                 qedi_conn->cmd_cleanup_cmpl++;
>                 wake_up(&qedi_conn->wait_queue);
> 
> 
> we might only want to do the wake_up once:
> 
> if (atomic_inc_return(&qedi_conn->cmd_cleanup_cmpl) ==
>     qedi_conn->cmd_cleanup_req) {
> 
> ?

Agree, I will share the updated patch.




[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