[OpenAFS-devel] reproducible problem during cache flush

Neulinger, Nathan nneul@umr.edu
Tue, 30 Jul 2002 14:26:14 -0500


That fixes it for me. Iozone running REALLY slow, but that's completely
to be expected with such a tiny cache. It does correctly handle the
cache full situation now without any hangs.

I've got watchdog turned off temporarily on my samba servers, hopefully
one of them will crash (how often do you hear that?) and I'll be able to
do the kdump to see if it might be the same symptom. If it is, I'll try
putting this build on them.=20

-- Nathan

------------------------------------------------------------
Nathan Neulinger                       EMail:  nneul@umr.edu
University of Missouri - Rolla         Phone: (573) 341-4841
Computing Services                       Fax: (573) 341-4216


> -----Original Message-----
> From: Nickolai Zeldovich [mailto:kolya@MIT.EDU]=20
> Sent: Tuesday, July 30, 2002 1:55 PM
> To: openafs-devel@openafs.org
> Subject: Re: [OpenAFS-devel] reproducible problem during cache flush
>=20
>=20
> > Applying this (with hand fixes to get it to apply on the=20
> trunk + protos
> > branches, which have some locking+dcache changes in that=20
> vicinity) does
> > NOT appear to fix the problem for me.
>=20
> Ah, I think I see at least one problem: we were failing to release
> our own write-locked dcache entry before calling afs_DoPartialWrite.
> Since dcache locking isn't on the 1.2.x branch, Chas didn't run into
> the same problem.  Here's a cummulative diff against the trunk that
> fixes at least that bug; see if you find any more? :-)
>=20
> -- kolya
>=20
> --- src/afs/VNOPS/afs_vnop_read.c	2002/07/13 03:28:28	1.14
> +++ src/afs/VNOPS/afs_vnop_read.c	2002/07/30 18:51:43
> @@ -330,7 +330,7 @@
>       */
>      if (tdc) {
>  	ReleaseReadLock(&tdc->lock);
> -#ifndef	AFS_VM_RDWR_ENV
> +#if !defined(AFS_VM_RDWR_ENV) || defined(AFS_LINUX22_ENV)
>  	/* try to queue prefetch, if needed */
>  	if (!noLock) {
>  	    afs_PrefetchChunk(avc, tdc, acred, &treq);
> @@ -559,7 +559,7 @@
> =20
>  	    if (!noLock) {
>  		ReleaseReadLock(&avc->lock);
> -#ifndef	AFS_VM_RDWR_ENV
> +#if !defined(AFS_VM_RDWR_ENV) || defined(AFS_LINUX22_ENV)
>  		if (!(code =3D afs_InitReq(&treq, acred))) {
>  		    if (!(tdc->mflags & DFNextStarted))
>  			afs_PrefetchChunk(avc, tdc, acred, &treq);
> @@ -982,7 +982,7 @@
>       */
>      if (tdc) {
>  	ReleaseReadLock(&tdc->lock);
> -#ifndef	AFS_VM_RDWR_ENV
> +#if !defined(AFS_VM_RDWR_ENV) || defined(AFS_LINUX22_ENV)
>  	/* try to queue prefetch, if needed */
>  	if (!noLock) {
>  	    if (!(tdc->mflags & DFNextStarted))
>=20
> --- src/afs/VNOPS/afs_vnop_write.c	2002/04/02 17:35:03	1.20
> +++ src/afs/VNOPS/afs_vnop_write.c	2002/07/30 18:51:43
> @@ -297,7 +297,9 @@
>  	    avc->m.Length =3D filePos;
>  	}
>  #endif
> -#ifndef AFS_VM_RDWR_ENV
> +	ReleaseWriteLock(&tdc->lock);
> +	afs_PutDCache(tdc);
> +#if !defined(AFS_VM_RDWR_ENV) || defined(AFS_LINUX22_ENV)
>  	/*
>  	 * If write is implemented via VM, afs_DoPartialWrite()=20
> is called from
>  	 * the high-level write op.
> @@ -306,14 +308,10 @@
>  	    code =3D afs_DoPartialWrite(avc, &treq);
>  	    if (code) {
>  		error =3D code;
> -		ReleaseWriteLock(&tdc->lock);
> -		afs_PutDCache(tdc);
>  		break;
>  	    }
>  	}
>  #endif
> -	ReleaseWriteLock(&tdc->lock);
> -	afs_PutDCache(tdc);
>      }
>  #ifndef	AFS_VM_RDWR_ENV
>      afs_FakeClose(avc, acred);
> @@ -618,7 +616,9 @@
>  	}
>  #endif
>  	osi_UFSClose(tfile);
> -#ifndef	AFS_VM_RDWR_ENV
> +	ReleaseWriteLock(&tdc->lock);
> +	afs_PutDCache(tdc);
> +#if !defined(AFS_VM_RDWR_ENV) || defined(AFS_LINUX22_ENV)
>  	/*
>  	 * If write is implemented via VM, afs_DoPartialWrite()=20
> is called from
>  	 * the high-level write op.
> @@ -627,14 +627,10 @@
>  	    code =3D afs_DoPartialWrite(avc, &treq);
>  	    if (code) {
>  		error =3D code;
> -		ReleaseWriteLock(&tdc->lock);
> -		afs_PutDCache(tdc);
>  		break;
>  	    }
>  	}
>  #endif
> -	ReleaseWriteLock(&tdc->lock);
> -	afs_PutDCache(tdc);
>      }
>  #ifndef	AFS_VM_RDWR_ENV
>      afs_FakeClose(avc, acred);
> _______________________________________________
> OpenAFS-devel mailing list
> OpenAFS-devel@openafs.org
> https://lists.openafs.org/mailman/listinfo/openafs-devel
>=20