Recently (or not so recently, it's been almost 2 years), the nfs-ganesha
project implemented capability to utilize asynchronous non-blocking I/O
to storage backends to prevent thread starvation. The assumption is that
the backend provides non-blocking I/O with a callback mechanism to
notify nfs-ganesha when the I/O is complete so that nfs-ganesha can
subsequently asynchronously respond to the client indicating I/O completion.
Ceph looks like it is structured to allow for such with Context objects
having finish and complete methods that allow the I/O path to notify
completion. In general libcephfs seems to use some form of condition
variable Context to block and wait for this notification. This would be
relatively easy to replace with a call back Context.
However, libcephfs does use ObjectCacher and sets the
block_writes_upfront flag which seems to make any writes that go through
ObjectCacher to block using an internal condition variable and not
utilize the onfreespace Context object (which maybe should have been
I'm wondering what the implication of setting block_writes_upfront to
false would be for libcephs beyond needing to assure an onfreespace
Context object is passed.
Show replies by date