[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210112175649.1ebbb6e7@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com>
Date: Tue, 12 Jan 2021 17:56:49 -0800
From: Jakub Kicinski <kuba@...nel.org>
To: Sukadev Bhattiprolu <sukadev@...ux.ibm.com>
Cc: Saeed Mahameed <saeed@...nel.org>, netdev@...r.kernel.org,
Dany Madden <drt@...ux.ibm.com>, Lijun Pan <ljp@...ux.ibm.com>,
Rick Lindsley <ricklind@...ux.ibm.com>
Subject: Re: [PATCH net-next v2 5/7] ibmvnic: serialize access to work queue
On Tue, 12 Jan 2021 16:40:49 -0800 Sukadev Bhattiprolu wrote:
> Saeed Mahameed [saeed@...nel.org] wrote:
> > On Tue, 2021-01-12 at 10:14 -0800, Sukadev Bhattiprolu wrote:
>
> <snip>
> > > @@ -5467,7 +5472,15 @@ static int ibmvnic_remove(struct vio_dev *dev)
> > > return -EBUSY;
> > > }
> > >
> > > + /* If ibmvnic_reset() is scheduling a reset, wait for it to
> > > + * finish. Then prevent it from scheduling any more resets
> > > + * and have the reset functions ignore any resets that have
> > > + * already been scheduled.
> > > + */
> > > + spin_lock_irqsave(&adapter->remove_lock, flags);
> > > adapter->state = VNIC_REMOVING;
> > > + spin_unlock_irqrestore(&adapter->remove_lock, flags);
> > > +
> >
> > Why irqsave/restore variants ? are you expecting this spinlock to be
> > held in interruptcontext ?
> >
> > > spin_unlock_irqrestore(&adapter->state_lock, flags);
>
> Good question.
>
> One of the callers of ibmvnic_reset() is the ->ndo_tx_timeout()
> method which gets called from the watchdog timer.
watchdog is a normal timer, so it's gonna run in softirq, you don't
need to mask irqs.
Powered by blists - more mailing lists