Search Linux Wireless

Re: [PATCH] mt76: usb: reduce locking in mt76u_tx_tasklet

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

 



On Mon, Mar 25, 2019 at 02:00:36PM +0100, Lorenzo Bianconi wrote:
> > On Sun, Mar 24, 2019 at 03:51:43PM +0100, Lorenzo Bianconi wrote:
> > > +		int idx;
> > > +
> > >  		sq = &dev->q_tx[i];
> > >  		q = sq->q;
> > >  
> > > -		spin_lock_bh(&q->lock);
> > > -		while (true) {
> > > -			if (!q->entry[q->head].done || !q->queued)
> > > +		while (q->queued > n_queued) {
> > > +			if (!q->entry[q->head].done)
> > >  				break;
> > If you place done = false here you will not need additional idx
> > variable.
> 
> As Felix suggested, I would set done to false at the end of the loop, after
> tx_complete_skb
Why this is needed? 

> > >  			dev->drv->tx_complete_skb(dev, i, &entry);
> > > -			spin_lock_bh(&q->lock);
> > > +			q->entry[idx].done = false;
> > >  		}
> > >  
> > > +		spin_lock_bh(&q->lock);
> > This patch does not apply for me as there is missing
> > mt76_txq_schedule(dev, sq);
> 
> Sorry I forgot to mention this patch is based on
> https://patchwork.kernel.org/patch/10856027/. Have you applied it?
No.

Stanislaw




[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Wireless Regulations]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux