NeilBrown wrote:
I think I would still recommend using mempools as they are a well tested and understood concept. I think the key difference that you are proposing is that instead of a single mempool with 256 slots preallocated, we have a separate mempool for each client with 4 slots preallocated. I think that would be a good change. The 'struct mempool_s' isn't very large, only about 8 pointers, so havng them per-client is not a big cost.
You also need to create a slab cache for each client - /proc/slabinfo could grow quite a bit.
How about mempool_resize()? We could have a single pool and increase it by 4 for every new client. I would prefer to avoid shrinking the pool when connections are terminated, though. Thus it might be best to track the number of simultaneously active clients and increase the pool when it increases above the previous maximum value.
Martin -- Dr. Martin Wilck PRIMERGY System Software Engineer x86 Server Engineering Fujitsu Technology Solutions GmbH Heinz-Nixdorf-Ring 1 33106 Paderborn, Germany Phone: ++49 5251 525 2796 Fax: ++49 5251 525 2820 Email: martin.wilck@xxxxxxxxxxxxxx Internet: http://ts.fujitsu.com Company Details: http://de.ts.fujitsu.com/imprint.html -- To unsubscribe from this list: send the line "unsubscribe linux-nfs" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html