Skip to content

Commit

Permalink
Fixed perforamnce issues by bringing back missing asm(pause)
Browse files Browse the repository at this point in the history
  • Loading branch information
mgrosvenor committed Aug 5, 2015
1 parent ecf9a92 commit 40b1752
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 14 deletions.
46 changes: 33 additions & 13 deletions process_perf_serv.py
Expand Up @@ -12,24 +12,44 @@

get_new_normal_start = 0;
get_new_normal_end = 0;
thing = 0

i = 0
last = -1
start = 0
for line in open(pfile):
if i < 1:
i += 1
if i < 100 * 1000:
i+=1
continue
if i > 100 * 1000:
break;
if i > 110 * 1000:
break
(mode,id,cond,ts,data) = line[:-1].split(",")

if(mode == "A" and id=="30"):
get_new_buffers_start = ts

else: #if(mode == "O" and id=="40"):
cycles = int(ts) - int(get_new_buffers_start)
# if(mode == "A" and id=="4" and cond =="0"):
# start = int(ts)
# last = 0
# print("\n#%s%5s [%3s,%3s] - %3.3f ++%3.3f" % (mode,id,cond,data,start,start-thing) )
# thing = start
#
# #if(mode == "O" and (id=="100")):
# elif(last >= 0):
# if mode == "A" and id=="4" and cond =="0":
if 1:
if(start == 0):
start=int(ts)
cycles = int(ts) - start
time = cycles / 3.1
print("%s,%s %3.3f (%s)" % (mode, id, time,data))
delta = time - last
last = time
print "$%s%5s [%3s,%3s] - %5.2f +%4.2f" % (mode,id,cond,data,time,delta),
if(delta > 900):
print "<---"
else:
print
#print("%3.3f (%s,%s (OID=%s))" % (time,cond,data,id))
#print("%3.3f" % (time))


i += 1

i += 1
# else:
# print("DROPPED $%s%5s [%3s,%3s]" % (mode,id,cond,data))

1 change: 1 addition & 0 deletions src/multiplexers/spin_mux.c
Expand Up @@ -103,6 +103,7 @@ camio_error_t spin_select(camio_mux_t* this, struct timeval* timeout, camio_muxa
camio_error_t err = muxable->vtable.ready(muxable);

if(err == CAMIO_ETRYAGAIN){
__asm__ __volatile__("pause;");
continue; //Nothing more to see here folks, come back later
}

Expand Down
2 changes: 1 addition & 1 deletion tools/camio_perf/camio_perf_client.c
Expand Up @@ -264,7 +264,7 @@ static inline void prepare_data_msg(camio_msg_t* msg)
msg->type = CAMIO_MSG_TYPE_WRITE_DATA_REQ;
camio_wr_data_req_t* wr_data_req = &msg->wr_data_req;
//Put data in the packet from the packet template
//memcpy(wr_data_req->buffer->data_start, packet_data, bytes_to_send);
memcpy(wr_data_req->buffer->data_start, packet_data, bytes_to_send);
wr_data_req->buffer->data_len = bytes_to_send;
wr_data_req->dst_offset_hint = CAMIO_WRITE_REQ_DST_OFFSET_NONE;
wr_data_req->src_offset_hint = CAMIO_WRITE_REQ_SRC_OFFSET_NONE;
Expand Down

0 comments on commit 40b1752

Please sign in to comment.