Skip to contentSkip to conversation

Add write throttling to NFS client

PATCH [email protected] 1 participant 1 message Mar 1, 2004 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

På su , 29/02/2004 klokka 20:33, skreiv Shantanu Goel:

Quoted 24 lines

I have been experimenting with the RPC scheduler and found the changes I am about to describe to be quite effective. A flag has been added to rpc_wait_queue called "batch". This changes the way sleep/wakeup are implemented. When the flag is set, tasks are grouped by the id of the initiating process and a batch count is set for each process. The scheduler will keep submitting tasks for the same process until the batch count goes to zero. At that point, the scheduler switches to another process. The transport layer uses this feature for the backlog queue. This has the following advantages.

- It is independant of the type of request.
- It prevents any process from completely hogging the request slots.
- It prevents any process from starving completely.
- It does not require any changes to NFS layer so that takes care of layering violations.
- The # async requests is limited only by the amount of memory available.
- The batching allows large read/write requests to be sent back to back.

Quoted 3 lines

Patch is attached.

Comments?

Woah.... What's all this struct rpc_pid stuff?

If you need to sort everything by pid (...and I'm not convinced that is such a great idea) then you can do it by adding 1 extra linked list in the struct rpc_task to act as the head of the pid list... No need for any fragile allocation of extra structures from inside __rpc_add_wait_queue().

The question is, though, why are you sorting stuff by pid? That isn't even defined for most of the asynchronous requests. As I said before: in a low memory situation it is silly to be treating a new readdir() or a stat() in preference to a bunch of queued pdflush or memory allocator requests. Why not sort them by inode number instead?
...or have well defined priority levels for each type of request (as Chuck suggested) so that we can schedule them properly. Synchronous requests already have all the properties that you listed. All you need to do is to schedule them independently of the asynchronous tasks.

Cheers,
Trond

-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now. Build and deploy apps & Web services for Linux with a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click
_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs