NeilBrown 2030ca560c nfsd: degraded slot-count more gracefully as allocation nears exhaustion.
This original code in nfsd4_get_drc_mem() would hand out 30
slots (approximately NFSD_MAX_MEM_PER_SESSION bytes at slightly
over 2K per slot) to each requesting client until it ran out
of space, then it would possibly give one last client a reduced
allocation, then fail the allocation.

Since commit de766e570413 ("nfsd: give out fewer session slots as
limit approaches") the last 90 slots to be given to about 12
clients with quickly reducing slot counts (better than just 3
clients).  This still seems unnecessarily hasty.
A subsequent patch allows over-allocation so every client gets
at least one slot, but that might be a bit restrictive.

The requested number of nfsd threads is the best guide we have to the
expected number of clients, so use that - if it is at least 8.

256 threads on a 256Meg machine - which is a lot for a tiny machine -
would result in nfsd_drc_max_mem being 2Meg, so 8K (3 slots) would be
available for the first client, and over 200 clients would get more
than 1 slot.  So I don't think this change will be too debilitating on
poorly configured machines, though it does mean that a sensible
configuration is a little more important.

Signed-off-by: NeilBrown <neilb@suse.de>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
2019-09-20 12:31:51 -04:00
..
2019-07-26 11:08:37 -07:00
2019-07-18 18:14:47 -05:00
2019-07-12 17:37:53 -07:00
2019-07-12 16:54:37 -07:00
2019-07-12 16:54:37 -07:00
2019-07-25 11:05:11 +02:00
2019-07-03 17:52:09 -04:00
2019-07-12 16:54:37 -07:00
2019-06-21 09:58:42 -07:00
\n
2019-07-10 20:27:07 -07:00
\n
2019-07-10 20:09:17 -07:00
\n
2019-07-10 20:27:07 -07:00
2019-07-18 11:18:00 -07:00
2019-07-26 10:32:12 -07:00
2019-07-15 21:20:52 -07:00
2019-05-21 08:23:41 +01:00
2019-07-19 11:38:12 -07:00
2019-04-08 18:21:02 -05:00
2019-03-08 14:48:40 -08:00
2019-07-12 16:54:37 -07:00
2019-07-26 10:32:12 -07:00
2019-02-07 16:38:35 +01:00
2019-07-04 22:01:58 -04:00