fcntl spinlock in Linux?

J. Bruce Fields bfields at fieldses.org
Tue Jan 29 15:03:58 MST 2013


On Tue, Jan 29, 2013 at 10:51:33PM +0100, Volker Lendecke wrote:
> On Tue, Jan 29, 2013 at 04:37:03PM -0500, J. Bruce Fields wrote:
> > It's probably also easiest to fix.
> 
> Including deadlock detection? I guess this would have to
> look at all locks held by a thread, possibly on different
> inodes.

As a way of at least testing whether this is your problem, we could rip
out the deadlock detection entirely.

May be worth trying to do that upstream too.  (Though last time I tried
I think it got shot down.)

But even if it has to be there, it doesn't have to be very good.  So we
could fire it off only after someone is blocked for a very long time.
And whatever lock it has to acquire to traverse the lock graph could be
as expensive as we'd like.

--b.

>  
> > I'm not sure exactly what you mean here.  Waiters are on the fl_block
> > list of the lock that they're waiting on, and on a global list (for
> > deadlock detection).  They're not on the i_flock list.
> > 
> > Another possible problem is that waiters are all woken up on unlock or
> > downgrade, when most of them may end up just blocking again immediately.
> 
> Sure, that is a problem. But if you give up complete
> randomness you might run into fairness troubles. You have to
> schedule by some means and this might determine certain
> behaviour that apps would start to depend on.
> 
> Volker
> 
> -- 
> SerNet GmbH, Bahnhofsallee 1b, 37081 Göttingen
> phone: +49-551-370000-0, fax: +49-551-370000-9
> AG Göttingen, HRB 2816, GF: Dr. Johannes Loxen
> http://www.sernet.de, mailto:kontakt at sernet.de
> 
> **********************************************************
> visit us at CeBIT: March 5th - 9th 2013, hall 6, booth E15
> all about SAMBA and verinice, firewalls, Linux and Windows
> free tickets available via email here : cebit at sernet.com !
> **********************************************************


More information about the samba-technical mailing list