linux-nfs / nfsd

Linux kernel source tree
Other
0 stars 0 forks source link

Implement CB_RECALL_ANY #17

Closed chucklever closed 7 months ago

chucklever commented 7 months ago

This was bugzilla.linux-nfs.org 368

[Chuck Lever 2021-09-19 16:50:14 UTC] We currently have an unconfigurable hard global limit on the number of delegations (grep for num_delegations). It grants delegations up to the limit, then stops granting them when it hits the limit.

I've never gotten complaints about it but it seems suboptimal. Better might be something like:

You can imagine all sorts of variations. It'd be nice to have some workloads to help decide on a sensible policy.

Clients would need to implement CB_RECALL_ANY, and the server implementation would need to tolerate clients that do not.

chucklever commented 7 months ago

[Chuck Lever 2022-01-21 19:09:42 UTC] We'll need to start by coming up with a metric to assess how much adding this feature improves things.

In general it would be useful to have some measure of how much delegations are helping. For example, time how long a kernel compile takes. This is especially interesting because the client might avoid waiting for re-opening header files.

Setting the total number of allowed delegations to a small number would help us examine whether the client and server are making smart choices about which delegations to return and which to retain.

chucklever commented 7 months ago

[Chuck Lever 2022-09-12 23:06:02 UTC] Another option would be to set up a work queue that is kicked when the server initially comes under memory pressure. The worker can start sending CB_RECALL_ANY requests to each active client. The client can then choose zero or more delegations to return, which can release memory pinned on the server.

chucklever commented 7 months ago

[Chuck Lever 2023-03-09 15:25:56 UTC] CB_RECALL_ANY has been implemented in v6.2.