[Pvfs2-cvs] commit by slang in pvfs2/src/io/job: job-desc-queue.c job-desc-queue.h job.c job.h thread-mgr.c

CVS commit program cvs at parl.clemson.edu
Mon Apr 7 12:31:26 EDT 2008


Update of /projects/cvsroot/pvfs2/src/io/job
In directory parlweb1:/tmp/cvs-serv1608/src/io/job

Modified Files:
      Tag: he-branch
	job-desc-queue.c job-desc-queue.h job.c job.h thread-mgr.c 
Log Message:
hints and events.


Index: job-desc-queue.c
===================================================================
RCS file: /projects/cvsroot/pvfs2/src/io/job/job-desc-queue.c,v
diff -p -u -r1.18 -r1.18.10.1
--- job-desc-queue.c	11 Oct 2007 23:11:33 -0000	1.18
+++ job-desc-queue.c	7 Apr 2008 16:31:26 -0000	1.18.10.1
@@ -16,6 +16,7 @@
 #include "job-desc-queue.h"
 #include "gossip.h"
 #include "id-generator.h"
+#include "pint-util.h"
 
 /***************************************************************
  * Visible functions
@@ -41,6 +42,7 @@ struct job_desc *alloc_job_desc(int type
     id_gen_safe_register(&(jd->job_id), jd);
 
     jd->type = type;
+
     return (jd);
 };
 
@@ -92,7 +94,7 @@ void job_desc_q_cleanup(job_desc_q_p jdq
             qlist_for_each_safe(iterator, scratch, jdqp)
             {
                 tmp_job_desc = qlist_entry(iterator, struct job_desc,
-                        job_desc_q_link); 
+                        job_desc_q_link);
                 /* qlist_for_each_safe lets us iterate and remove nodes.  no
                  * need to adjust pointers as we are freeing everything */
                 free(tmp_job_desc);

Index: job-desc-queue.h
===================================================================
RCS file: /projects/cvsroot/pvfs2/src/io/job/job-desc-queue.h,v
diff -p -u -r1.26 -r1.26.70.1
--- job-desc-queue.h	7 Dec 2004 15:09:29 -0000	1.26
+++ job-desc-queue.h	7 Apr 2008 16:31:26 -0000	1.26.70.1
@@ -17,7 +17,6 @@
 #include "trove-types.h"
 #include "src/server/request-scheduler/request-scheduler.h"
 #include "thread-mgr.h"
-#include "pvfs2-event.h"
 
 /* describes BMI operations */
 struct bmi_desc
@@ -99,7 +98,7 @@ struct job_desc
     job_context_id context_id;  /* context */
     struct PINT_thread_mgr_bmi_callback bmi_callback;  /* callback information */
     struct PINT_thread_mgr_trove_callback trove_callback;  /* callback information */
-    enum PVFS_event_op event_type;
+    PVFS_hint hints;
 
     /* union of information for lower level interfaces */
     union

Index: job.c
===================================================================
RCS file: /projects/cvsroot/pvfs2/src/io/job/job.c,v
diff -p -u -r1.181 -r1.181.2.1
--- job.c	4 Apr 2008 17:57:37 -0000	1.181
+++ job.c	7 Apr 2008 16:31:26 -0000	1.181.2.1
@@ -23,17 +23,8 @@
 #include "trove.h"
 #include "gossip.h"
 #include "id-generator.h"
-#include "pint-event.h"
 #include "job-time-mgr.h"
 
-#define JOB_EVENT_START(__op, __id) \
- PINT_event_timestamp(PVFS_EVENT_API_JOB, __op, 0, __id, \
- PVFS_EVENT_FLAG_START)
-
-#define JOB_EVENT_END(__op, __size, __id) \
- PINT_event_timestamp(PVFS_EVENT_API_JOB, __op, __size, __id, \
- PVFS_EVENT_FLAG_END)
-
 /* contexts for use within the job interface */
 static bmi_context_id global_bmi_context = -1;
 #ifdef __PVFS2_TROVE_SUPPORT__
@@ -323,7 +314,8 @@ int job_bmi_send(PVFS_BMI_addr_t addr,
                  job_status_s * out_status_p,
                  job_id_t * id,
                  job_context_id context_id,
-                 int timeout_sec)
+                 int timeout_sec,
+                 PVFS_hint hints)
 {
     /* post a bmi send.  If it completes (or fails) immediately, then
      * return and fill in the status structure.  If it needs to be tested
@@ -350,20 +342,21 @@ int job_bmi_send(PVFS_BMI_addr_t addr,
     jd->bmi_callback.fn = bmi_thread_mgr_callback;
     jd->bmi_callback.data = (void*)jd;
     user_ptr_internal = &jd->bmi_callback;
-    JOB_EVENT_START(PVFS_EVENT_BMI_SEND, jd->job_id);
+
+    jd->hints = hints;
 
     /* post appropriate type of send */
     if (!send_unexpected)
     {
         ret = BMI_post_send(&(jd->u.bmi.id), addr, buffer, size,
-                            buffer_type, tag, user_ptr_internal, 
-                            global_bmi_context);
+                            buffer_type, tag, user_ptr_internal,
+                            global_bmi_context, hints);
     }
     else
     {
         ret = BMI_post_sendunexpected(&(jd->u.bmi.id), addr,
                                       buffer, size, buffer_type, tag,
-                                      user_ptr_internal, global_bmi_context);
+                                      user_ptr_internal, global_bmi_context, hints);
     }
 
     if (ret < 0)
@@ -371,7 +364,6 @@ int job_bmi_send(PVFS_BMI_addr_t addr,
         /* error posting */
         out_status_p->error_code = ret;
         out_status_p->status_user_tag = status_user_tag;
-        JOB_EVENT_END(PVFS_EVENT_BMI_SEND, 0, jd->job_id);
         dealloc_job_desc(jd);
         jd = NULL;
         return (1);
@@ -383,18 +375,16 @@ int job_bmi_send(PVFS_BMI_addr_t addr,
         out_status_p->error_code = 0;
         out_status_p->status_user_tag = status_user_tag;
         out_status_p->actual_size = size;
-        JOB_EVENT_END(PVFS_EVENT_BMI_SEND, size, jd->job_id);
         dealloc_job_desc(jd);
         jd = NULL;
         return (ret);
     }
 
     /* if we fall to this point, the job did not immediately complete and
-     * we must queue up to test it later 
+     * we must queue up to test it later
      */
     *id = jd->job_id;
     bmi_pending_count++;
-    jd->event_type = PVFS_EVENT_BMI_SEND;
 
     return(job_time_mgr_add(jd, timeout_sec));
 }
@@ -420,7 +410,8 @@ int job_bmi_send_list(PVFS_BMI_addr_t ad
                       job_status_s * out_status_p,
                       job_id_t * id,
                       job_context_id context_id,
-                      int timeout_sec)
+                      int timeout_sec,
+                      PVFS_hint hints)
 {
     /* post a bmi send.  If it completes (or fails) immediately, then
      * return and fill in the status structure.  If it needs to be tested
@@ -447,7 +438,8 @@ int job_bmi_send_list(PVFS_BMI_addr_t ad
     jd->bmi_callback.fn = bmi_thread_mgr_callback;
     jd->bmi_callback.data = (void*)jd;
     user_ptr_internal = &jd->bmi_callback;
-    JOB_EVENT_START(PVFS_EVENT_BMI_SEND, jd->job_id);
+
+    jd->hints = hints;
 
     /* post appropriate type of send */
     if (!send_unexpected)
@@ -455,7 +447,7 @@ int job_bmi_send_list(PVFS_BMI_addr_t ad
         ret = BMI_post_send_list(&(jd->u.bmi.id), addr,
                                  (const void **) buffer_list, size_list,
                                  list_count, total_size, buffer_type,
-                                 tag, user_ptr_internal, global_bmi_context);
+                                 tag, user_ptr_internal, global_bmi_context, hints);
     }
     else
     {
@@ -463,7 +455,7 @@ int job_bmi_send_list(PVFS_BMI_addr_t ad
                                            (const void **) buffer_list,
                                            size_list, list_count,
                                            total_size, buffer_type, tag,
-                                           user_ptr_internal, global_bmi_context);
+                                           user_ptr_internal, global_bmi_context, hints);
     }
 
     if (ret < 0)
@@ -471,7 +463,6 @@ int job_bmi_send_list(PVFS_BMI_addr_t ad
         /* error posting */
         out_status_p->error_code = ret;
         out_status_p->status_user_tag = status_user_tag;
-        JOB_EVENT_END(PVFS_EVENT_BMI_SEND, 0, jd->job_id);
         dealloc_job_desc(jd);
         jd = NULL;
         return (1);
@@ -483,18 +474,16 @@ int job_bmi_send_list(PVFS_BMI_addr_t ad
         out_status_p->error_code = 0;
         out_status_p->status_user_tag = status_user_tag;
         out_status_p->actual_size = total_size;
-        JOB_EVENT_END(PVFS_EVENT_BMI_SEND, total_size, jd->job_id);
         dealloc_job_desc(jd);
         jd = NULL;
         return (ret);
     }
 
     /* if we fall to this point, the job did not immediately complete and
-     * we must queue up to test it later 
+     * we must queue up to test it later
      */
     *id = jd->job_id;
     bmi_pending_count++;
-    jd->event_type = PVFS_EVENT_BMI_SEND;
     return(job_time_mgr_add(jd, timeout_sec));
 }
 
@@ -515,7 +504,8 @@ int job_bmi_recv(PVFS_BMI_addr_t addr,
                  job_status_s * out_status_p,
                  job_id_t * id,
                  job_context_id context_id,
-                 int timeout_sec)
+                 int timeout_sec,
+                 PVFS_hint hints)
 {
     /* post a bmi recv.  If it completes (or fails) immediately, then
      * return and fill in the status structure.  If it needs to be tested
@@ -534,24 +524,25 @@ int job_bmi_recv(PVFS_BMI_addr_t addr,
         out_status_p->error_code = -PVFS_ENOMEM;
         return 1;
     }
+    jd->hints = hints;
     jd->job_user_ptr = user_ptr;
     jd->context_id = context_id;
     jd->status_user_tag = status_user_tag;
     jd->bmi_callback.fn = bmi_thread_mgr_callback;
     jd->bmi_callback.data = (void*)jd;
     user_ptr_internal = &jd->bmi_callback;
-    JOB_EVENT_START(PVFS_EVENT_BMI_RECV, jd->job_id);
+
 
     ret = BMI_post_recv(&(jd->u.bmi.id), addr, buffer, size,
-                        &(jd->u.bmi.actual_size), buffer_type, tag, 
-                        user_ptr_internal, 
-                        global_bmi_context);
+                        &(jd->u.bmi.actual_size), buffer_type, tag,
+                        user_ptr_internal,
+                        global_bmi_context,
+                        hints);
     if (ret < 0)
     {
         /* error posting */
         out_status_p->error_code = ret;
         out_status_p->status_user_tag = status_user_tag;
-        JOB_EVENT_END(PVFS_EVENT_BMI_RECV, 0, jd->job_id);
         dealloc_job_desc(jd);
         jd = NULL;
         return (1);
@@ -563,19 +554,16 @@ int job_bmi_recv(PVFS_BMI_addr_t addr,
         out_status_p->error_code = 0;
         out_status_p->status_user_tag = status_user_tag;
         out_status_p->actual_size = jd->u.bmi.actual_size;
-        JOB_EVENT_END(PVFS_EVENT_BMI_RECV, out_status_p->actual_size, 
-            jd->job_id);
         dealloc_job_desc(jd);
         jd = NULL;
         return (ret);
     }
 
     /* if we fall to this point, the job did not immediately complete and
-     * we must queue up to test it later 
+     * we must queue up to test it later
      */
     *id = jd->job_id;
     bmi_pending_count++;
-    jd->event_type = PVFS_EVENT_BMI_RECV;
 
     return(job_time_mgr_add(jd, timeout_sec));
 }
@@ -600,7 +588,8 @@ int job_bmi_recv_list(PVFS_BMI_addr_t ad
                       job_status_s * out_status_p,
                       job_id_t * id,
                       job_context_id context_id,
-                      int timeout_sec)
+                      int timeout_sec,
+                      PVFS_hint hints)
 {
 
     /* post a bmi recv.  If it completes (or fails) immediately, then
@@ -621,25 +610,24 @@ int job_bmi_recv_list(PVFS_BMI_addr_t ad
         out_status_p->error_code = -PVFS_ENOMEM;
         return 1;
     }
+    jd->hints = hints;
     jd->job_user_ptr = user_ptr;
     jd->context_id = context_id;
     jd->status_user_tag = status_user_tag;
     jd->bmi_callback.fn = bmi_thread_mgr_callback;
     jd->bmi_callback.data = (void*)jd;
     user_ptr_internal = &jd->bmi_callback;
-    JOB_EVENT_START(PVFS_EVENT_BMI_RECV, jd->job_id);
 
     ret = BMI_post_recv_list(&(jd->u.bmi.id), addr, buffer_list,
                              size_list, list_count, total_expected_size,
                              &(jd->u.bmi.actual_size), buffer_type, tag,
-                             user_ptr_internal, global_bmi_context);
+                             user_ptr_internal, global_bmi_context, hints);
 
     if (ret < 0)
     {
         /* error posting */
         out_status_p->error_code = ret;
         out_status_p->status_user_tag = status_user_tag;
-        JOB_EVENT_END(PVFS_EVENT_BMI_RECV, 0, jd->job_id);
         dealloc_job_desc(jd);
         jd = NULL;
         return (1);
@@ -651,19 +639,16 @@ int job_bmi_recv_list(PVFS_BMI_addr_t ad
         out_status_p->error_code = 0;
         out_status_p->status_user_tag = status_user_tag;
         out_status_p->actual_size = jd->u.bmi.actual_size;
-        JOB_EVENT_END(PVFS_EVENT_BMI_RECV, out_status_p->actual_size, 
-            jd->job_id);
         dealloc_job_desc(jd);
         jd = NULL;
         return (ret);
     }
 
     /* if we fall to this point, the job did not immediately complete and
-     * we must queue up to test it later 
+     * we must queue up to test it later
      */
     *id = jd->job_id;
     bmi_pending_count++;
-    jd->event_type = PVFS_EVENT_BMI_RECV;
 
     return(job_time_mgr_add(jd, timeout_sec));
 }
