Re: [PATCH] Deadlock during heavy write activity to userspace NFSserver on local NFS mount

From: Avi Kivity
Date: Wed Jul 28 2004 - 07:20:28 EST


Mikulas Patocka wrote:

Hi!

And if the NFS server is waiting for some lock that is held by another
process that is wating for kswapd...? It won't help.

The solution would be a limit for dirty pages on NFS --- if you say that
less than 1/8 of memory might be dirty NFS pages, than you can keep system
stable even if NFS writes starve. If you export NFS filesystem via NFSD
again, even this woudn't help, but there's no fix for this case.



Oh yes there is. You can have different limits for each export, with the nested export having a lower limit.

Say the first export may dirty at most 200MB, and the nested export at most 180MB. So even if there are heavy writes against the nested export, it can always make progress by writing to the outer export, and if the system has more than 200MB of memory, the external export can make progress by writing out to the filesystem.

That is essentially my suggestion regarding reservation levels, but expressed in allocate-at-most terms instead of leave-at-least. And nested NFS is a fine example to show the current problems.

(of course, when nesting NFS one also needs to reserve threads so each export has at least one thread available to service it. but that's another story)

--
Do not meddle in the internals of kernels, for they are subtle and quick to panic.


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/