Commit 908251ec authored by Scotty Bauer's avatar Scotty Bauer
Browse files

BetaModule BetaModule2 MakeFiles



Fixed bug in USE_FLOOD Macro that didn't properly update the slot we're supposed to be writing into.

Test is 10k floods of 32 messages. BetaModule1 uses slow math (Imul/divu) while beta2 is using the fast math (and shl)

Test1:
Apr  3 13:42:01 localhost kernel: [  487.326686] MIN    MAX     AVG     MEDIAN
Apr  3 13:42:01 localhost kernel: [  487.329795] 3244 & 144184 & 3728 & 3692
Median time normalized per msg:115 cycles

Test2:
Apr  3 13:43:41 localhost kernel: [  587.197275] MIN    MAX     AVG     MEDIAN
Apr  3 13:43:41 localhost kernel: [  587.200322] 4476 & 318180 & 4888 & 4794
Median time noramlized per msg:149cycles

Test3:
Apr  3 13:44:14 localhost kernel: [  620.868921] MIN    MAX     AVG     MEDIAN
Apr  3 13:44:14 localhost kernel: [  620.872026] 4176 & 156498 & 4613 & 4511
Median time normalized per msg:140Cycles
Signed-off-by: Scotty Bauer's avatarScotty Bauer <sbauer@eng.utah.edu>
parent c344d088
......@@ -3,8 +3,8 @@ obj-m := test.o
#CFLAGS_betaModule2.o = -DDEBUG -DDEBUG_MWAIT_RETRY -DTIMING -g -Wall
#CFLAGS_ring-channel.o = -DDEBUG -DDEBUG_MWAIT_RETRY -DTIMING -g -Wall
CFLAGS_test.o = -O2 -DUSE_POLL #-DDEBUG_MWAIT_RETRY #-DDEBUG
CFLAGS_betaModule2.o = -O2 -DUSE_POLL #-DDEBUG_MWAIT_RETRY #-DDEBUG
CFLAGS_test.o = -O2 -DUSE_POLL -DUSE_FLOOD #-DDEBUG_MWAIT_RETRY #-DDEBUG
CFLAGS_betaModule2.o = -O2 -DUSE_POLL -DUSE_FLOOD #-DDEBUG_MWAIT_RETRY #-DDEBUG
CFLAGS_ring-channel.o = -O2
......
......@@ -227,15 +227,19 @@ static int ipc_thread_func(void *input)
prod_msg = get_next_available_slot(prod_channel, local_prod);
cons_msg = get_next_available_slot(cons_channel, local_cons);
#if !defined(USE_FLOOD)
while (count < NUM_LOOPS) {
#endif
#if defined(USE_FLOOD)
while (count < NUM_LOOPS * FLOOD_SIZE) {
#endif
/* wait and get message */
wait_for_consumer_slot(cons_msg, cTok);
//if (wait_for_consumer_slot(cons_channel, local_cons, &imsg, cTok))
// break;
/* NOTIFY RECEVD */
//cons_msg->monitor = pTok;
cons_msg->monitor = pTok;
//pr_debug("Notified recvd on CPU %d at volatile location %p\n",
// CPU_NUM, &cons_msg->monitor);
......
......@@ -3,8 +3,8 @@ obj-m := betaModule1.o
#CFLAGS_betaModule.o = -DDEBUG -DDEBUG_MWAIT_RETRY -DTIMING -g -Wall
#CFLAGS_ring-channel.o = -DDEBUG -DDEBUG_MWAIT_RETRY -DTIMING -g -Wall
CFLAGS_betaModule1.o = -g -O2 -DUSE_POLL -DTIMING #-DDEBUG #-DDEBUG_MWAIT_RETRY
CFLAGS_betaModule.o = -g -O2 -DUSE_POLL -DTIMING #-DDEBUG #-DDEBUG_MWAIT_RETRY #-DDEBUG
CFLAGS_betaModule1.o = -g -O2 -DUSE_POLL -DTIMING -DUSE_FLOOD #-DDEBUG #-DDEBUG_MWAIT_RETRY
CFLAGS_betaModule.o = -g -O2 -DUSE_POLL -DTIMING -DUSE_FLOOD #-DDEBUG #-DDEBUG_MWAIT_RETRY #-DDEBUG
CFLAGS_ring-channel.o = -g -O2
betaModule1-objs := ./ring-chan/ring-channel.o ./betaModule.o
......
......@@ -286,6 +286,7 @@ static int ipc_thread_func(void *input)
prod_msg->monitor = cTok;
local_prod++;
#if defined(USE_FLOOD)
prod_msg = get_next_available_slot(prod_channel, local_prod);
}
for (i = 0; i < FLOOD_SIZE; i++) {
......@@ -294,16 +295,18 @@ static int ipc_thread_func(void *input)
wait_for_consumer_slot(cons_msg, cTok);
/* ack the msg */
//cons_msg->monitor = pTok;
//local_cons++;
cons_msg->monitor = pTok;
local_cons++;
#if defined(USE_FLOOD)
cons_msg = get_next_available_slot(cons_channel, local_cons);
}
#endif
end64 = RDTSCP();
#if !defined(USE_FLOOD)
prod_msg = get_next_available_slot(prod_channel, local_prod);
cons_msg = get_next_available_slot(cons_channel, local_cons);
#endif
count++;
......@@ -314,7 +317,7 @@ static int ipc_thread_func(void *input)
#endif
}
return 1;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment