Page MenuHomeFreeBSD

pNFS client concurrent mirror I/O patch
ClosedPublic

Authored by rmacklem on Oct 9 2017, 8:15 PM.
Tags
None
Referenced Files
F106165909: D12632.id33850.diff
Thu, Dec 26, 11:37 AM
F106164899: D12632.id33854.diff
Thu, Dec 26, 11:15 AM
F106136132: D12632.diff
Thu, Dec 26, 12:07 AM
Unknown Object (File)
Tue, Dec 17, 1:48 PM
Unknown Object (File)
Fri, Dec 6, 5:02 AM
Unknown Object (File)
Nov 8 2024, 3:36 AM
Unknown Object (File)
Oct 27 2024, 8:37 AM
Unknown Object (File)
Oct 6 2024, 7:38 AM
Subscribers

Details

Summary

When the pNFS client is handling mirrored DS servers via the Flexible
File Layout, it must do writes and commits to all the mirrors.
This patch makes all but the last write/commit to a mirror be done
by a set of threads in a taskqueue, so that the RPCs will be done
concurrently.

Since changing the # of threads dynamically can't be done with
taskqueue, the # of threads is a sysctl which defaults to 32.
I think this is ok, since NFS I/O activity is so bursty that previous
I/O activity doesn't allow for good prediction of when threads
will be needed. As such, a fixed # of threads seems reasonable.

Test Plan

I have been testing this code against the pNFS server in
subversion under projects/pnfs-planb-server and it seems
to work ok. I do not know what the overheads of using
a taskqueue is, but I suspect it is less that doing a kproc_create()/kproc_exit()
for every RPC.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

The previous patch had a fundamental flaw, which was the code slept
waiting on completion of each RPC, serializing them.
This version of the patch doesn't sleep waiting for completion until
after all the RPCs have been started.

This variant of the patch sets the default # of threads to 8 * mp_ncpus instead of
a fixed 32. The sysctl allows a sysadmin to override this default.
Suggested by Julian Eischler.

This revision was automatically updated to reflect the committed changes.