good catch on the aiocb stuff avery; that one has been in there for years i would guess.

rob

Avery Ching wrote:
On Thu, 2006-05-18 at 17:26 -0500, Robert Latham wrote:
Thanks for the patches.  tracking down these bugs can be a big pain.
good job, man.  just a few questions.

On Thu, May 18, 2006 at 03:44:28PM -0600, Avery Ching wrote:
small_io_total_bytes_fix.patch:

Fixed an issue with the small I/O total size being passed to the
trove_bstream_write_list(). The uint32_t was being casted to (TROVE_size *)&s_op->req->u.small_io.total_bytes on line 162 of
small_io.sm.
If you are going to change the type of 'total_bytes', don't forget
you'll have to change the encode_PVFS_servreq_small_io and
decode_PVFS_servreq_small_io macros, too.

You're right that this might affect other stuff.  I think I guess the
encode and decode functions will need to be changed.  Okay, fixed.  I've
attached another patch that does this and changes it to PVFS_size.  I
think that's it hopefully...

process_multiple_aiocbs.patch:

Fixed the dbpf_bstream_listio_convert() function to actually handle more
than a single aiocb at a time.  This should boost noncontiguous I/O
performance quite a bit.
Can you help me understand why your changes work?  What is making the
existing code return too early?   I'm not saying you did it wrong, of
course.  it's just code i don't know very well.


In most cases (actually all that I know of) mem_count = 1.  This means
that when it passes through the while loop it breaks out even if it
isn't finished since it is oom.  Therefore it was only doing a single
aiocb at a time.  By changing the break conditional and updating the
cur_mem_size and cur_stream_size, we can see where we really need to
break out of the while loop (when it is oos or oom AND there are no
bytes left in the current piece).  Hope that helps!

==rob   


------------------------------------------------------------------------

? module.mk
Index: pvfs2-req-proto.h
===================================================================
RCS file: /anoncvs/pvfs2/src/proto/pvfs2-req-proto.h,v
retrieving revision 1.138
diff -u -r1.138 pvfs2-req-proto.h
--- pvfs2-req-proto.h   24 Jan 2006 21:33:24 -0000      1.138
+++ pvfs2-req-proto.h   18 May 2006 23:03:38 -0000
@@ -953,7 +953,7 @@
     PVFS_offset offsets[SMALL_IO_MAX_SEGMENTS];
     PVFS_size sizes[SMALL_IO_MAX_SEGMENTS];
- uint32_t total_bytes;
+    PVFS_size total_bytes; /* changed from int32_t */
     void * buffer;
 };
@@ -968,7 +968,7 @@
     encode_PINT_Request(pptr, &(x)->file_req); \
     encode_PVFS_offset(pptr, &(x)->file_req_offset); \
     encode_PVFS_size(pptr, &(x)->aggregate_size); \
-    encode_uint32_t(pptr, &(x)->total_bytes); \
+    encode_PVFS_size(pptr, &(x)->total_bytes); \
     encode_skip4(pptr,); \
     if ((x)->io_type == PVFS_IO_WRITE) \
     { \
@@ -994,7 +994,7 @@
     PINT_request_decode((x)->file_req); /* unpacks the pointers */ \
     decode_PVFS_offset(pptr, &(x)->file_req_offset); \
     decode_PVFS_size(pptr, &(x)->aggregate_size); \
-    decode_uint32_t(pptr, &(x)->total_bytes); \
+    decode_PVFS_size(pptr, &(x)->total_bytes); \
     decode_skip4(pptr,); \
     if ((x)->io_type == PVFS_IO_WRITE) \
     { \

------------------------------------------------------------------------

_______________________________________________
Pvfs2-developers mailing list
Pvfs2-developers@beowulf-underground.org
http://www.beowulf-underground.org/mailman/listinfo/pvfs2-developers
_______________________________________________
Pvfs2-developers mailing list
Pvfs2-developers@beowulf-underground.org
http://www.beowulf-underground.org/mailman/listinfo/pvfs2-developers

Reply via email to