fcntl spinlock in Linux?

Jeff Layton jlayton at redhat.com
Wed Aug 14 06:43:03 MDT 2013


On Tue, 13 Aug 2013 17:15:43 -0400
Alex Korobkin <korobkin+smb at gmail.com> wrote:

> Hi all,
> 
> I found this discussion here, while troubleshooting an issue with kernel
> getting stuck in spin_lock() when a Samba 3.6-based printserver serves
> multiple Windows clients.
> https://lists.samba.org/archive/samba-technical/2013-January/090122.html
> 
> The issue is hard to reproduce. All I can see is random printservers
> crashing once in several days, with kernel (v3.2.5) being stuck in the same
> spin_lock function.
> 

Hmmm...getting stuck on a spinlock is not generally something that
causes a crash. Are they actually crashing or just getting hung on that
lock? Do you know what spinlock it is? Have a stack trace maybe?

> The discussion suggests this patch to try with the kernel:
> https://lists.samba.org/archive/samba-technical/2013-January/090224.html
> 
> I'm not very confident about patching the kernel, and curious if there is
> anything I could try to mitigate it on Samba's side. What would you
> recommend?
> 

The 3.11 kernel will be getting a first round of patches that breaks up
the global file_lock_lock spinlock into a per-inode lock for the most
part, and makes some other scalability improvements. Without knowing
what specific problem you're having I can't really say whether those
changes will help you however.

I'm also working on a set of patches to help address the thundering
herd problem when a lock is released. That was the main problem that
Volker saw. I have a scheme to address that too and a set of patches,
but it's 3.12 material at best (and probably more like 3.13).

-- 
Jeff Layton <jlayton at redhat.com>


More information about the samba-technical mailing list