store_copy branch

From: Adrian Chadd <adrian@dont-contact.us>
Date: Wed, 26 Sep 2007 00:21:10 +0800

I've done a bit of work to reduce the use of memcpy() in the client-side
section. Its in the "store_copy" branch in sourceforge.

The first part of this creates storeClientRef() which is like
storeClientCopy() but it returns a reference-counted mem_node reference+
offset rather than filling a supplied buffer.

I've modified all of client_side.c to use this. So far, so good.

Its only implemented for the memory client case; the code fatal()s
for the disk client case. It won't be hard to fix that - just need
to allocate a mem_node, populate it with the disk code data and
pass that back.

Ideally the storage code should just create/reference mem_nodes out
to whoever wants it, but that level of change is out of scope here.

It saves a couple % of CPU in my very basic tests. There's still quite
a bit to go in cutting out all of the memcpy()ing going on but I'd
like to focus on getting this stuff stable and in production.

oprofile stuff so far: http://www.creative.net.au/node/76

I'd appreciate some feedback please! Its not yet ready for public
testing unless you've got a memory-only test load; I'll send out a
message when it is.

Adrian
Received on Tue Sep 25 2007 - 10:15:57 MDT

This archive was generated by hypermail pre-2.1.9 : Mon Oct 01 2007 - 12:00:05 MDT