[OpenAFS-devel] Linux and memory mapped files hang the client, particularly when the client is OpenMosix.

Derrick J Brashear shadow@dementia.org
Thu, 10 Jul 2003 16:15:52 -0400 (EDT)


On Thu, 10 Jul 2003, George Talbot wrote:

> Hi,
>
> We have a problem here with clients that make heavy use of mmap() on
> files stored on an AFS server.  The program doing the mmap() access will
> hang, as will top, ps, etc.  I'm using Linux kernel 2.4.20, with OpenAFS
> 1.2.8, and OpenMosix, though I don't think it's OpenMosix, because if I
> recompile the kernel without OpenMosix, I still get hangs, just not as
> frequently.
>
> So I found this patch:
>
> https://lists.openafs.org/pipermail/openafs-devel/2002-December/003624.html

The patch we ended up applying to the head only, and not to any 1.2.x yet,
was:
http://www.openafs.org/cgi-bin/wdelta/linux-execsorwrites-at-close-20030328?diff&f=u

> This patch does not work for us.  I did some further investigation of
> where the program is hanging.  The programs hang in
> afs_linux_vma_close() right when this function tries to acquire a write
[]

> At this point afs_linux_vma_close() gets called because the application
> is unmapping the file, acquires the AFS_GLOCK(), and blocks trying to
> acquire the shared lock.
>
> Then, I believe that afs_GetDCache() runs again after the read
> completes, tries to acquire the AFS_GLOCK() and blocks.

I will look at this soon unless someone beats me to it.