Commit 63e316e5 authored by Scotty Bauer's avatar Scotty Bauer
Browse files

Fixed bug in make file. cpu_relax() now actually gets compiled into pause...


Fixed bug in make file. cpu_relax() now actually gets compiled into pause latency drops ~30-40 cycles, new numbers incoming
Signed-off-by: Scotty Bauer's avatarScotty Bauer <sbauer@eng.utah.edu>
parent b19e7af2
......@@ -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 -DUSE_FLOOD #-DDEBUG_MWAIT_RETRY #-DDEBUG
CFLAGS_betaModule2.o = -O2 -DUSE_POLL -DUSE_FLOOD #-DDEBUG_MWAIT_RETRY #-DDEBUG
CFLAGS_test.o = -O2 -DPOLL #-DUSE_FLOOD #-DDEBUG_MWAIT_RETRY #-DDEBUG
CFLAGS_betaModule2.o = -O2 -DPOLL #-DUSE_FLOOD #-DDEBUG_MWAIT_RETRY #-DDEBUG
CFLAGS_ring-channel.o = -O2
......
......@@ -163,7 +163,7 @@ static int wait_for_producer_slot(struct ipc_message *imsg, unsigned int token)
#endif//usemwait
#if defined(POLL)
cpu_relax();
asm volatile("pause" ::: "memory");
//asm volatile("pause" ::: "memory");
#endif
}
return 0;
......@@ -180,7 +180,7 @@ static int wait_for_consumer_slot(struct ipc_message *imsg, unsigned int token)
#endif//usemwait
#if defined(POLL)
cpu_relax();
asm volatile("pause" ::: "memory");
//asm volatile("pause" ::: "memory");
#endif
}
return 0;
......
......@@ -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 -DUSE_FLOOD #-DDEBUG #-DDEBUG_MWAIT_RETRY
CFLAGS_betaModule.o = -g -O2 -DUSE_POLL -DTIMING -DUSE_FLOOD #-DDEBUG #-DDEBUG_MWAIT_RETRY #-DDEBUG
CFLAGS_betaModule1.o = -g -O2 -DPOLL -DTIMING #-DUSE_FLOOD #-DDEBUG #-DDEBUG_MWAIT_RETRY
CFLAGS_betaModule.o = -g -O2 -DPOLL -DTIMING #-DUSE_FLOOD #-DDEBUG #-DDEBUG_MWAIT_RETRY #-DDEBUG
CFLAGS_ring-channel.o = -g -O2
betaModule1-objs := ./ring-chan/ring-channel.o ./betaModule.o
......
......@@ -176,8 +176,9 @@ static int wait_for_producer_slot(struct ipc_message *imsg, unsigned int token)
monitor_mwait(ecx, &imsg->monitor, cstate_wait);
#endif//usemwait
#if defined(POLL)
cpu_relax();
asm volatile("pause" ::: "memory");
cpu_relax();
// asm volatile("pause" ::: "memory");
//__builting_ia32_pause();
#endif
}
return 0;
......@@ -193,8 +194,8 @@ static int wait_for_consumer_slot(struct ipc_message *imsg, unsigned int token)
monitor_mwait(ecx, &imsg->monitor, cstate_wait);
#endif//usemwait
#if defined(POLL)
cpu_relax();
asm volatile("pause" ::: "memory");
cpu_relax();
//asm volatile("pause" ::: "memory");
#endif
}
return 0;
......
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