@@ -1241,7 +1226,8 @@ int job_flow(flow_descriptor * flow_d,
              job_status_s * out_status_p,
              job_id_t * id,
              job_context_id context_id,
-             int timeout_sec)
+             int timeout_sec,
+             PVFS_hint hints)
 {
     struct job_desc *jd = NULL;
     int ret = -1;
@@ -1253,6 +1239,8 @@ int job_flow(flow_descriptor * flow_d,
         out_status_p->error_code = -PVFS_ENOMEM;
         return 1;
     }
+    jd->hints = hints;
+    flow_d->hints = hints;
     jd->job_user_ptr = user_ptr;
     jd->u.flow.flow_d = flow_d;
     jd->context_id = context_id;
@@ -1260,15 +1248,12 @@ int job_flow(flow_descriptor * flow_d,
     flow_d->user_ptr = jd;
     flow_d->callback = flow_callback;
 
-    JOB_EVENT_START(PVFS_EVENT_FLOW, jd->job_id);
-
     /* post the flow */
     ret = PINT_flow_post(flow_d);
     if (ret < 0)
     {
         out_status_p->error_code = ret;
         out_status_p->status_user_tag = status_user_tag;
-        JOB_EVENT_END(PVFS_EVENT_FLOW, 0, jd->job_id);
         dealloc_job_desc(jd);
         jd = NULL;
         return (1);
@@ -1279,7 +1264,6 @@ int job_flow(flow_descriptor * flow_d,
         out_status_p->error_code = 0;
         out_status_p->status_user_tag = status_user_tag;
         out_status_p->actual_size = flow_d->total_transferred;
-        JOB_EVENT_END(PVFS_EVENT_FLOW, flow_d->total_transferred, jd->job_id);
         dealloc_job_desc(jd);
         jd = NULL;
         return (1);
@@ -1288,7 +1272,6 @@ int job_flow(flow_descriptor * flow_d,
     /* queue up the job desc. for later completion */
     *id = jd->job_id;
     flow_pending_count++;
-    jd->event_type = PVFS_EVENT_FLOW;
     gossip_debug(GOSSIP_FLOW_DEBUG, "Job flows in progress (post time): %d\n",
             flow_pending_count);
 
@@ -1333,7 +1316,7 @@ int job_flow_cancel(job_id_t id, job_con
 
 /* job_trove_bstream_write_at()
  *
- * storage byte stream write 
+ * storage byte stream write
  *
  * returns 0 on success, 1 on immediate completion, and -errno on
  * failure
@@ -1349,7 +1332,8 @@ int job_trove_bstream_write_at(PVFS_fs_i
                                job_aint status_user_tag,
                                job_status_s * out_status_p,
                                job_id_t * id,
-                               job_context_id context_id)
+                               job_context_id context_id,
+                               PVFS_hint hints)
 {
     /* post a trove write.  If it completes (or fails) immediately, then
      * return and fill in the status structure.  If it needs to be tested
@@ -1368,6 +1352,7 @@ int job_trove_bstream_write_at(PVFS_fs_i
         out_status_p->error_code = -PVFS_ENOMEM;
         return 1;
     }
+    jd->hints = hints;
     jd->job_user_ptr = user_ptr;
     jd->u.trove.actual_size = size;
     jd->u.trove.vtag = vtag;
@@ -1376,14 +1361,13 @@ int job_trove_bstream_write_at(PVFS_fs_i
     jd->trove_callback.fn = trove_thread_mgr_callback;
     jd->trove_callback.data = (void*)jd;
     user_ptr_internal = &jd->trove_callback;
-    JOB_EVENT_START(PVFS_EVENT_TROVE_WRITE_AT, jd->job_id);
 
 #ifdef __PVFS2_TROVE_SUPPORT__
     ret = trove_bstream_write_at(coll_id, handle, buffer,
                                  &jd->u.trove.actual_size, offset, flags,
-                                 jd->u.trove.vtag, user_ptr_internal, 
-                                    global_trove_context,
-                                 &(jd->u.trove.id));
+                                 jd->u.trove.vtag, user_ptr_internal,
+                                 global_trove_context,
+                                 &(jd->u.trove.id), hints);
 #else
     gossip_err("Error: Trove support not enabled.\n");
     ret = -ENOSYS;
@@ -1392,7 +1376,6 @@ int job_trove_bstream_write_at(PVFS_fs_i
     if (ret < 0)
     {
         /* error posting trove operation */
-        JOB_EVENT_END(PVFS_EVENT_TROVE_WRITE_AT, 0, jd->job_id);
         dealloc_job_desc(jd);
         jd = NULL;
         out_status_p->error_code = ret;
@@ -1407,8 +1390,6 @@ int job_trove_bstream_write_at(PVFS_fs_i
         out_status_p->status_user_tag = status_user_tag;
         out_status_p->actual_size = jd->u.trove.actual_size;
         out_status_p->vtag = jd->u.trove.vtag;
-        JOB_EVENT_END(PVFS_EVENT_TROVE_WRITE_AT, out_status_p->actual_size, 
-            jd->job_id);
         dealloc_job_desc(jd);
         jd = NULL;
         return (ret);
@@ -1419,27 +1400,27 @@ int job_trove_bstream_write_at(PVFS_fs_i
      */
     *id = jd->job_id;
     trove_pending_count++;
-    jd->event_type = PVFS_EVENT_TROVE_WRITE_AT;
 
     return (0);
 }
 
 int job_trove_bstream_write_list(TROVE_coll_id coll_id,
                                  TROVE_handle handle,
-                                 char **mem_offset_array, 
+                                 char **mem_offset_array,
                                  TROVE_size *mem_size_array,
                                  int mem_count,
-                                 TROVE_offset *stream_offset_array, 
+                                 TROVE_offset *stream_offset_array,
                                  TROVE_size *stream_size_array,
                                  int stream_count,
                                  TROVE_size *out_size_p,
-                                 TROVE_ds_flags flags, 
+                                 TROVE_ds_flags flags,
                                  TROVE_vtag_s *vtag,
                                  void * user_ptr,
                                  job_aint status_user_tag,
                                  job_status_s *out_status_p,
                                  job_id_t *id,
-                                 job_context_id context_id)
+                                 job_context_id context_id,
+                                 PVFS_hint hints)
 {
     /* post a trove write.  If it completes (or fails) immediately, then
      * return and fill in the status structure.  If it needs to be tested
@@ -1459,16 +1440,16 @@ int job_trove_bstream_write_list(TROVE_c
         return 1;
     }
     jd->job_user_ptr = user_ptr;
+    jd->hints = hints;
     jd->u.trove.vtag = vtag;
     jd->context_id = context_id;
     jd->status_user_tag = status_user_tag;
     jd->trove_callback.fn = trove_thread_mgr_callback;
     jd->trove_callback.data = (void*)jd;
     user_ptr_internal = &jd->trove_callback;
-    JOB_EVENT_START(PVFS_EVENT_TROVE_WRITE_LIST, jd->job_id);
 
 #ifdef __PVFS2_TROVE_SUPPORT__
-    ret = trove_bstream_write_list(coll_id, handle, 
+    ret = trove_bstream_write_list(coll_id, handle,
                                    mem_offset_array, mem_size_array,
                                    mem_count,
                                    stream_offset_array, stream_size_array,
@@ -1478,7 +1459,7 @@ int job_trove_bstream_write_list(TROVE_c
                                    vtag,
                                    user_ptr_internal,
                                    global_trove_context,
-                                   &(jd->u.trove.id));
+                                   &(jd->u.trove.id), hints);
 #else
     gossip_err("Error: Trove support not enabled.\n");
     ret = -ENOSYS;
@@ -1487,7 +1468,6 @@ int job_trove_bstream_write_list(TROVE_c
     if (ret < 0)
     {
         /* error posting trove operation */
-        JOB_EVENT_END(PVFS_EVENT_TROVE_WRITE_LIST, 0, jd->job_id);
         dealloc_job_desc(jd);
         jd = NULL;
         out_status_p->error_code = ret;
@@ -1502,8 +1482,6 @@ int job_trove_bstream_write_list(TROVE_c
         out_status_p->status_user_tag = status_user_tag;
         out_status_p->actual_size = jd->u.trove.actual_size;
         out_status_p->vtag = jd->u.trove.vtag;
-        JOB_EVENT_END(PVFS_EVENT_TROVE_WRITE_LIST, out_status_p->actual_size, 
-            jd->job_id);
         dealloc_job_desc(jd);
         jd = NULL;
         return (ret);
@@ -1514,7 +1492,6 @@ int job_trove_bstream_write_list(TROVE_c
      */
     *id = jd->job_id;
     trove_pending_count++;
-    jd->event_type = PVFS_EVENT_TROVE_WRITE_LIST;
 
     return (0);
 } 
@@ -1538,7 +1515,8 @@ int job_trove_bstream_read_at(PVFS_fs_id
                               job_aint status_user_tag,
                               job_status_s * out_status_p,
                               job_id_t * id,
-                              job_context_id context_id)
+                              job_context_id context_id,
+                              PVFS_hint hints)
 {
     /* post a trove read.  If it completes (or fails) immediately, then
      * return and fill in the status structure.  If it needs to be tested
@@ -1557,6 +1535,7 @@ int job_trove_bstream_read_at(PVFS_fs_id
         out_status_p->error_code = -PVFS_ENOMEM;
         return 1;
     }
+    jd->hints = hints;
     jd->job_user_ptr = user_ptr;
     jd->u.trove.actual_size = size;
     jd->u.trove.vtag = vtag;
@@ -1565,14 +1544,13 @@ int job_trove_bstream_read_at(PVFS_fs_id
     jd->trove_callback.fn = trove_thread_mgr_callback;
     jd->trove_callback.data = (void*)jd;
     user_ptr_internal = &jd->trove_callback;
-    JOB_EVENT_START(PVFS_EVENT_TROVE_READ_AT, jd->job_id);
 
 #ifdef __PVFS2_TROVE_SUPPORT__
     ret = trove_bstream_read_at(coll_id, handle, buffer,
                                 &jd->u.trove.actual_size, offset, flags,
                                 jd->u.trove.vtag, user_ptr_internal,
                                 global_trove_context,
-                                &(jd->u.trove.id));
+                                &(jd->u.trove.id), hints);
 #else
     gossip_err("Error: Trove support not enabled.\n");
     ret = -ENOSYS;
@@ -1581,7 +1559,6 @@ int job_trove_bstream_read_at(PVFS_fs_id
     if (ret < 0)
     {
         /* error posting trove operation */
-        JOB_EVENT_END(PVFS_EVENT_TROVE_READ_AT, 0, jd->job_id);
         dealloc_job_desc(jd);
         jd = NULL;
         out_status_p->error_code = ret;
@@ -1596,8 +1573,6 @@ int job_trove_bstream_read_at(PVFS_fs_id
         out_status_p->status_user_tag = status_user_tag;
         out_status_p->actual_size = jd->u.trove.actual_size;
         out_status_p->vtag = jd->u.trove.vtag;
-        JOB_EVENT_END(PVFS_EVENT_TROVE_READ_AT, out_status_p->actual_size, 
-            jd->job_id);
         dealloc_job_desc(jd);
         jd = NULL;
         return (ret);
@@ -1608,7 +1583,6 @@ int job_trove_bstream_read_at(PVFS_fs_id
      */
     *id = jd->job_id;
     trove_pending_count++;
-    jd->event_type = PVFS_EVENT_TROVE_READ_AT;
 
     return (0);
 }
@@ -1628,7 +1602,8 @@ int job_trove_bstream_read_list(PVFS_fs_
                                 job_aint status_user_tag,
                                 job_status_s * out_status_p,
                                 job_id_t * id,
-                                job_context_id context_id)
+                                job_context_id context_id,
+                                PVFS_hint hints)
 {
     /* post a trove read.  If it completes (or fails) immediately, then
      * return and fill in the status structure.  If it needs to be tested
@@ -1647,6 +1622,7 @@ int job_trove_bstream_read_list(PVFS_fs_
         out_status_p->error_code = -PVFS_ENOMEM;
         return 1;
     }
+    jd->hints = hints;
     jd->job_user_ptr = user_ptr;
     jd->u.trove.vtag = vtag;
     jd->context_id = context_id;
@@ -1654,10 +1630,9 @@ int job_trove_bstream_read_list(PVFS_fs_
     jd->trove_callback.fn = trove_thread_mgr_callback;
     jd->trove_callback.data = (void*)jd;
     user_ptr_internal = &jd->trove_callback;
-    JOB_EVENT_START(PVFS_EVENT_TROVE_READ_LIST, jd->job_id);
 
 #ifdef __PVFS2_TROVE_SUPPORT__
-    ret = trove_bstream_read_list(coll_id, handle, 
+    ret = trove_bstream_read_list(coll_id, handle,
                                   mem_offset_array, mem_size_array,
                                   mem_count,
                                   stream_offset_array, stream_size_array,
@@ -1665,7 +1640,7 @@ int job_trove_bstream_read_list(PVFS_fs_
                                   out_size_p, flags,
                                   jd->u.trove.vtag, user_ptr_internal,
                                   global_trove_context,
-                                  &(jd->u.trove.id));
+                                  &(jd->u.trove.id), hints);
 #else
     gossip_err("Error: Trove support not enabled.\n");
     ret = -ENOSYS;
@@ -1674,7 +1649,6 @@ int job_trove_bstream_read_list(PVFS_fs_
     if (ret < 0)
     {
         /* error posting trove operation */
-        JOB_EVENT_END(PVFS_EVENT_TROVE_READ_LIST, 0, jd->job_id);
         dealloc_job_desc(jd);
         jd = NULL;
         out_status_p->error_code = ret;
@@ -1689,8 +1663,6 @@ int job_trove_bstream_read_list(PVFS_fs_
         out_status_p->status_user_tag = status_user_tag;
         out_status_p->actual_size = jd->u.trove.actual_size;
         out_status_p->vtag = jd->u.trove.vtag;
-        JOB_EVENT_END(PVFS_EVENT_TROVE_READ_LIST, out_status_p->actual_size, 
-            jd->job_id);
         dealloc_job_desc(jd);
         jd = NULL;
         return (ret);
@@ -1701,7 +1673,6 @@ int job_trove_bstream_read_list(PVFS_fs_
      */
     *id = jd->job_id;
     trove_pending_count++;
-    jd->event_type = PVFS_EVENT_TROVE_READ_LIST;
 
     return (0);
 }
@@ -1720,8 +1691,9 @@ int job_trove_bstream_flush(PVFS_fs_id c
                             job_aint status_user_tag,
                             job_status_s * out_status_p,
                             job_id_t * id,
-                            job_context_id context_id)
-                            
+                            job_context_id context_id,
+                            PVFS_hint hints)
+
 {
     int ret = -1;
     struct job_desc *jd = NULL;
@@ -1742,11 +1714,10 @@ int job_trove_bstream_flush(PVFS_fs_id c
     jd->trove_callback.fn = trove_thread_mgr_callback;
     jd->trove_callback.data = (void*)jd;
     user_ptr_internal = &jd->trove_callback;
-    JOB_EVENT_START(PVFS_EVENT_TROVE_BSTREAM_FLUSH, jd->job_id);
 
 #ifdef __PVFS2_TROVE_SUPPORT__
     ret = trove_bstream_flush(coll_id, handle, flags, user_ptr_internal,
-                              global_trove_context, &(jd->u.trove.id));
+                              global_trove_context, &(jd->u.trove.id), hints);
 #else
     gossip_err("Error: Trove support not enabled.\n");
     ret = -ENOSYS;
@@ -1755,7 +1726,6 @@ int job_trove_bstream_flush(PVFS_fs_id c
     if (ret < 0)
     {
         /* error posting trove operation */
-        JOB_EVENT_END(PVFS_EVENT_TROVE_BSTREAM_FLUSH, 0, jd->job_id);
         dealloc_job_desc(jd);
         jd = NULL;
         out_status_p->error_code = ret;
@@ -1767,7 +1737,6 @@ int job_trove_bstream_flush(PVFS_fs_id c
         /* immediate completion */
         out_status_p->error_code = 0;
         out_status_p->status_user_tag = status_user_tag;
-        JOB_EVENT_END(PVFS_EVENT_TROVE_BSTREAM_FLUSH, 0, jd->job_id);
         dealloc_job_desc(jd);
         jd = NULL;
         return (ret);
@@ -1777,7 +1746,6 @@ int job_trove_bstream_flush(PVFS_fs_id c
      */
     *id = jd->job_id;
     trove_pending_count++;
-    jd->event_type = PVFS_EVENT_TROVE_BSTREAM_FLUSH;
 
     return (0);
 }
@@ -1799,11 +1767,12 @@ int job_trove_keyval_read(PVFS_fs_id col
                           job_aint status_user_tag,
                           job_status_s * out_status_p,
                           job_id_t * id,
-                          job_context_id context_id)
+                          job_context_id context_id,
+                          PVFS_hint hints)
 {
     /* post a trove keyval read.  If it completes (or fails)
-     * immediately, then return and fill in the status structure.  
-     * If it needs to be tested for completion later, then queue 
+     * immediately, then return and fill in the status structure.
+     * If it needs to be tested for completion later, then queue
      * up a job_desc structure.  */
     int ret = -1;
     struct job_desc *jd = NULL;
@@ -1818,6 +1787,7 @@ int job_trove_keyval_read(PVFS_fs_id col
         out_status_p->error_code = -PVFS_ENOMEM;
         return 1;
     }
+    jd->hints = hints;
     jd->job_user_ptr = user_ptr;
     jd->u.trove.vtag = vtag;
     jd->context_id = context_id;
@@ -1825,12 +1795,11 @@ int job_trove_keyval_read(PVFS_fs_id col
     jd->trove_callback.fn = trove_thread_mgr_callback;
     jd->trove_callback.data = (void*)jd;
     user_ptr_internal = &jd->trove_callback;
-    JOB_EVENT_START(PVFS_EVENT_TROVE_KEYVAL_READ, jd->job_id);
 
 #ifdef __PVFS2_TROVE_SUPPORT__
     ret = trove_keyval_read(coll_id, handle, key_p, val_p, flags,
-                            jd->u.trove.vtag, user_ptr_internal, 
-                            global_trove_context, &(jd->u.trove.id));
+                            jd->u.trove.vtag, user_ptr_internal,
+                            global_trove_context, &(jd->u.trove.id), hints);
 #else
     gossip_err("Error: Trove support not enabled.\n");
     ret = -ENOSYS;
@@ -1839,7 +1808,6 @@ int job_trove_keyval_read(PVFS_fs_id col
     if (ret < 0)
     {
         /* error posting trove operation */
-        JOB_EVENT_END(PVFS_EVENT_TROVE_KEYVAL_READ, 0, jd->job_id);
         dealloc_job_desc(jd);
         jd = NULL;
         out_status_p->error_code = ret;
@@ -1853,7 +1821,6 @@ int job_trove_keyval_read(PVFS_fs_id col
         out_status_p->error_code = 0;
         out_status_p->status_user_tag = status_user_tag;
         out_status_p->vtag = jd->u.trove.vtag;
-        JOB_EVENT_END(PVFS_EVENT_TROVE_KEYVAL_READ, 0, jd->job_id);
         dealloc_job_desc(jd);
         jd = NULL;
         return (ret);
@@ -1864,7 +1831,6 @@ int job_trove_keyval_read(PVFS_fs_id col
      */
     *id = jd->job_id;
     trove_pending_count++;
-    jd->event_type = PVFS_EVENT_TROVE_KEYVAL_READ;
 
     return (0);
 }
@@ -1888,11 +1854,12 @@ int job_trove_keyval_read_list(PVFS_fs_i
                                job_aint status_user_tag,
                                job_status_s * out_status_p,
                                job_id_t * id,
-                               job_context_id context_id)
+                               job_context_id context_id,
+                               PVFS_hint hints)
 {
     /* post a trove keyval read.  If it completes (or fails)
-     * immediately, then return and fill in the status structure.  
-     * If it needs to be tested for completion later, then queue 
+     * immediately, then return and fill in the status structure.
+     * If it needs to be tested for completion later, then queue
      * up a job_desc structure.  */
     int ret = -1;
     struct job_desc *jd = NULL;
@@ -1907,6 +1874,7 @@ int job_trove_keyval_read_list(PVFS_fs_i
         out_status_p->error_code = -PVFS_ENOMEM;
         return 1;
     }
+    jd->hints = hints;
     jd->job_user_ptr = user_ptr;
     jd->u.trove.vtag = vtag;
     jd->context_id = context_id;
@@ -1914,13 +1882,12 @@ int job_trove_keyval_read_list(PVFS_fs_i
     jd->trove_callback.fn = trove_thread_mgr_callback;
     jd->trove_callback.data = (void*)jd;
     user_ptr_internal = &jd->trove_callback;
-    JOB_EVENT_START(PVFS_EVENT_TROVE_KEYVAL_READ_LIST, jd->job_id);
 
 #ifdef __PVFS2_TROVE_SUPPORT__
-    ret = trove_keyval_read_list(coll_id, handle, key_array, val_array, 
-                                 err_array, count, flags, jd->u.trove.vtag, 
+    ret = trove_keyval_read_list(coll_id, handle, key_array, val_array,
+                                 err_array, count, flags, jd->u.trove.vtag,
                                  user_ptr_internal,
-                                 global_trove_context, &(jd->u.trove.id));
+                                 global_trove_context, &(jd->u.trove.id), hints);
 #else
     gossip_err("Error: Trove support not enabled.\n");
     ret = -ENOSYS;
@@ -1929,7 +1896,6 @@ int job_trove_keyval_read_list(PVFS_fs_i
     if (ret < 0)
     {
         /* error posting trove operation */
-        JOB_EVENT_END(PVFS_EVENT_TROVE_KEYVAL_READ_LIST, 0, jd->job_id);
         dealloc_job_desc(jd);
         jd = NULL;
         out_status_p->error_code = ret;
@@ -1943,7 +1909,6 @@ int job_trove_keyval_read_list(PVFS_fs_i
         out_status_p->error_code = 0;
         out_status_p->status_user_tag = status_user_tag;
         out_status_p->vtag = jd->u.trove.vtag;
-        JOB_EVENT_END(PVFS_EVENT_TROVE_KEYVAL_READ_LIST, 0, jd->job_id);
         dealloc_job_desc(jd);
         jd = NULL;
         return (ret);
@@ -1954,14 +1919,13 @@ int job_trove_keyval_read_list(PVFS_fs_i
      */
     *id = jd->job_id;
     trove_pending_count++;
-    jd->event_type = PVFS_EVENT_TROVE_KEYVAL_READ_LIST;
 
     return (0);
 }
 
 /* job_trove_keyval_write()
  *
- * storage key/value write 
+ * storage key/value write
  *
  * returns 0 on success, 1 on immediate completion, and -errno on
  * failure
@@ -1976,11 +1940,12 @@ int job_trove_keyval_write(PVFS_fs_id co
                            job_aint status_user_tag,
                            job_status_s * out_status_p,
                            job_id_t * id,
-                           job_context_id context_id)
+                           job_context_id context_id,
+                           PVFS_hint hints)
 {
     /* post a trove keyval write.  If it completes (or fails)
-     * immediately, then return and fill in the status structure.  
-     * If it needs to be tested for completion later, then queue 
+     * immediately, then return and fill in the status structure.
+     * If it needs to be tested for completion later, then queue
      * up a job_desc structure.  */
     int ret = -1;
     struct job_desc *jd = NULL;
@@ -1995,6 +1960,7 @@ int job_trove_keyval_write(PVFS_fs_id co
         out_status_p->error_code = -PVFS_ENOMEM;
         return 1;
     }
+    jd->hints = hints;
     jd->job_user_ptr = user_ptr;
     jd->u.trove.vtag = vtag;
     jd->context_id = context_id;
@@ -2002,13 +1968,12 @@ int job_trove_keyval_write(PVFS_fs_id co
     jd->trove_callback.fn = trove_thread_mgr_callback;
     jd->trove_callback.data = (void*)jd;
     user_ptr_internal = &jd->trove_callback;
-    JOB_EVENT_START(PVFS_EVENT_TROVE_KEYVAL_WRITE, jd->job_id);
 
 #ifdef __PVFS2_TROVE_SUPPORT__
     ret = trove_keyval_write(coll_id, handle, key_p, val_p, flags,
-                             jd->u.trove.vtag, user_ptr_internal, 
+                             jd->u.trove.vtag, user_ptr_internal,
                              global_trove_context,
-                             &(jd->u.trove.id));
+                             &(jd->u.trove.id), hints);
 #else
     gossip_err("Error: Trove support not enabled.\n");
     ret = -ENOSYS;
@@ -2017,7 +1982,6 @@ int job_trove_keyval_write(PVFS_fs_id co
     if (ret < 0)
     {
         /* error posting trove operation */
-        JOB_EVENT_END(PVFS_EVENT_TROVE_KEYVAL_WRITE, 0, jd->job_id);
         dealloc_job_desc(jd);
         jd = NULL;
         out_status_p->error_code = ret;
@@ -2031,7 +1995,6 @@ int job_trove_keyval_write(PVFS_fs_id co
         out_status_p->error_code = 0;
         out_status_p->status_user_tag = status_user_tag;
         out_status_p->vtag = jd->u.trove.vtag;
-        JOB_EVENT_END(PVFS_EVENT_TROVE_KEYVAL_WRITE, 0, jd->job_id);
         dealloc_job_desc(jd);
         jd = NULL;
         return (ret);
@@ -2042,14 +2005,13 @@ int job_trove_keyval_write(PVFS_fs_id co
      */
     *id = jd->job_id;
     trove_pending_count++;
-    jd->event_type = PVFS_EVENT_TROVE_KEYVAL_WRITE;
 
     return (0);
 }
 
 /* job_trove_keyval_write_list()
  *
- * storage key/value list write 
+ * storage key/value list write
  *
  * returns 0 on success, 1 on immediate completion, and -errno on
  * failure
@@ -2065,11 +2027,12 @@ int job_trove_keyval_write_list(PVFS_fs_
                            job_aint status_user_tag,
                            job_status_s * out_status_p,
                            job_id_t * id,
-                           job_context_id context_id)
+                           job_context_id context_id,
+                           PVFS_hint hints)
 {
     /* post a trove keyval write.  If it completes (or fails)
-     * immediately, then return and fill in the status structure.  
-     * If it needs to be tested for completion later, then queue 
+     * immediately, then return and fill in the status structure.
+     * If it needs to be tested for completion later, then queue
      * up a job_desc structure.  */
     int ret = -1;
     struct job_desc *jd = NULL;
@@ -2084,6 +2047,7 @@ int job_trove_keyval_write_list(PVFS_fs_
         out_status_p->error_code = -PVFS_ENOMEM;
         return 1;
     }
+    jd->hints = hints;
     jd->job_user_ptr = user_ptr;
     jd->u.trove.vtag = vtag;
     jd->context_id = context_id;
@@ -2091,15 +2055,14 @@ int job_trove_keyval_write_list(PVFS_fs_
     jd->trove_callback.fn = trove_thread_mgr_callback;
     jd->trove_callback.data = (void*)jd;
     user_ptr_internal = &jd->trove_callback;
-    JOB_EVENT_START(PVFS_EVENT_TROVE_KEYVAL_WRITE_LIST, jd->job_id);
 
 #ifdef __PVFS2_TROVE_SUPPORT__
     ret = trove_keyval_write_list(coll_id, handle,
                              key_array, val_array,
                              count, flags,
-                             jd->u.trove.vtag, user_ptr_internal, 
+                             jd->u.trove.vtag, user_ptr_internal,
                              global_trove_context,
-                             &(jd->u.trove.id));
+                             &(jd->u.trove.id), hints);
 #else
     gossip_err("Error: Trove support not enabled.\n");
     ret = -ENOSYS;
@@ -2108,7 +2071,6 @@ int job_trove_keyval_write_list(PVFS_fs_
     if (ret < 0)
     {
         /* error posting trove operation */
-        JOB_EVENT_END(PVFS_EVENT_TROVE_KEYVAL_WRITE_LIST, 0, jd->job_id);
         dealloc_job_desc(jd);
         jd = NULL;
         out_status_p->error_code = ret;
@@ -2122,7 +2084,6 @@ int job_trove_keyval_write_list(PVFS_fs_
         out_status_p->error_code = 0;
         out_status_p->status_user_tag = status_user_tag;
         out_status_p->vtag = jd->u.trove.vtag;
-        JOB_EVENT_END(PVFS_EVENT_TROVE_KEYVAL_WRITE_LIST, 0, jd->job_id);
         dealloc_job_desc(jd);
         jd = NULL;
         return (ret);
@@ -2133,7 +2094,6 @@ int job_trove_keyval_write_list(PVFS_fs_
      */
     *id = jd->job_id;
     trove_pending_count++;
-    jd->event_type = PVFS_EVENT_TROVE_KEYVAL_WRITE_LIST;
 
     return (0);
 }
@@ -2152,7 +2112,8 @@ int job_trove_keyval_flush(PVFS_fs_id co
                            job_aint status_user_tag,
                            job_status_s * out_status_p,
                            job_id_t * id,
-                           job_context_id context_id)
+                           job_context_id context_id,
+                           PVFS_hint hints)
 {
     int ret = -1;
     struct job_desc *jd = NULL;
@@ -2173,11 +2134,10 @@ int job_trove_keyval_flush(PVFS_fs_id co
     jd->trove_callback.fn = trove_thread_mgr_callback;
     jd->trove_callback.data = (void*)jd;
     user_ptr_internal = &jd->trove_callback;
-    JOB_EVENT_START(PVFS_EVENT_TROVE_KEYVAL_FLUSH, jd->job_id);
 
 #ifdef __PVFS2_TROVE_SUPPORT__
     ret = trove_keyval_flush(coll_id, handle, flags, user_ptr_internal,
-                             global_trove_context, &(jd->u.trove.id));
+                             global_trove_context, &(jd->u.trove.id), hints);
 #else
     gossip_err("Error: Trove support not enabled.\n");
     ret = -ENOSYS;
@@ -2186,7 +2146,6 @@ int job_trove_keyval_flush(PVFS_fs_id co
     if (ret < 0)
     {
         /* error posting trove operation */
-        JOB_EVENT_END(PVFS_EVENT_TROVE_KEYVAL_FLUSH, 0, jd->job_id);
         dealloc_job_desc(jd);
         jd = NULL;
         out_status_p->error_code = ret;
@@ -2199,7 +2158,6 @@ int job_trove_keyval_flush(PVFS_fs_id co
         /* immediate completion */
         out_status_p->error_code = 0;
         out_status_p->status_user_tag = status_user_tag;
-        JOB_EVENT_END(PVFS_EVENT_TROVE_KEYVAL_FLUSH, 0, jd->job_id);
         dealloc_job_desc(jd);
         jd = NULL;
         return (ret);
@@ -2210,7 +2168,6 @@ int job_trove_keyval_flush(PVFS_fs_id co
      */
     *id = jd->job_id;
     trove_pending_count++;
-    jd->event_type = PVFS_EVENT_TROVE_KEYVAL_FLUSH;
 
     return (0);
 }
@@ -2223,7 +2180,8 @@ int job_trove_keyval_get_handle_info(PVF
                                      job_aint status_user_tag,
                                      job_status_s * out_status_p,
                                      job_id_t * id,
-                                     job_context_id context_id)
+                                     job_context_id context_id,
+                                     PVFS_hint hints)
 {
     /* post a trove operation keyval get handle info.  If it completes (or
      * fails) immediately, then return and fill in the status
@@ -2244,22 +2202,24 @@ int job_trove_keyval_get_handle_info(PVF
         out_status_p->error_code = -PVFS_ENOMEM;
         return 1;
     }
+    jd->hints = hints;
     jd->job_user_ptr = user_ptr;
     jd->context_id = context_id;
     jd->status_user_tag = status_user_tag;
     jd->trove_callback.fn = trove_thread_mgr_callback;
     jd->trove_callback.data = (void*)jd;
     user_ptr_internal = &jd->trove_callback;
-    JOB_EVENT_START(PVFS_EVENT_TROVE_KEYVAL_GET_HANDLE_INFO, jd->job_id);
+
+
 
 #ifdef __PVFS2_TROVE_SUPPORT__
     ret = trove_keyval_get_handle_info(
         coll_id,
         handle,
-        flags, 
+        flags,
         info,
-        user_ptr_internal, 
-        global_trove_context, &(jd->u.trove.id));
+        user_ptr_internal,
+        global_trove_context, &(jd->u.trove.id), hints);
 #else
     gossip_err("Error: Trove support not enabled.\n");
     ret = -ENOSYS;
@@ -2268,7 +2228,6 @@ int job_trove_keyval_get_handle_info(PVF
     if (ret < 0)
     {
         /* error posting trove operation */
-        JOB_EVENT_END(PVFS_EVENT_TROVE_KEYVAL_GET_HANDLE_INFO, 0, jd->job_id);
         dealloc_job_desc(jd);
         jd = NULL;
         out_status_p->error_code = ret;
@@ -2281,18 +2240,16 @@ int job_trove_keyval_get_handle_info(PVF
         /* immediate completion */
         out_status_p->error_code = 0;
         out_status_p->status_user_tag = status_user_tag;
-        JOB_EVENT_END(PVFS_EVENT_TROVE_KEYVAL_GET_HANDLE_INFO, 0, jd->job_id);
         dealloc_job_desc(jd);
         jd = NULL;
         return (ret);
     }
 
     /* if we fall to this point, the job did not immediately complete and
-     * we must queue up to test it later 
+     * we must queue up to test it later
      */
     *id = jd->job_id;
     trove_pending_count++;
-    jd->event_type = PVFS_EVENT_TROVE_KEYVAL_GET_HANDLE_INFO;
 
     return (0);
 }
@@ -2300,7 +2257,7 @@ int job_trove_keyval_get_handle_info(PVF
 
 /* job_trove_dspace_getattr()
  *
- * read generic dspace attributes 
+ * read generic dspace attributes
  *
  * returns 0 on success, 1 on immediate completion, and -errno on
  * failure
@@ -2312,7 +2269,8 @@ int job_trove_dspace_getattr(PVFS_fs_id 
                              job_aint status_user_tag,
                              job_status_s *out_status_p,
                              job_id_t *id,
-                             job_context_id context_id)
+                             job_context_id context_id,
+                             PVFS_hint hints)
 {
     /* post a trove operation dspace get attr.  If it completes (or
      * fails) immediately, then return and fill in the status
@@ -2339,13 +2297,14 @@ int job_trove_dspace_getattr(PVFS_fs_id 
     jd->trove_callback.fn = trove_thread_mgr_callback;
     jd->trove_callback.data = (void*)jd;
     user_ptr_internal = &jd->trove_callback;
-    JOB_EVENT_START(PVFS_EVENT_TROVE_DSPACE_GETATTR, jd->job_id);
+
+
 
 #ifdef __PVFS2_TROVE_SUPPORT__
     ret = trove_dspace_getattr(coll_id,
                                handle, out_ds_attr_ptr, 0 /* flags */ ,
-                               user_ptr_internal, 
-                               global_trove_context, &(jd->u.trove.id));
+                               user_ptr_internal,
+                               global_trove_context, &(jd->u.trove.id), hints);
 #else
     gossip_err("Error: Trove support not enabled.\n");
     ret = -ENOSYS;
@@ -2354,7 +2313,6 @@ int job_trove_dspace_getattr(PVFS_fs_id 
     if (ret < 0)
     {
         /* error posting trove operation */
-        JOB_EVENT_END(PVFS_EVENT_TROVE_DSPACE_GETATTR, 0, jd->job_id);
         dealloc_job_desc(jd);
         jd = NULL;
         out_status_p->error_code = ret;
@@ -2367,18 +2325,16 @@ int job_trove_dspace_getattr(PVFS_fs_id 
         /* immediate completion */
         out_status_p->error_code = 0;
         out_status_p->status_user_tag = status_user_tag;
-        JOB_EVENT_END(PVFS_EVENT_TROVE_DSPACE_GETATTR, 0, jd->job_id);
         dealloc_job_desc(jd);
         jd = NULL;
         return (ret);
     }
 
     /* if we fall to this point, the job did not immediately complete and
-     * we must queue up to test it later 
+     * we must queue up to test it later
      */
     *id = jd->job_id;
     trove_pending_count++;
-    jd->event_type = PVFS_EVENT_TROVE_DSPACE_GETATTR;
 
     return (0);
 }
@@ -2399,7 +2355,8 @@ int job_trove_dspace_getattr_list(PVFS_f
                              job_aint status_user_tag,
                              job_status_s *out_status_p,
                              job_id_t *id,
-                             job_context_id context_id)
+                             job_context_id context_id,
+                             PVFS_hint hints)
 {
     /* post a trove operation dspace get attr list.  If it completes (or
      * fails) immediately, then return and fill in the status
@@ -2420,13 +2377,15 @@ int job_trove_dspace_getattr_list(PVFS_f
         out_status_p->error_code = -PVFS_ENOMEM;
         return 1;
     }
+    jd->hints = hints;
     jd->job_user_ptr = user_ptr;
     jd->context_id = context_id;
     jd->status_user_tag = status_user_tag;
     jd->trove_callback.fn = trove_thread_mgr_callback;
     jd->trove_callback.data = (void*)jd;
     user_ptr_internal = &jd->trove_callback;
-    JOB_EVENT_START(PVFS_EVENT_TROVE_DSPACE_GETATTR_LIST, jd->job_id);
+
+
 
 #ifdef __PVFS2_TROVE_SUPPORT__
     ret = trove_dspace_getattr_list(coll_id,
@@ -2434,8 +2393,8 @@ int job_trove_dspace_getattr_list(PVFS_f
                                handle_array, out_ds_attr_ptr,
                                out_error_array,
                                0 /* flags */ ,
-                               user_ptr_internal, 
-                               global_trove_context, &(jd->u.trove.id));
+                               user_ptr_internal,
+                               global_trove_context, &(jd->u.trove.id), hints);
 #else
     gossip_err("Error: Trove support not enabled.\n");
     ret = -ENOSYS;
@@ -2444,7 +2403,6 @@ int job_trove_dspace_getattr_list(PVFS_f
     if (ret < 0)
     {
         /* error posting trove operation */
-        JOB_EVENT_END(PVFS_EVENT_TROVE_DSPACE_GETATTR_LIST, 0, jd->job_id);
         dealloc_job_desc(jd);
         jd = NULL;
         out_status_p->error_code = ret;
@@ -2457,25 +2415,23 @@ int job_trove_dspace_getattr_list(PVFS_f
         /* immediate completion */
         out_status_p->error_code = 0;
         out_status_p->status_user_tag = status_user_tag;
-        JOB_EVENT_END(PVFS_EVENT_TROVE_DSPACE_GETATTR_LIST, 0, jd->job_id);
         dealloc_job_desc(jd);
         jd = NULL;
         return (ret);
     }
 
     /* if we fall to this point, the job did not immediately complete and
-     * we must queue up to test it later 
+     * we must queue up to test it later
      */
     *id = jd->job_id;
     trove_pending_count++;
-    jd->event_type = PVFS_EVENT_TROVE_DSPACE_GETATTR_LIST;
 
     return (0);
 }
 
 /* job_trove_dspace_setattr()
  *
- * write generic dspace attributes 
+ * write generic dspace attributes
  *
  * returns 0 on success, 1 on immediate completion, and -errno on
  * failure
@@ -2488,7 +2444,8 @@ int job_trove_dspace_setattr(PVFS_fs_id 
                              job_aint status_user_tag,
                              job_status_s * out_status_p,
                              job_id_t * id,
-                             job_context_id context_id)
+                             job_context_id context_id,
+                             PVFS_hint hints)
 {
     /* post a trove operation dspace set attr.  If it completes (or
      * fails) immediately, then return and fill in the status
@@ -2515,13 +2472,12 @@ int job_trove_dspace_setattr(PVFS_fs_id 
     jd->trove_callback.fn = trove_thread_mgr_callback;
     jd->trove_callback.data = (void*)jd;
     user_ptr_internal = &jd->trove_callback;
-    JOB_EVENT_START(PVFS_EVENT_TROVE_DSPACE_SETATTR, jd->job_id);
 
 #ifdef __PVFS2_TROVE_SUPPORT__
     ret = trove_dspace_setattr(coll_id, handle, ds_attr_p,
                                flags,
-                               user_ptr_internal, global_trove_context, 
-                               &(jd->u.trove.id));
+                               user_ptr_internal, global_trove_context,
+                               &(jd->u.trove.id), hints);
 #else
     gossip_err("Error: Trove support not enabled.\n");
     ret = -ENOSYS;
@@ -2530,7 +2486,6 @@ int job_trove_dspace_setattr(PVFS_fs_id 
     if (ret < 0)
     {
         /* error posting trove operation */
-        JOB_EVENT_END(PVFS_EVENT_TROVE_DSPACE_SETATTR, 0, jd->job_id);
         dealloc_job_desc(jd);
         jd = NULL;
         out_status_p->error_code = ret;
@@ -2543,25 +2498,23 @@ int job_trove_dspace_setattr(PVFS_fs_id 
         /* immediate completion */
         out_status_p->error_code = 0;
         out_status_p->status_user_tag = status_user_tag;
-        JOB_EVENT_END(PVFS_EVENT_TROVE_DSPACE_SETATTR, 0, jd->job_id);
         dealloc_job_desc(jd);
         jd = NULL;
         return (ret);
     }
 
     /* if we fall to this point, the job did not immediately complete and
-     * we must queue up to test it later 
+     * we must queue up to test it later
      */
     *id = jd->job_id;
     trove_pending_count++;
-    jd->event_type = PVFS_EVENT_TROVE_DSPACE_SETATTR;
 
     return (0);
 }
 
 /* job_trove_bstream_resize()
  *
- * resize (truncate or preallocate) a storage byte stream 
+ * resize (truncate or preallocate) a storage byte stream
  *
  * returns 0 on success, 1 on immediate completion, and -errno on
  * failure
@@ -2575,7 +2528,8 @@ int job_trove_bstream_resize(PVFS_fs_id 
                              job_aint status_user_tag,
                              job_status_s * out_status_p,
                              job_id_t * id,
-                             job_context_id context_id)
+                             job_context_id context_id,
+                             PVFS_hint hints)
 {
     /* post a resize trove operation.  If it completes (or
      * fails) immediately, then return and fill in the status
@@ -2602,13 +2556,12 @@ int job_trove_bstream_resize(PVFS_fs_id 
     jd->trove_callback.fn = trove_thread_mgr_callback;
     jd->trove_callback.data = (void*)jd;
     user_ptr_internal = &jd->trove_callback;
-    JOB_EVENT_START(PVFS_EVENT_TROVE_BSTREAM_RESIZE, jd->job_id);
 
 #ifdef __PVFS2_TROVE_SUPPORT__
     ret = trove_bstream_resize(coll_id, handle, &size,
                                flags,
-                               vtag, user_ptr_internal, global_trove_context, 
-                               &(jd->u.trove.id));
+                               vtag, user_ptr_internal, global_trove_context,
+                               &(jd->u.trove.id), hints);
 #else
     gossip_err("Error: Trove support not enabled.\n");
     ret = -ENOSYS;
@@ -2617,7 +2570,6 @@ int job_trove_bstream_resize(PVFS_fs_id 
     if (ret < 0)
     {
         /* error posting trove operation */
-        JOB_EVENT_END(PVFS_EVENT_TROVE_BSTREAM_RESIZE, 0, jd->job_id);
         dealloc_job_desc(jd);
         jd = NULL;
         out_status_p->error_code = ret;
@@ -2630,25 +2582,23 @@ int job_trove_bstream_resize(PVFS_fs_id 
         /* immediate completion */
         out_status_p->error_code = 0;
         out_status_p->status_user_tag = status_user_tag;
-        JOB_EVENT_END(PVFS_EVENT_TROVE_BSTREAM_RESIZE, 0, jd->job_id);
         dealloc_job_desc(jd);
         jd = NULL;
         return (ret);
     }
 
     /* if we fall to this point, the job did not immediately complete and
-     * we must queue up to test it later 
+     * we must queue up to test it later
      */
     *id = jd->job_id;
     trove_pending_count++;
-    jd->event_type = PVFS_EVENT_TROVE_BSTREAM_RESIZE;
 
     return (0);
 }
 
 /* job_trove_bstream_validate()
  *
- * check consistency of a bytestream for a given vtag 
+ * check consistency of a bytestream for a given vtag
  *
  * returns 0 on success, 1 on immediate completion, and -errno on
  * failure
@@ -2660,7 +2610,8 @@ int job_trove_bstream_validate(PVFS_fs_i
                                job_aint status_user_tag,
                                job_status_s * out_status_p,
                                job_id_t * id,
-                               job_context_id context_id)
+                               job_context_id context_id,
+                               PVFS_hint hints)
 {
     gossip_lerr("Error: unimplemented.\n");
     out_status_p->error_code = -PVFS_ENOSYS;
@@ -2669,7 +2620,7 @@ int job_trove_bstream_validate(PVFS_fs_i
 
 /* job_trove_keyval_remove()
  *
- * remove a key/value entry 
+ * remove a key/value entry
  *
  * returns 0 on success, 1 on immediate completion, and -errno on
  * failure
@@ -2684,11 +2635,12 @@ int job_trove_keyval_remove(PVFS_fs_id c
                             job_aint status_user_tag,
                             job_status_s * out_status_p,
                             job_id_t * id,
-                            job_context_id context_id)
+                            job_context_id context_id,
+                            PVFS_hint hints)
 {
     /* post a trove keyval remove.  If it completes (or fails)
-     * immediately, then return and fill in the status structure.  
-     * If it needs to be tested for completion later, then queue 
+     * immediately, then return and fill in the status structure.
+     * If it needs to be tested for completion later, then queue
      * up a job_desc structure.  */
     int ret = -1;
     struct job_desc *jd = NULL;
@@ -2703,6 +2655,7 @@ int job_trove_keyval_remove(PVFS_fs_id c
         out_status_p->error_code = -PVFS_ENOMEM;
         return 1;
     }
+    jd->hints = hints;
     jd->job_user_ptr = user_ptr;
     jd->u.trove.vtag = vtag;
     jd->context_id = context_id;
@@ -2710,12 +2663,11 @@ int job_trove_keyval_remove(PVFS_fs_id c
     jd->trove_callback.fn = trove_thread_mgr_callback;
     jd->trove_callback.data = (void*)jd;
     user_ptr_internal = &jd->trove_callback;
-    JOB_EVENT_START(PVFS_EVENT_TROVE_KEYVAL_REMOVE, jd->job_id);
 
 #ifdef __PVFS2_TROVE_SUPPORT__
     ret = trove_keyval_remove(coll_id, handle, key_p, val_p, flags,
-                              jd->u.trove.vtag, user_ptr_internal, 
-                              global_trove_context, &(jd->u.trove.id));
+                              jd->u.trove.vtag, user_ptr_internal,
+                              global_trove_context, &(jd->u.trove.id), hints);
 #else
     gossip_err("Error: Trove support not enabled.\n");
     ret = -ENOSYS;
@@ -2724,7 +2676,6 @@ int job_trove_keyval_remove(PVFS_fs_id c
     if (ret < 0)
     {
         /* error posting trove operation */
-        JOB_EVENT_END(PVFS_EVENT_TROVE_KEYVAL_REMOVE, 0, jd->job_id);
         dealloc_job_desc(jd);
         jd = NULL;
         out_status_p->error_code = ret;
@@ -2738,7 +2689,6 @@ int job_trove_keyval_remove(PVFS_fs_id c
         out_status_p->error_code = 0;
         out_status_p->status_user_tag = status_user_tag;
         out_status_p->vtag = jd->u.trove.vtag;
-        JOB_EVENT_END(PVFS_EVENT_TROVE_KEYVAL_REMOVE, 0, jd->job_id);
         dealloc_job_desc(jd);
         jd = NULL;
         return (ret);
@@ -2749,14 +2699,13 @@ int job_trove_keyval_remove(PVFS_fs_id c
      */
     *id = jd->job_id;
     trove_pending_count++;
-    jd->event_type = PVFS_EVENT_TROVE_KEYVAL_REMOVE;
 
     return (0);
 }
 
 /* job_trove_keyval_validate()
  *
- * check consistency of a key/value pair for a given vtag 
+ * check consistency of a key/value pair for a given vtag
  *
  * returns 0 on success, 1 on immediate completion, and -errno on
  * failure
@@ -2768,7 +2717,8 @@ int job_trove_keyval_validate(PVFS_fs_id
                               job_aint status_user_tag,
                               job_status_s * out_status_p,
                               job_id_t * id,
-                              job_context_id context_id)
+                              job_context_id context_id,
+                              PVFS_hint hints)
 {
     gossip_lerr("Error: unimplemented.\n");
     out_status_p->error_code = -PVFS_ENOSYS;
@@ -2777,7 +2727,7 @@ int job_trove_keyval_validate(PVFS_fs_id
 
 /* job_trove_keyval_iterate()
  *
- * iterate through all of the key/value pairs for a data space 
+ * iterate through all of the key/value pairs for a data space
  *
  * returns 0 on success, 1 on immediate completion, and -errno on
  * failure
@@ -2794,11 +2744,12 @@ int job_trove_keyval_iterate(PVFS_fs_id 
                              job_aint status_user_tag,
                              job_status_s * out_status_p,
                              job_id_t * id,
-                             job_context_id context_id)
+                             job_context_id context_id,
+                             PVFS_hint hints)
 {
     /* post a trove keyval iterate.  If it completes (or fails)
-     * immediately, then return and fill in the status structure.  
-     * If it needs to be tested for completion later, then queue 
+     * immediately, then return and fill in the status structure.
+     * If it needs to be tested for completion later, then queue
      * up a job_desc structure.  */
     int ret = -1;
     struct job_desc *jd = NULL;
@@ -2813,6 +2764,7 @@ int job_trove_keyval_iterate(PVFS_fs_id 
         out_status_p->error_code = -PVFS_ENOMEM;
         return 1;
     }
+    jd->hints = hints;
     jd->job_user_ptr = user_ptr;
     jd->u.trove.vtag = vtag;
     jd->u.trove.position = position;
@@ -2822,14 +2774,13 @@ int job_trove_keyval_iterate(PVFS_fs_id 
     jd->trove_callback.fn = trove_thread_mgr_callback;
     jd->trove_callback.data = (void*)jd;
     user_ptr_internal = &jd->trove_callback;
-    JOB_EVENT_START(PVFS_EVENT_TROVE_KEYVAL_ITERATE, jd->job_id);
 
 #ifdef __PVFS2_TROVE_SUPPORT__
     ret = trove_keyval_iterate(coll_id, handle,
                                &(jd->u.trove.position), key_array, val_array,
                                &(jd->u.trove.count), flags, jd->u.trove.vtag,
-                               user_ptr_internal, 
-                               global_trove_context, &(jd->u.trove.id));
+                               user_ptr_internal,
+                               global_trove_context, &(jd->u.trove.id), hints);
 #else
     gossip_err("Error: Trove support not enabled.\n");
     ret = -ENOSYS;
@@ -2838,7 +2789,6 @@ int job_trove_keyval_iterate(PVFS_fs_id 
     if (ret < 0)
     {
         /* error posting trove operation */
-        JOB_EVENT_END(PVFS_EVENT_TROVE_KEYVAL_ITERATE, 0, jd->job_id);
         dealloc_job_desc(jd);
         jd = NULL;
         out_status_p->error_code = ret;
@@ -2854,7 +2804,6 @@ int job_trove_keyval_iterate(PVFS_fs_id 
         out_status_p->vtag = jd->u.trove.vtag;
         out_status_p->position = jd->u.trove.position;
         out_status_p->count = jd->u.trove.count;
-        JOB_EVENT_END(PVFS_EVENT_TROVE_KEYVAL_ITERATE, 0, jd->job_id);
         dealloc_job_desc(jd);
         jd = NULL;
         return (ret);
@@ -2865,14 +2814,13 @@ int job_trove_keyval_iterate(PVFS_fs_id 
      */
     *id = jd->job_id;
     trove_pending_count++;
-    jd->event_type = PVFS_EVENT_TROVE_KEYVAL_ITERATE;
 
     return (0);
 }
 
 /* job_trove_keyval_iterate_keys()
  *
- * iterate through all of the keys for a data space 
+ * iterate through all of the keys for a data space
  *
  * returns 0 on success, 1 on immediate completion, and -errno on
  * failure
@@ -2888,11 +2836,12 @@ int job_trove_keyval_iterate_keys(PVFS_f
                              job_aint status_user_tag,
                              job_status_s * out_status_p,
                              job_id_t * id,
-                             job_context_id context_id)
+                             job_context_id context_id,
+                             PVFS_hint hints)
 {
     /* post a trove keyval iterate_keys.  If it completes (or fails)
-     * immediately, then return and fill in the status structure.  
-     * If it needs to be tested for completion later, then queue 
+     * immediately, then return and fill in the status structure.
+     * If it needs to be tested for completion later, then queue
      * up a job_desc structure.  */
     int ret = -1;
     struct job_desc *jd = NULL;
@@ -2907,6 +2856,7 @@ int job_trove_keyval_iterate_keys(PVFS_f
         out_status_p->error_code = -PVFS_ENOMEM;
         return 1;
     }
+    jd->hints = hints;
     jd->job_user_ptr = user_ptr;
     jd->u.trove.vtag = vtag;
     jd->u.trove.position = position;
@@ -2916,14 +2866,13 @@ int job_trove_keyval_iterate_keys(PVFS_f
     jd->trove_callback.fn = trove_thread_mgr_callback;
     jd->trove_callback.data = (void*)jd;
     user_ptr_internal = &jd->trove_callback;
-    JOB_EVENT_START(PVFS_EVENT_TROVE_KEYVAL_ITERATE_KEYS, jd->job_id);
 
 #ifdef __PVFS2_TROVE_SUPPORT__
     ret = trove_keyval_iterate_keys(coll_id, handle,
-                               &(jd->u.trove.position), key_array, 
+                               &(jd->u.trove.position), key_array,
                                &(jd->u.trove.count), flags, jd->u.trove.vtag,
-                               user_ptr_internal, 
-                               global_trove_context, &(jd->u.trove.id));
+                               user_ptr_internal,
+                               global_trove_context, &(jd->u.trove.id), hints);
 #else
     gossip_err("Error: Trove support not enabled.\n");
     ret = -ENOSYS;
@@ -2932,7 +2881,6 @@ int job_trove_keyval_iterate_keys(PVFS_f
     if (ret < 0)
     {
         /* error posting trove operation */
-        JOB_EVENT_END(PVFS_EVENT_TROVE_KEYVAL_ITERATE_KEYS, 0, jd->job_id);
         dealloc_job_desc(jd);
         jd = NULL;
         out_status_p->error_code = ret;
@@ -2948,7 +2896,6 @@ int job_trove_keyval_iterate_keys(PVFS_f
         out_status_p->vtag = jd->u.trove.vtag;
         out_status_p->position = jd->u.trove.position;
         out_status_p->count = jd->u.trove.count;
-        JOB_EVENT_END(PVFS_EVENT_TROVE_KEYVAL_ITERATE_KEYS, 0, jd->job_id);
         dealloc_job_desc(jd);
         jd = NULL;
         return (ret);
@@ -2959,7 +2906,6 @@ int job_trove_keyval_iterate_keys(PVFS_f
      */
     *id = jd->job_id;
     trove_pending_count++;
-    jd->event_type = PVFS_EVENT_TROVE_KEYVAL_ITERATE_KEYS;
 
     return (0);
 }
@@ -2983,8 +2929,8 @@ int job_trove_dspace_iterate_handles(PVF
     job_context_id context_id)
 {
     /* post a trove keyval iterate_handles.  If it completes (or fails)
-     * immediately, then return and fill in the status structure.  
-     * If it needs to be tested for completion later, then queue 
+     * immediately, then return and fill in the status structure.
+     * If it needs to be tested for completion later, then queue
      * up a job_desc structure.  */
     int ret = -1;
     struct job_desc *jd = NULL;
@@ -3008,13 +2954,12 @@ int job_trove_dspace_iterate_handles(PVF
     jd->trove_callback.fn = trove_thread_mgr_callback;
     jd->trove_callback.data = (void*)jd;
     user_ptr_internal = &jd->trove_callback;
-    JOB_EVENT_START(PVFS_EVENT_TROVE_DSPACE_ITERATE_HANDLES, jd->job_id);
 
 #ifdef __PVFS2_TROVE_SUPPORT__
     ret = trove_dspace_iterate_handles(coll_id,
                                &(jd->u.trove.position), handle_array,
                                &(jd->u.trove.count), flags, jd->u.trove.vtag,
-                               user_ptr_internal, 
+                               user_ptr_internal,
                                global_trove_context, &(jd->u.trove.id));
 #else
     gossip_err("Error: Trove support not enabled.\n");
@@ -3024,7 +2969,6 @@ int job_trove_dspace_iterate_handles(PVF
     if (ret < 0)
     {
         /* error posting trove operation */
-        JOB_EVENT_END(PVFS_EVENT_TROVE_DSPACE_ITERATE_HANDLES, 0, jd->job_id);
         dealloc_job_desc(jd);
         jd = NULL;
         out_status_p->error_code = ret;
@@ -3040,7 +2984,6 @@ int job_trove_dspace_iterate_handles(PVF
         out_status_p->vtag = jd->u.trove.vtag;
         out_status_p->position = jd->u.trove.position;
         out_status_p->count = jd->u.trove.count;
-        JOB_EVENT_END(PVFS_EVENT_TROVE_DSPACE_ITERATE_HANDLES, 0, jd->job_id);
         dealloc_job_desc(jd);
         jd = NULL;
         return (ret);
@@ -3051,7 +2994,6 @@ int job_trove_dspace_iterate_handles(PVF
      */
     *id = jd->job_id;
     trove_pending_count++;
-    jd->event_type = PVFS_EVENT_TROVE_DSPACE_ITERATE_HANDLES;
 
     return (0);
 }
@@ -3059,7 +3001,7 @@ int job_trove_dspace_iterate_handles(PVF
 
 /* job_trove_dspace_create()
  *
- * create a new data space object 
+ * create a new data space object
  *
  * returns 0 on success, 1 on immediate completion, and -errno on
  * failure
@@ -3073,7 +3015,8 @@ int job_trove_dspace_create(PVFS_fs_id c
                             job_aint status_user_tag,
                             job_status_s * out_status_p,
                             job_id_t * id,
-                            job_context_id context_id)
+                            job_context_id context_id,
+                            PVFS_hint hints)
 {
     /* post a dspace create.  If it completes (or fails) immediately, then
      * return and fill in the status structure.  If it needs to be tested
@@ -3092,6 +3035,7 @@ int job_trove_dspace_create(PVFS_fs_id c
         out_status_p->error_code = -PVFS_ENOMEM;
         return 1;
     }
+    jd->hints = hints;
     jd->job_user_ptr = user_ptr;
     jd->u.trove.handle = PVFS_HANDLE_NULL;
     jd->context_id = context_id;
@@ -3099,7 +3043,8 @@ int job_trove_dspace_create(PVFS_fs_id c
     jd->trove_callback.fn = trove_thread_mgr_callback;
     jd->trove_callback.data = (void*)jd;
     user_ptr_internal = &jd->trove_callback;
-    JOB_EVENT_START(PVFS_EVENT_TROVE_DSPACE_CREATE, jd->job_id);
+
+
 
 #ifdef __PVFS2_TROVE_SUPPORT__
     ret = trove_dspace_create(coll_id,
@@ -3107,8 +3052,8 @@ int job_trove_dspace_create(PVFS_fs_id c
                               &(jd->u.trove.handle),
                               type,
                               hint, flags,
-                              user_ptr_internal, 
-                              global_trove_context, &(jd->u.trove.id));
+                              user_ptr_internal,
+                              global_trove_context, &(jd->u.trove.id), hints);
 #else
     gossip_err("Error: Trove support not enabled.\n");
     ret = -ENOSYS;
@@ -3117,7 +3062,6 @@ int job_trove_dspace_create(PVFS_fs_id c
     if (ret < 0)
     {
         /* error posting trove operation */
-        JOB_EVENT_END(PVFS_EVENT_TROVE_DSPACE_CREATE, 0, jd->job_id);
         dealloc_job_desc(jd);
         jd = NULL;
         out_status_p->error_code = ret;
@@ -3131,7 +3075,6 @@ int job_trove_dspace_create(PVFS_fs_id c
         out_status_p->error_code = 0;
         out_status_p->status_user_tag = status_user_tag;
         out_status_p->handle = jd->u.trove.handle;
-        JOB_EVENT_END(PVFS_EVENT_TROVE_DSPACE_CREATE, 0, jd->job_id);
         dealloc_job_desc(jd);
         jd = NULL;
         return (ret);
@@ -3142,14 +3085,13 @@ int job_trove_dspace_create(PVFS_fs_id c
      */
     *id = jd->job_id;
     trove_pending_count++;
-    jd->event_type = PVFS_EVENT_TROVE_DSPACE_CREATE;
 
     return (0);
 }
 
 /* job_trove_dspace_remove()
  *
- * remove an entire data space object (byte stream and key/value) 
+ * remove an entire data space object (byte stream and key/value)
  *
  * returns 0 on success, 1 on immediate completion, and -errno on
  * failure
@@ -3161,7 +3103,8 @@ int job_trove_dspace_remove(PVFS_fs_id c
                             job_aint status_user_tag,
                             job_status_s * out_status_p,
                             job_id_t * id,
-                            job_context_id context_id)
+                            job_context_id context_id,
+                            PVFS_hint hints)
 {
     /* post a dspace remove.  If it completes (or fails) immediately, then
      * return and fill in the status structure.  If it needs to be tested
@@ -3186,13 +3129,14 @@ int job_trove_dspace_remove(PVFS_fs_id c
     jd->trove_callback.fn = trove_thread_mgr_callback;
     jd->trove_callback.data = (void*)jd;
     user_ptr_internal = &jd->trove_callback;
-    JOB_EVENT_START(PVFS_EVENT_TROVE_DSPACE_REMOVE, jd->job_id);
+
+
 
 #ifdef __PVFS2_TROVE_SUPPORT__
     ret = trove_dspace_remove(coll_id,
                               handle, flags,
-                              user_ptr_internal, 
-                              global_trove_context, &(jd->u.trove.id));
+                              user_ptr_internal,
+                              global_trove_context, &(jd->u.trove.id), hints);
 #else
     gossip_err("Error: Trove support not enabled.\n");
     ret = -ENOSYS;
@@ -3201,7 +3145,6 @@ int job_trove_dspace_remove(PVFS_fs_id c
     if (ret < 0)
     {
         /* error posting trove operation */
-        JOB_EVENT_END(PVFS_EVENT_TROVE_DSPACE_REMOVE, 0, jd->job_id);
         dealloc_job_desc(jd);
         jd = NULL;
         out_status_p->error_code = ret;
@@ -3214,7 +3157,6 @@ int job_trove_dspace_remove(PVFS_fs_id c
         /* immediate completion */
         out_status_p->error_code = 0;
         out_status_p->status_user_tag = status_user_tag;
-        JOB_EVENT_END(PVFS_EVENT_TROVE_DSPACE_REMOVE, 0, jd->job_id);
         dealloc_job_desc(jd);
         jd = NULL;
         return (ret);
@@ -3225,14 +3167,13 @@ int job_trove_dspace_remove(PVFS_fs_id c
      */
     *id = jd->job_id;
     trove_pending_count++;
-    jd->event_type = PVFS_EVENT_TROVE_DSPACE_REMOVE;
 
     return (0);
 }
 
 /* job_trove_dspace_verify()
  *
- * verify that a given dataspace exists and discover its type 
+ * verify that a given dataspace exists and discover its type
  *
  * returns 0 on success, 1 on immediate completion, and -errno on
  * failure
@@ -3244,7 +3185,8 @@ int job_trove_dspace_verify(PVFS_fs_id c
                             job_aint status_user_tag,
                             job_status_s * out_status_p,
                             job_id_t * id,
-                            job_context_id context_id)
+                            job_context_id context_id,
+                            PVFS_hint hints)
 {
     /* post a dspace verify.  If it completes (or fails) immediately, then
      * return and fill in the status structure.  If it needs to be tested
@@ -3269,13 +3211,14 @@ int job_trove_dspace_verify(PVFS_fs_id c
     jd->trove_callback.fn = trove_thread_mgr_callback;
     jd->trove_callback.data = (void*)jd;
     user_ptr_internal = &jd->trove_callback;
-    JOB_EVENT_START(PVFS_EVENT_TROVE_DSPACE_VERIFY, jd->job_id);
+
+
 
 #ifdef __PVFS2_TROVE_SUPPORT__
     ret = trove_dspace_verify(coll_id,
-                              handle, &jd->u.trove.type, 
+                              handle, &jd->u.trove.type,
                               flags,
-                              user_ptr_internal, global_trove_context, &(jd->u.trove.id));
+                              user_ptr_internal, global_trove_context, &(jd->u.trove.id), hints);
 #else
     gossip_err("Error: Trove support not enabled.\n");
     ret = -ENOSYS;
@@ -3284,7 +3227,6 @@ int job_trove_dspace_verify(PVFS_fs_id c
     if (ret < 0)
     {
         /* error posting trove operation */
-        JOB_EVENT_END(PVFS_EVENT_TROVE_DSPACE_VERIFY, 0, jd->job_id);
         dealloc_job_desc(jd);
         jd = NULL;
         /* the trove_method will determine what value is returned in immediate
@@ -3299,7 +3241,6 @@ int job_trove_dspace_verify(PVFS_fs_id c
         /* immediate completion */
         out_status_p->error_code = 0;
         out_status_p->status_user_tag = status_user_tag;
-        JOB_EVENT_END(PVFS_EVENT_TROVE_DSPACE_VERIFY, 0, jd->job_id);
         dealloc_job_desc(jd);
         jd = NULL;
         return (ret);
@@ -3310,7 +3251,6 @@ int job_trove_dspace_verify(PVFS_fs_id c
      */
     *id = jd->job_id;
     trove_pending_count++;
-    jd->event_type = PVFS_EVENT_TROVE_DSPACE_VERIFY;
 
     return (0);
 }
@@ -3390,7 +3330,7 @@ int job_trove_fs_create(char *collname,
     user_ptr_internal = &jd->trove_callback;
 
 #ifdef __PVFS2_TROVE_SUPPORT__
-    ret = trove_collection_create(collname, new_coll_id, user_ptr_internal, 
+    ret = trove_collection_create(collname, new_coll_id, user_ptr_internal,
         &(jd->u.trove.id));
 #else
     gossip_err("Error: Trove support not enabled.\n");
@@ -3428,7 +3368,7 @@ int job_trove_fs_create(char *collname,
 
 /* job_trove_fs_remove()
  *
- * remove an existing file system 
+ * remove an existing file system
  *
  * returns 0 on success, 1 on immediate completion, and -errno on
  * failure
@@ -3486,7 +3426,7 @@ int job_trove_fs_lookup(char *collname,
 #ifdef __PVFS2_TROVE_SUPPORT__
     ret = trove_collection_lookup(
         TROVE_METHOD_DBPF,
-        collname, &(jd->u.trove.fsid), 
+        collname, &(jd->u.trove.fsid),
         user_ptr_internal, &(jd->u.trove.id));
 #else
     gossip_err("Error: Trove support not enabled.\n");
@@ -3536,11 +3476,12 @@ int job_trove_fs_seteattr(PVFS_fs_id col
                           job_aint status_user_tag,
                           job_status_s * out_status_p,
                           job_id_t * id,
-                          job_context_id context_id)
+                          job_context_id context_id,
+                          PVFS_hint hints)
 {
     /* post a trove collection set eattr.  If it completes (or fails)
-     * immediately, then return and fill in the status structure.  
-     * If it needs to be tested for completion later, then queue 
+     * immediately, then return and fill in the status structure.
+     * If it needs to be tested for completion later, then queue
      * up a job_desc structure.  */
     int ret = -1;
     struct job_desc *jd = NULL;
@@ -3555,6 +3496,7 @@ int job_trove_fs_seteattr(PVFS_fs_id col
         out_status_p->error_code = -PVFS_ENOMEM;
         return 1;
     }
+    jd->hints = hints;
     jd->job_user_ptr = user_ptr;
     jd->context_id = context_id;
     jd->status_user_tag = status_user_tag;
@@ -3615,11 +3557,12 @@ int job_trove_fs_geteattr(PVFS_fs_id col
                           job_aint status_user_tag,
                           job_status_s * out_status_p,
                           job_id_t * id,
-                          job_context_id context_id)
+                          job_context_id context_id,
+                          PVFS_hint hints)
 {
     /* post a trove collection get eattr.  If it completes (or fails)
-     * immediately, then return and fill in the status structure.  
-     * If it needs to be tested for completion later, then queue 
+     * immediately, then return and fill in the status structure.
+     * If it needs to be tested for completion later, then queue
      * up a job_desc structure.  */
     int ret = -1;
     struct job_desc *jd = NULL;
@@ -3634,6 +3577,7 @@ int job_trove_fs_geteattr(PVFS_fs_id col
         out_status_p->error_code = -PVFS_ENOMEM;
         return 1;
     }
+    jd->hints = hints;
     jd->job_user_ptr = user_ptr;
     jd->context_id = context_id;
     jd->status_user_tag = status_user_tag;
@@ -3709,7 +3653,7 @@ int job_null(
     jd->u.null_info.error_code = error_code;
 
     gen_mutex_lock(&completion_mutex);
-    job_desc_q_add(completion_queue_array[jd->context_id], 
+    job_desc_q_add(completion_queue_array[jd->context_id],
         jd);
     /* set completed flag while holding queue lock */
     jd->completed_flag = 1;
@@ -3726,7 +3670,7 @@ int job_null(
 /* job_test()
  *
  * check for completion of a particular job, don't return until
- * either job completes or timeout expires 
+ * either job completes or timeout expires
  *
  * returns 0 if nothing done, 1 if something done, -errno on failure
  */
@@ -3754,7 +3698,7 @@ int job_test(job_id_t id,
 /* job_testsome()
  *
  * check for completion of a set of jobs, don't return until
- * either all jobs complete or timeout expires 
+ * either all jobs complete or timeout expires
  *
  * returns 0 on success, -errno on failure
  */
@@ -3811,7 +3755,7 @@ int job_testsome(job_id_t * id_array,
 
         if(timeout_ms > 0)
         {
-            pthread_ret = pthread_cond_timedwait(&completion_cond, 
+            pthread_ret = pthread_cond_timedwait(&completion_cond,
                 &completion_mutex,
                 &pthread_timeout);
         }
@@ -3836,7 +3780,7 @@ int job_testsome(job_id_t * id_array,
             EINVAL) && pthread_ret != ETIMEDOUT)
         {
             /* pthread_cond_wait() gave a weird return code; pass along to
-             * caller 
+             * caller
              */
             ret = pthread_ret;
         }
@@ -3850,7 +3794,7 @@ int job_testsome(job_id_t * id_array,
 /* job_testsome()
  *
  * check for completion of a set of jobs, don't return until
- * either all jobs complete or timeout expires 
+ * either all jobs complete or timeout expires
  *
  * returns 0 if nothing done, 1 if something done, -errno on failure
  */
@@ -3957,7 +3901,7 @@ int job_testsome(job_id_t * id_array,
             time_exhaust_flag = 1;
         }
         else if(timeout_ms < 0)
-        {   
+        {
             time_exhaust_flag = 0;
         }
         else
@@ -4050,7 +3994,7 @@ int job_testcontext(job_id_t * out_id_ar
 
         if(timeout_ms > 0)
         {
-            pthread_ret = pthread_cond_timedwait(&completion_cond, 
+            pthread_ret = pthread_cond_timedwait(&completion_cond,
                 &completion_mutex,
                 &pthread_timeout);
         }
@@ -4075,7 +4019,7 @@ int job_testcontext(job_id_t * out_id_ar
             EINVAL) && pthread_ret != ETIMEDOUT)
         {
             /* pthread_cond_wait() gave a weird return code; pass along to
-             * caller 
+             * caller
              */
             ret = pthread_ret;
         }
@@ -4195,7 +4139,7 @@ int job_testcontext(job_id_t * out_id_ar
             time_exhaust_flag = 1;
         }
         else if(timeout_ms < 0)
-        {   
+        {
             time_exhaust_flag = 0;
         }
         else
@@ -4288,16 +4232,16 @@ static void teardown_queues(void)
 
 /* trove_thread_mgr_callback()
  *
- * callback function executed by the thread manager for Trove when a Trove 
+ * callback function executed by the thread manager for Trove when a Trove
  * job completes
  *
  * no return value
  */
 static void trove_thread_mgr_callback(
-    void* data, 
+    void* data,
     PVFS_error error_code)
 {
-    struct job_desc* tmp_desc = (struct job_desc*)data; 
+    struct job_desc* tmp_desc = (struct job_desc*)data;
     assert(tmp_desc);
 
     gen_mutex_lock(&initialized_mutex);
@@ -4314,7 +4258,7 @@ static void trove_thread_mgr_callback(
     {
         /* set job descriptor fields and put into completion queue */
         tmp_desc->u.trove.state = error_code;
-        job_desc_q_add(completion_queue_array[tmp_desc->context_id], 
+        job_desc_q_add(completion_queue_array[tmp_desc->context_id],
                        tmp_desc);
         /* set completed flag while holding queue lock */
         tmp_desc->completed_flag = 1;
@@ -4337,7 +4281,7 @@ static void trove_thread_mgr_callback(
  * no return value
  */
 static void bmi_thread_mgr_callback(
-    void* data, 
+    void* data,
     PVFS_size actual_size,
     PVFS_error error_code)
 {
@@ -4376,7 +4320,7 @@ static void bmi_thread_mgr_callback(
 
 /* bmi_thread_mgr_unexp_handler()
  *
- * callback function executed by the thread manager for BMI when an unexpected 
+ * callback function executed by the thread manager for BMI when an unexpected
  * BMI message arrives
  *
  * no return value
@@ -4384,7 +4328,7 @@ static void bmi_thread_mgr_callback(
 static void bmi_thread_mgr_unexp_handler(
     struct BMI_unexpected_info* unexp)
 {
-    struct job_desc* tmp_desc = NULL; 
+    struct job_desc* tmp_desc = NULL;
 
     gen_mutex_lock(&initialized_mutex);
     if(initialized == 0)
@@ -4411,7 +4355,7 @@ static void bmi_thread_mgr_unexp_handler
         tmp_desc->completed_flag = 1;
         if (completion_queue_array[tmp_desc->context_id])
         {
-            job_desc_q_add(completion_queue_array[tmp_desc->context_id], 
+            job_desc_q_add(completion_queue_array[tmp_desc->context_id],
                            tmp_desc);
         }
 
@@ -4429,14 +4373,14 @@ static void bmi_thread_mgr_unexp_handler
 
 /* dev_thread_mgr_unexp_handler()
  *
- * callback function executed by the thread manager for dev when an unexpected 
+ * callback function executed by the thread manager for dev when an unexpected
  * device message arrives
  *
  * no return value
  */
 static void dev_thread_mgr_unexp_handler(struct PINT_dev_unexp_info* unexp)
 {
-    struct job_desc* tmp_desc = NULL; 
+    struct job_desc* tmp_desc = NULL;
 
     gen_mutex_lock(&dev_unexp_mutex);
     /* remove the operation from the pending dev_unexp queue */
@@ -4457,7 +4401,7 @@ static void dev_thread_mgr_unexp_handler
         tmp_desc->completed_flag = 1;
         if (completion_queue_array[tmp_desc->context_id])
         {
-            job_desc_q_add(completion_queue_array[tmp_desc->context_id], 
+            job_desc_q_add(completion_queue_array[tmp_desc->context_id],
                            tmp_desc);
         }
 
@@ -4536,16 +4480,13 @@ static void fill_status(struct job_desc 
         break;
     }
 
-    if(jd->event_type)
-        JOB_EVENT_END(jd->event_type, status->actual_size, jd->job_id);
-
     return;
 }
 
 /* do_one_test_cycle_req_sched()
  *
  * tests the request scheduler to see if anything has completed.
- * Does not block at all.  
+ * Does not block at all.
  *
  * returns 0 on success, -errno on failure
  */
@@ -4580,7 +4521,7 @@ static int do_one_test_cycle_req_sched(v
         gen_mutex_lock(&completion_mutex);
         /* set completed flag while holding queue lock */
         tmp_desc->completed_flag = 1;
-        job_desc_q_add(completion_queue_array[tmp_desc->context_id], 
+        job_desc_q_add(completion_queue_array[tmp_desc->context_id],
             tmp_desc);
         gen_mutex_unlock(&completion_mutex);
     }
@@ -4678,7 +4619,7 @@ static int completion_query_some(job_id_
     }
 
     /* we better not have lost any ops since the first loop through the job
-     * list 
+     * list
      */
     assert((*inout_count_p) == done_count);
 
@@ -4780,10 +4721,10 @@ static void do_one_work_cycle_all(int id
          * don't have a single thing to do.  Sleep here to prevent busy
          * spins.
          */
-        struct timespec ts; 
-         ts.tv_sec = idle_time_ms/1000; 
-         ts.tv_nsec = (idle_time_ms%1000)*1000*1000; 
-         nanosleep(&ts, NULL); 
+        struct timespec ts;
+         ts.tv_sec = idle_time_ms/1000;
+         ts.tv_nsec = (idle_time_ms%1000)*1000*1000;
+         nanosleep(&ts, NULL);
     }
 
     gen_mutex_unlock(&work_cycle_mutex);
@@ -4799,7 +4740,7 @@ static void do_one_work_cycle_all(int id
  */
 static void flow_callback(flow_descriptor* flow_d)
 {
-    struct job_desc* tmp_desc = (struct job_desc*)flow_d->user_ptr; 
+    struct job_desc* tmp_desc = (struct job_desc*)flow_d->user_ptr;
 
     gen_mutex_lock(&initialized_mutex);
     if(initialized == 0)
@@ -4812,7 +4753,7 @@ static void flow_callback(flow_descripto
 
     /* set job descriptor fields and put into completion queue */
     gen_mutex_lock(&completion_mutex);
-    job_desc_q_add(completion_queue_array[tmp_desc->context_id], 
+    job_desc_q_add(completion_queue_array[tmp_desc->context_id],
                    tmp_desc);
     /* set completed flag while holding queue lock */
     tmp_desc->completed_flag = 1;

Index: job.h
===================================================================
RCS file: /projects/cvsroot/pvfs2/src/io/job/job.h,v
diff -p -u -r1.56 -r1.56.2.1
--- job.h	4 Apr 2008 17:57:37 -0000	1.56
+++ job.h	7 Apr 2008 16:31:26 -0000	1.56.2.1
@@ -47,10 +47,11 @@ enum job_flags
     JOB_NO_IMMED_COMPLETE = 1
 };
 
+
 #define JOB_TIMEOUT_INF (-1)
 
 /******************************************************************
- * management functions 
+ * management functions
  */
 
 int job_initialize(int flags);
@@ -64,111 +65,115 @@ void job_close_context(job_context_id co
 int job_reset_timeout(job_id_t id, int timeout_sec);
 
 /******************************************************************
- * job posting functions 
+ * job posting functions
  */
 
 /* network send */
 int job_bmi_send(PVFS_BMI_addr_t addr,
-		 void *buffer,
-		 bmi_size_t size,
-		 bmi_msg_tag_t tag,
-		 enum bmi_buffer_type buffer_type,
-		 int send_unexpected,
-		 void *user_ptr,
-		 job_aint status_user_tag,
-		 job_status_s * out_status_p,
-		 job_id_t * id,
-		 job_context_id context_id,
-		 int timeout_sec);
+                 void *buffer,
+                 bmi_size_t size,
+                 bmi_msg_tag_t tag,
+                 enum bmi_buffer_type buffer_type,
+                 int send_unexpected,
+                 void *user_ptr,
+                 job_aint status_user_tag,
+                 job_status_s * out_status_p,
+                 job_id_t * id,
+                 job_context_id context_id,
+                 int timeout_sec,
+                 PVFS_hint hints);
 
 /* network send (list of buffers) */
 int job_bmi_send_list(PVFS_BMI_addr_t addr,
-		      void **buffer_list,
-		      bmi_size_t * size_list,
-		      int list_count,
-		      bmi_size_t total_size,
-		      bmi_msg_tag_t tag,
-		      enum bmi_buffer_type buffer_type,
-		      int send_unexpected,
-		      void *user_ptr,
-		      job_aint status_user_tag,
-		      job_status_s * out_status_p,
-		      job_id_t * id,
-		      job_context_id context_id,
-		      int timeout_sec);
+                      void **buffer_list,
+                      bmi_size_t * size_list,
+                      int list_count,
+                      bmi_size_t total_size,
+                      bmi_msg_tag_t tag,
+                      enum bmi_buffer_type buffer_type,
+                      int send_unexpected,
+                      void *user_ptr,
+                      job_aint status_user_tag,
+                      job_status_s * out_status_p,
+                      job_id_t * id,
+                      job_context_id context_id,
+                      int timeout_sec,
+                      PVFS_hint hints);
 
 /* network receive */
 int job_bmi_recv(PVFS_BMI_addr_t addr,
-		 void *buffer,
-		 bmi_size_t size,
-		 bmi_msg_tag_t tag,
-		 enum bmi_buffer_type buffer_type,
-		 void *user_ptr,
-		 job_aint status_user_tag,
-		 job_status_s * out_status_p,
-		 job_id_t * id,
-		 job_context_id context_id,
-		 int timeout_sec);
+                 void *buffer,
+                 bmi_size_t size,
+                 bmi_msg_tag_t tag,
+                 enum bmi_buffer_type buffer_type,
+                 void *user_ptr,
+                 job_aint status_user_tag,
+                 job_status_s * out_status_p,
+                 job_id_t * id,
+                 job_context_id context_id,
+                 int timeout_sec,
+                 PVFS_hint hints);
 
 /* network receive (list of buffers) */
 int job_bmi_recv_list(PVFS_BMI_addr_t addr,
-		      void **buffer_list,
-		      bmi_size_t * size_list,
-		      int list_count,
-		      bmi_size_t total_expected_size,
-		      bmi_msg_tag_t tag,
-		      enum bmi_buffer_type buffer_type,
-		      void *user_ptr,
-		      job_aint status_user_tag,
-		      job_status_s * out_status_p,
-		      job_id_t * id,
-		      job_context_id context_id,
-		      int timeout_sec);
+                      void **buffer_list,
+                      bmi_size_t * size_list,
+                      int list_count,
+                      bmi_size_t total_expected_size,
+                      bmi_msg_tag_t tag,
+                      enum bmi_buffer_type buffer_type,
+                      void *user_ptr,
+                      job_aint status_user_tag,
+                      job_status_s * out_status_p,
+                      job_id_t * id,
+                      job_context_id context_id,
+                      int timeout_sec,
+                      PVFS_hint hints);
 
 /* unexpected network receive */
 int job_bmi_unexp(struct BMI_unexpected_info *bmi_unexp_d,
-		  void *user_ptr,
-		  job_aint status_user_tag,
-		  job_status_s * out_status_p,
-		  job_id_t * id,
-		  enum job_flags flags,
-		  job_context_id context_id);
+                  void *user_ptr,
+                  job_aint status_user_tag,
+                  job_status_s * out_status_p,
+                  job_id_t * id,
+                  enum job_flags flags,
+                  job_context_id context_id);
 
 int job_bmi_cancel(job_id_t id,
-		   job_context_id context_id);
+                   job_context_id context_id);
 
 /* unexpected device receive */
 int job_dev_unexp(struct PINT_dev_unexp_info* dev_unexp_d,
-		  void* user_ptr,
-		  job_aint status_user_tag,
-		  job_status_s * out_status_p,
-		  job_id_t* id,
-		  enum job_flags flags,
-		  job_context_id context_id);
+                  void* user_ptr,
+                  job_aint status_user_tag,
+                  job_status_s * out_status_p,
+                  job_id_t* id,
+                  enum job_flags flags,
+                  job_context_id context_id);
 
 /* device write */
 int job_dev_write(void* buffer,
-		  int size,
-		  PVFS_id_gen_t tag,
-		  enum PINT_dev_buffer_type buffer_type,
-		  void* user_ptr,
-		  job_aint status_user_tag,
-		  job_status_s * out_status_p,
-		  job_id_t * id,
-		  job_context_id context_id);
+                  int size,
+                  PVFS_id_gen_t tag,
+                  enum PINT_dev_buffer_type buffer_type,
+                  void* user_ptr,
+                  job_aint status_user_tag,
+                  job_status_s * out_status_p,
+                  job_id_t * id,
+                  job_context_id context_id);
 
 /* device write list */
 int job_dev_write_list(void** buffer_list,
-		       int* size_list,
-		       int list_count,
-		       int total_size,
-		       PVFS_id_gen_t tag,
-		       enum PINT_dev_buffer_type buffer_type,
-		       void* user_ptr,
-		       job_aint status_user_tag,
-		       job_status_s* out_status_p,
-		       job_id_t* id,
-		       job_context_id context_id);
+                       int* size_list,
+                       int list_count,
+                       int total_size,
+                       PVFS_id_gen_t tag,
+                       enum PINT_dev_buffer_type buffer_type,
+                       void* user_ptr,
+                       job_aint status_user_tag,
+                       job_status_s* out_status_p,
+                       job_id_t* id,
+                       job_context_id context_id);
 
 /* request scheduler post */
 int job_req_sched_post(enum PVFS_server_op op,
@@ -191,45 +196,47 @@ int job_req_sched_change_mode(enum PVFS_
                               job_context_id context_id);
 
 int job_req_sched_post_timer(int msecs,
-		       void *user_ptr,
-		       job_aint status_user_tag,
-		       job_status_s * out_status_p,
-		       job_id_t * id,
-		       job_context_id context_id);
+                             void *user_ptr,
+                             job_aint status_user_tag,
+                             job_status_s * out_status_p,
+                             job_id_t * id,
+                             job_context_id context_id);
 
 /* request scheduler release */
 int job_req_sched_release(job_id_t in_completed_id,
-			  void *user_ptr,
-			  job_aint status_user_tag,
-			  job_status_s * out_status_p,
-			  job_id_t * out_id,
-			  job_context_id context_id);
+                          void *user_ptr,
+                          job_aint status_user_tag,
+                          job_status_s * out_status_p,
+                          job_id_t * out_id,
+                          job_context_id context_id);
 
 
 /* complex I/O operation (disk, net, or mem) */
 int job_flow(flow_descriptor * flow_d,
-	     void *user_ptr,
-	     job_aint status_user_tag,
-	     job_status_s * out_status_p,
-	     job_id_t * id,
-	     job_context_id context_id,
-	     int timeout_sec);
+             void *user_ptr,
+             job_aint status_user_tag,
+             job_status_s * out_status_p,
+             job_id_t * id,
+             job_context_id context_id,
+             int timeout_sec,
+             PVFS_hint hints);
 
 int job_flow_cancel(job_id_t id, job_context_id context_id);
 
 /* storage byte stream write */
 int job_trove_bstream_write_at(PVFS_fs_id coll_id,
-			       PVFS_handle handle,
-			       PVFS_offset offset,
-			       void *buffer,
-			       PVFS_size size,
-			       PVFS_ds_flags flags,
-			       PVFS_vtag * vtag,
-			       void *user_ptr,
-			       job_aint status_user_tag,
-			       job_status_s * out_status_p,
-			       job_id_t * id,
-			       job_context_id context_id);
+                               PVFS_handle handle,
+                               PVFS_offset offset,
+                               void *buffer,
+                               PVFS_size size,
+                               PVFS_ds_flags flags,
+                               PVFS_vtag * vtag,
+                               void *user_ptr,
+                               job_aint status_user_tag,
+                               job_status_s * out_status_p,
+                               job_id_t * id,
+                               job_context_id context_id,
+                               PVFS_hint hints);
 
 int job_trove_bstream_write_list(PVFS_fs_id coll_id,
                                  PVFS_handle handle,
@@ -246,22 +253,24 @@ int job_trove_bstream_write_list(PVFS_fs
                                  job_aint status_user_tag,
                                  job_status_s * out_status_p,
                                  job_id_t * id,
-                                 job_context_id context_id);
+                                 job_context_id context_id,
+                                 PVFS_hint hints);
 
 
 /* storage byte stream read */
 int job_trove_bstream_read_at(PVFS_fs_id coll_id,
-			      PVFS_handle handle,
-			      PVFS_offset offset,
-			      void *buffer,
-			      PVFS_size size,
-			      PVFS_ds_flags flags,
-			      PVFS_vtag * vtag,
-			      void *user_ptr,
-			      job_aint status_user_tag,
-			      job_status_s * out_status_p,
-			      job_id_t * id,
-			      job_context_id context_id);
+                              PVFS_handle handle,
+                              PVFS_offset offset,
+                              void *buffer,
+                              PVFS_size size,
+                              PVFS_ds_flags flags,
+                              PVFS_vtag * vtag,
+                              void *user_ptr,
+                              job_aint status_user_tag,
+                              job_status_s * out_status_p,
+                              job_id_t * id,
+                              job_context_id context_id,
+                              PVFS_hint hints);
 
 int job_trove_bstream_read_list(PVFS_fs_id coll_id,
                                 PVFS_handle handle,
@@ -278,82 +287,89 @@ int job_trove_bstream_read_list(PVFS_fs_
                                 job_aint status_user_tag,
                                 job_status_s * out_status_p,
                                 job_id_t * id,
-                                job_context_id context_id);
+                                job_context_id context_id,
+                                PVFS_hint hints);
 
 /* byte stream flush to storage */
 int job_trove_bstream_flush(PVFS_fs_id coll_id,
-			    PVFS_handle handle,
-			    PVFS_ds_flags flags,
-			    void *user_ptr,
-			    job_aint status_user_tag,
-			    job_status_s * out_status_p,
-			    job_id_t * id,
-			    job_context_id context_id);
-	
+                            PVFS_handle handle,
+                            PVFS_ds_flags flags,
+                            void *user_ptr,
+                            job_aint status_user_tag,
+                            job_status_s * out_status_p,
+                            job_id_t * id,
+                            job_context_id context_id,
+                            PVFS_hint hints);
+
 /* storage key/value read */
 int job_trove_keyval_read(PVFS_fs_id coll_id,
-			  PVFS_handle handle,
-			  PVFS_ds_keyval * key_p,
-			  PVFS_ds_keyval * val_p,
-			  PVFS_ds_flags flags,
-			  PVFS_vtag * vtag,
-			  void *user_ptr,
-			  job_aint status_user_tag,
-			  job_status_s * out_status_p,
-			  job_id_t * id,
-			  job_context_id context_id);
+                          PVFS_handle handle,
+                          PVFS_ds_keyval * key_p,
+                          PVFS_ds_keyval * val_p,
+                          PVFS_ds_flags flags,
+                          PVFS_vtag * vtag,
+                          void *user_ptr,
+                          job_aint status_user_tag,
+                          job_status_s * out_status_p,
+                          job_id_t * id,
+                          job_context_id context_id,
+                          PVFS_hint hints);
 
 /* storage key/value read list */
 int job_trove_keyval_read_list(PVFS_fs_id coll_id,
-			       PVFS_handle handle,
-			       PVFS_ds_keyval * key_array,
-			       PVFS_ds_keyval * val_array,
+                               PVFS_handle handle,
+                               PVFS_ds_keyval * key_array,
+                               PVFS_ds_keyval * val_array,
                                PVFS_error * err_array,
-			       int count,
-			       PVFS_ds_flags flags,
-			       PVFS_vtag * vtag,
-			       void *user_ptr,
-			       job_aint status_user_tag,
-			       job_status_s * out_status_p,
-			       job_id_t * id,
-			       job_context_id context_id);
+                               int count,
+                               PVFS_ds_flags flags,
+                               PVFS_vtag * vtag,
+                               void *user_ptr,
+                               job_aint status_user_tag,
+                               job_status_s * out_status_p,
+                               job_id_t * id,
+                               job_context_id context_id,
+                               PVFS_hint hints);
 
 /* storage key/value write */
 int job_trove_keyval_write(PVFS_fs_id coll_id,
-			   PVFS_handle handle,
-			   PVFS_ds_keyval * key_p,
-			   PVFS_ds_keyval * val_p,
-			   PVFS_ds_flags flags,
-			   PVFS_vtag * vtag,
-			   void *user_ptr,
-			   job_aint status_user_tag,
-			   job_status_s * out_status_p,
-			   job_id_t * id,
-			   job_context_id context_id);
+                           PVFS_handle handle,
+                           PVFS_ds_keyval * key_p,
+                           PVFS_ds_keyval * val_p,
+                           PVFS_ds_flags flags,
+                           PVFS_vtag * vtag,
+                           void *user_ptr,
+                           job_aint status_user_tag,
+                           job_status_s * out_status_p,
+                           job_id_t * id,
+                           job_context_id context_id,
+                           PVFS_hint hints);
 
 /* storage key/value write list */
 int job_trove_keyval_write_list(PVFS_fs_id coll_id,
-			        PVFS_handle handle,
-			        PVFS_ds_keyval * key_array,
-			        PVFS_ds_keyval * val_array,
-			        int count,
-			        PVFS_ds_flags flags,
-			        PVFS_vtag * vtag,
-			        void *user_ptr,
-			        job_aint status_user_tag,
-			        job_status_s * out_status_p,
-			        job_id_t * id,
-			        job_context_id context_id);
+                                PVFS_handle handle,
+                                PVFS_ds_keyval * key_array,
+                                PVFS_ds_keyval * val_array,
+                                int count,
+                                PVFS_ds_flags flags,
+                                PVFS_vtag * vtag,
+                                void *user_ptr,
+                                job_aint status_user_tag,
+                                job_status_s * out_status_p,
+                                job_id_t * id,
+                                job_context_id context_id,
+                                PVFS_hint hints);
 
 /* flush keyval data to storage */
 int job_trove_keyval_flush(PVFS_fs_id coll_id,
-			    PVFS_handle handle,
-			    PVFS_ds_flags flags,
-			    void * user_ptr,
-			    job_aint status_user_tag,
-			    job_status_s * out_status_p,
-			    job_id_t * id,
-			    job_context_id context_id);
+                           PVFS_handle handle,
+                           PVFS_ds_flags flags,
+                           void * user_ptr,
+                           job_aint status_user_tag,
+                           job_status_s * out_status_p,
+                           job_id_t * id,
+                           job_context_id context_id,
+                           PVFS_hint hints);
 
 /* get handle info for a keyval */
 int job_trove_keyval_get_handle_info(PVFS_fs_id coll_id,
@@ -364,210 +380,225 @@ int job_trove_keyval_get_handle_info(PVF
                                      job_aint status_user_tag,
                                      job_status_s * out_status_p,
                                      job_id_t * id,
-                                     job_context_id context_id);
+                                     job_context_id context_id,
+                                     PVFS_hint hints);
 
 /* read generic dspace attributes */
 int job_trove_dspace_getattr(PVFS_fs_id coll_id,
-			     PVFS_handle handle,
-			     void *user_ptr,
+                             PVFS_handle handle,
+                             void *user_ptr,
                              PVFS_ds_attributes *out_ds_attr_ptr,
-			     job_aint status_user_tag,
-			     job_status_s * out_status_p,
-			     job_id_t * id,
-			     job_context_id context_id);
+                             job_aint status_user_tag,
+                             job_status_s * out_status_p,
+                             job_id_t * id,
+                             job_context_id context_id,
+                             PVFS_hint hints);
 
 /* read generic dspace attributes for a set of handles */
 int job_trove_dspace_getattr_list(PVFS_fs_id coll_id,
-                             int nhandles,
-                             PVFS_handle *handle_array,
-                             void *user_ptr,
-                             PVFS_error *out_error_array,
-                             PVFS_ds_attributes *out_ds_attr_ptr,
-                             job_aint status_user_tag,
-                             job_status_s *out_status_p,
-                             job_id_t *id,
-                             job_context_id context_id);
+                                  int nhandles,
+                                  PVFS_handle *handle_array,
+                                  void *user_ptr,
+                                  PVFS_error *out_error_array,
+                                  PVFS_ds_attributes *out_ds_attr_ptr,
+                                  job_aint status_user_tag,
+                                  job_status_s *out_status_p,
+                                  job_id_t *id,
+                                  job_context_id context_id,
+                                  PVFS_hint hints);
 
 /* write generic dspace attributes */
 int job_trove_dspace_setattr(PVFS_fs_id coll_id,
-			     PVFS_handle handle,
-			     PVFS_ds_attributes * ds_attr_p,
+                             PVFS_handle handle,
+                             PVFS_ds_attributes * ds_attr_p,
                              PVFS_ds_flags flags,
-			     void *user_ptr,
-			     job_aint status_user_tag,
-			     job_status_s * out_status_p,
-			     job_id_t * id,
-			     job_context_id context_id);
+                             void *user_ptr,
+                             job_aint status_user_tag,
+                             job_status_s * out_status_p,
+                             job_id_t * id,
+                             job_context_id context_id,
+                             PVFS_hint hints);
 
 /* resize (truncate or preallocate) a storage byte stream */
 int job_trove_bstream_resize(PVFS_fs_id coll_id,
-			     PVFS_handle handle,
-			     PVFS_size size,
-			     PVFS_ds_flags flags,
-			     PVFS_vtag * vtag,
-			     void *user_ptr,
-			     job_aint status_user_tag,
-			     job_status_s * out_status_p,
-			     job_id_t * id,
-			     job_context_id context_id);
+                             PVFS_handle handle,
+                             PVFS_size size,
+                             PVFS_ds_flags flags,
+                             PVFS_vtag * vtag,
+                             void *user_ptr,
+                             job_aint status_user_tag,
+                             job_status_s * out_status_p,
+                             job_id_t * id,
+                             job_context_id context_id,
+                             PVFS_hint hints);
 
 /* check consistency of a bytestream for a given vtag */
 int job_trove_bstream_validate(PVFS_fs_id coll_id,
-			       PVFS_handle handle,
-			       PVFS_vtag * vtag,
-			       void *user_ptr,
-			       job_aint status_user_tag,
-			       job_status_s * out_status_p,
-			       job_id_t * id,
-			       job_context_id context_id);
+                               PVFS_handle handle,
+                               PVFS_vtag * vtag,
+                               void *user_ptr,
+                               job_aint status_user_tag,
+                               job_status_s * out_status_p,
+                               job_id_t * id,
+                               job_context_id context_id,
+                               PVFS_hint hints);
 
 /* remove a key/value entry */
 int job_trove_keyval_remove(PVFS_fs_id coll_id,
-			    PVFS_handle handle,
-			    PVFS_ds_keyval * key_p,
+                            PVFS_handle handle,
+                            PVFS_ds_keyval * key_p,
                             PVFS_ds_keyval * val_p,
-			    PVFS_ds_flags flags,
-			    PVFS_vtag * vtag,
-			    void *user_ptr,
-			    job_aint status_user_tag,
-			    job_status_s * out_status_p,
-			    job_id_t * id,
-			    job_context_id context_id);
+                            PVFS_ds_flags flags,
+                            PVFS_vtag * vtag,
+                            void *user_ptr,
+                            job_aint status_user_tag,
+                            job_status_s * out_status_p,
+                            job_id_t * id,
+                            job_context_id context_id,
+                            PVFS_hint hints);
 
 /* check consistency of a key/value pair for a given vtag */
 int job_trove_keyval_validate(PVFS_fs_id coll_id,
-			      PVFS_handle handle,
-			      PVFS_vtag * vtag,
-			      void *user_ptr,
-			      job_aint status_user_tag,
-			      job_status_s * out_status_p,
-			      job_id_t * id,
-			      job_context_id context_id);
+                              PVFS_handle handle,
+                              PVFS_vtag * vtag,
+                              void *user_ptr,
+                              job_aint status_user_tag,
+                              job_status_s * out_status_p,
+                              job_id_t * id,
+                              job_context_id context_id,
+                              PVFS_hint hints);
 
 /* iterate through all of the key/value pairs for a data space */
 int job_trove_keyval_iterate(PVFS_fs_id coll_id,
-			     PVFS_handle handle,
-			     PVFS_ds_position position,
-			     PVFS_ds_keyval * key_array,
-			     PVFS_ds_keyval * val_array,
-			     int count,
-			     PVFS_ds_flags flags,
-			     PVFS_vtag * vtag,
-			     void *user_ptr,
-			     job_aint status_user_tag,
-			     job_status_s * out_status_p,
-			     job_id_t * id,
-			     job_context_id context_id);
+                             PVFS_handle handle,
+                             PVFS_ds_position position,
+                             PVFS_ds_keyval * key_array,
+                             PVFS_ds_keyval * val_array,
+                             int count,
+                             PVFS_ds_flags flags,
+                             PVFS_vtag * vtag,
+                             void *user_ptr,
+                             job_aint status_user_tag,
+                             job_status_s * out_status_p,
+                             job_id_t * id,
+                             job_context_id context_id,
+                             PVFS_hint hints);
 
 /* iterate through all of the keys for a data space */
 int job_trove_keyval_iterate_keys(PVFS_fs_id coll_id,
-				  PVFS_handle handle,
-				  PVFS_ds_position position,
-				  PVFS_ds_keyval * key_array,
-				  int count,
-				  PVFS_ds_flags flags,
-				  PVFS_vtag * vtag,
-				  void *user_ptr,
-				  job_aint status_user_tag,
-				  job_status_s * out_status_p,
-				  job_id_t * id,
-				  job_context_id context_id);
+                                  PVFS_handle handle,
+                                  PVFS_ds_position position,
+                                  PVFS_ds_keyval * key_array,
+                                  int count,
+                                  PVFS_ds_flags flags,
+                                  PVFS_vtag * vtag,
+                                  void *user_ptr,
+                                  job_aint status_user_tag,
+                                  job_status_s * out_status_p,
+                                  job_id_t * id,
+                                  job_context_id context_id,
+                                  PVFS_hint hints);
 
 /* iterates through all handles in a collection */
 int job_trove_dspace_iterate_handles(PVFS_fs_id coll_id,
-				     PVFS_ds_position position,
-				     PVFS_handle* handle_array,
-				     int count,
-				     PVFS_ds_flags flags,
-				     PVFS_vtag* vtag,
-				     void* user_ptr,
-				     job_aint status_user_tag,
-				     job_status_s* out_status_p,
-				     job_id_t* id,
-				     job_context_id context_id);
+                                     PVFS_ds_position position,
+                                     PVFS_handle* handle_array,
+                                     int count,
+                                     PVFS_ds_flags flags,
+                                     PVFS_vtag* vtag,
+                                     void* user_ptr,
+                                     job_aint status_user_tag,
+                                     job_status_s* out_status_p,
+                                     job_id_t* id,
+                                     job_context_id context_id);
 
 /* create a new data space object */
 int job_trove_dspace_create(PVFS_fs_id coll_id,
-			    PVFS_handle_extent_array *handle_extent_array,
-			    PVFS_ds_type type,
-			    void *hint,
+                            PVFS_handle_extent_array *handle_extent_array,
+                            PVFS_ds_type type,
+                            void *hint,
                             PVFS_ds_flags flags,
-			    void *user_ptr,
-			    job_aint status_user_tag,
-			    job_status_s * out_status_p,
-			    job_id_t * id,
-			    job_context_id context_id);
+                            void *user_ptr,
+                            job_aint status_user_tag,
+                            job_status_s * out_status_p,
+                            job_id_t * id,
+                            job_context_id context_id,
+                            PVFS_hint hints);
 
 /* remove an entire data space object (byte stream and key/value) */
 int job_trove_dspace_remove(PVFS_fs_id coll_id,
-			    PVFS_handle handle,
+                            PVFS_handle handle,
                             PVFS_ds_flags flags,
-			    void *user_ptr,
-			    job_aint status_user_tag,
-			    job_status_s * out_status_p,
-			    job_id_t * id,
-			    job_context_id context_id);
+                            void *user_ptr,
+                            job_aint status_user_tag,
+                            job_status_s * out_status_p,
+                            job_id_t * id,
+                            job_context_id context_id,
+                            PVFS_hint hints);
 
 /* verify that a given dataspace exists and discover its type */
 int job_trove_dspace_verify(PVFS_fs_id coll_id,
-			    PVFS_handle handle,
+                            PVFS_handle handle,
                             PVFS_ds_flags flags,
-			    void *user_ptr,
-			    job_aint status_user_tag,
-			    job_status_s * out_status_p,
-			    job_id_t * id,
-			    job_context_id context_id);
+                            void *user_ptr,
+                            job_aint status_user_tag,
+                            job_status_s * out_status_p,
+                            job_id_t * id,
+                            job_context_id context_id,
+                            PVFS_hint hints);
 
 int job_trove_dspace_cancel(PVFS_fs_id coll_id,
-			    job_id_t id,
-			    job_context_id context_id);
+                            job_id_t id,
+                            job_context_id context_id);
 
 /* create a new file system */
 int job_trove_fs_create(char *collname,
-			PVFS_fs_id new_coll_id,
-			void *user_ptr,
-			job_aint status_user_tag,
-			job_status_s * out_status_p,
-			job_id_t * id,
-			job_context_id context_id);
+                        PVFS_fs_id new_coll_id,
+                        void *user_ptr,
+                        job_aint status_user_tag,
+                        job_status_s * out_status_p,
+                        job_id_t * id,
+                        job_context_id context_id);
 
 /* remove an existing file system */
 int job_trove_fs_remove(char *collname,
-			void *user_ptr,
-			job_aint status_user_tag,
-			job_status_s * out_status_p,
-			job_id_t * id,
-			job_context_id context_id);
+                        void *user_ptr,
+                        job_aint status_user_tag,
+                        job_status_s * out_status_p,
+                        job_id_t * id,
+                        job_context_id context_id);
 
 /* lookup a file system based on a string name */
 int job_trove_fs_lookup(char *collname,
-			void *user_ptr,
-			job_aint status_user_tag,
-			job_status_s * out_status_p,
-			job_id_t * id,
-			job_context_id context_id);
+                        void *user_ptr,
+                        job_aint status_user_tag,
+                        job_status_s * out_status_p,
+                        job_id_t * id,
+                        job_context_id context_id);
 
 /* set extended attributes for a file system */
 int job_trove_fs_seteattr(PVFS_fs_id coll_id,
-			  PVFS_ds_keyval * key_p,
-			  PVFS_ds_keyval * val_p,
-			  PVFS_ds_flags flags,
-			  void *user_ptr,
-			  job_aint status_user_tag,
-			  job_status_s * out_status_p,
-			  job_id_t * id,
-			  job_context_id context_id);
+                          PVFS_ds_keyval * key_p,
+                          PVFS_ds_keyval * val_p,
+                          PVFS_ds_flags flags,
+                          void *user_ptr,
+                          job_aint status_user_tag,
+                          job_status_s * out_status_p,
+                          job_id_t * id,
+                          job_context_id context_id,
+                          PVFS_hint hints);
 
 /* read extended attributes for a file system */
 int job_trove_fs_geteattr(PVFS_fs_id coll_id,
-			  PVFS_ds_keyval * key_p,
-			  PVFS_ds_keyval * val_p,
-			  PVFS_ds_flags flags,
-			  void *user_ptr,
-			  job_aint status_user_tag,
-			  job_status_s * out_status_p,
-			  job_id_t * id,
-			  job_context_id context_id);
+                          PVFS_ds_keyval * key_p,
+                          PVFS_ds_keyval * val_p,
+                          PVFS_ds_flags flags,
+                          void *user_ptr,
+                          job_aint status_user_tag,
+                          job_status_s * out_status_p,
+                          job_id_t * id,
+                          job_context_id context_id,
+                          PVFS_hint hints);
 
 int job_null(
     int error_code,
@@ -578,30 +609,30 @@ int job_null(
     job_context_id context_id);
 
 /******************************************************************
- * job test/wait for completion functions 
+ * job test/wait for completion functions
  */
 
 int job_test(job_id_t id,
-	     int *out_count_p,
-	     void **returned_user_ptr_p,
-	     job_status_s * out_status_p,
-	     int timeout_ms,
-	     job_context_id context_id);
+             int *out_count_p,
+             void **returned_user_ptr_p,
+             job_status_s * out_status_p,
+             int timeout_ms,
+             job_context_id context_id);
 
 int job_testsome(job_id_t * id_array,
-		 int *inout_count_p,
-		 int *out_index_array,
-		 void **returned_user_ptr_array,
-		 job_status_s * out_status_array_p,
-		 int timeout_ms,
-		 job_context_id context_id);
+                 int *inout_count_p,
+                 int *out_index_array,
+                 void **returned_user_ptr_array,
+                 job_status_s * out_status_array_p,
+                 int timeout_ms,
+                 job_context_id context_id);
 
 int job_testcontext(job_id_t * out_id_array_p,
-		  int *inout_count_p,
-		  void **returned_user_ptr_array,
-		  job_status_s * out_status_array_p,
-		  int timeout_ms,
-		  job_context_id context_id);
+                    int *inout_count_p,
+                    void **returned_user_ptr_array,
+                    job_status_s * out_status_array_p,
+                    int timeout_ms,
+                    job_context_id context_id);
 
 #endif /* __JOB_H */
 

Index: thread-mgr.c
===================================================================
RCS file: /projects/cvsroot/pvfs2/src/io/job/thread-mgr.c,v
diff -p -u -r1.37 -r1.37.4.1
--- thread-mgr.c	21 Feb 2008 19:24:15 -0000	1.37
+++ thread-mgr.c	7 Apr 2008 16:31:26 -0000	1.37.4.1
@@ -16,11 +16,15 @@
 #include "trove.h"
 #include "pvfs2-internal.h"
 
+#include "pint-event.h"
+#include <stdio.h>
+
 #define THREAD_MGR_TEST_COUNT 5
 #define THREAD_MGR_TEST_TIMEOUT 10
 static int thread_mgr_test_timeout = THREAD_MGR_TEST_TIMEOUT;
 
 /* TODO: organize this stuff better */
+static void *__bmi_thread_function(void *ptr);
 static void *bmi_thread_function(void *ptr);
 static void *trove_thread_function(void *ptr);
 static void *dev_thread_function(void *ptr);
@@ -147,6 +151,15 @@ static void *trove_thread_function(void 
 }
 
 
+static void *__bmi_thread_function(void *ptr) {
+    void* ret = NULL;
+    PINT_event_thread_start("BMI");
+    ret = bmi_thread_function(ptr);
+    PINT_event_thread_stop();
+    return ret;
+}
+
+
 /* bmi_thread_function()
  *
  * function executed by the thread in charge of BMI
@@ -180,6 +193,7 @@ static void *bmi_thread_function(void *p
 #ifdef __PVFS2_JOB_THREADED__
                 continue;
 #endif
+
                 return NULL;
 	    }
 
@@ -255,6 +269,7 @@ static void *bmi_thread_function(void *p
             gossip_err("bmi_thread_function thread terminating\n");
             break;
 #endif
+
             return NULL;
 	}
 
@@ -473,7 +488,7 @@ int PINT_thread_mgr_bmi_start(void)
 
     bmi_thread_running = 1;
 #ifdef __PVFS2_JOB_THREADED__
-    ret = pthread_create(&bmi_thread_id, NULL, bmi_thread_function, NULL);
+    ret = pthread_create(&bmi_thread_id, NULL, __bmi_thread_function, NULL);
     if(ret != 0)
     {
 	BMI_close_context(global_bmi_context);
@@ -832,7 +847,7 @@ void PINT_thread_mgr_trove_push(int max_
 void PINT_thread_mgr_bmi_push(int max_idle_time)
 {
     thread_mgr_test_timeout = max_idle_time;
-    bmi_thread_function(NULL);
+    __bmi_thread_function(NULL);
 }
 
 /*



More information about the Pvfs2-cvs mailing list