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 ...@@ -3,8 +3,8 @@ obj-m := test.o
#CFLAGS_betaModule2.o = -DDEBUG -DDEBUG_MWAIT_RETRY -DTIMING -g -Wall #CFLAGS_betaModule2.o = -DDEBUG -DDEBUG_MWAIT_RETRY -DTIMING -g -Wall
#CFLAGS_ring-channel.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_test.o = -O2 -DPOLL #-DUSE_FLOOD #-DDEBUG_MWAIT_RETRY #-DDEBUG
CFLAGS_betaModule2.o = -O2 -DUSE_POLL -DUSE_FLOOD #-DDEBUG_MWAIT_RETRY #-DDEBUG CFLAGS_betaModule2.o = -O2 -DPOLL #-DUSE_FLOOD #-DDEBUG_MWAIT_RETRY #-DDEBUG
CFLAGS_ring-channel.o = -O2 CFLAGS_ring-channel.o = -O2
......
...@@ -163,7 +163,7 @@ static int wait_for_producer_slot(struct ipc_message *imsg, unsigned int token) ...@@ -163,7 +163,7 @@ static int wait_for_producer_slot(struct ipc_message *imsg, unsigned int token)
#endif//usemwait #endif//usemwait
#if defined(POLL) #if defined(POLL)
cpu_relax(); cpu_relax();
asm volatile("pause" ::: "memory"); //asm volatile("pause" ::: "memory");
#endif #endif
} }
return 0; return 0;
...@@ -180,7 +180,7 @@ static int wait_for_consumer_slot(struct ipc_message *imsg, unsigned int token) ...@@ -180,7 +180,7 @@ static int wait_for_consumer_slot(struct ipc_message *imsg, unsigned int token)
#endif//usemwait #endif//usemwait
#if defined(POLL) #if defined(POLL)
cpu_relax(); cpu_relax();
asm volatile("pause" ::: "memory"); //asm volatile("pause" ::: "memory");
#endif #endif
} }
return 0; return 0;
......
...@@ -3,8 +3,8 @@ obj-m := betaModule1.o ...@@ -3,8 +3,8 @@ obj-m := betaModule1.o
#CFLAGS_betaModule.o = -DDEBUG -DDEBUG_MWAIT_RETRY -DTIMING -g -Wall #CFLAGS_betaModule.o = -DDEBUG -DDEBUG_MWAIT_RETRY -DTIMING -g -Wall
#CFLAGS_ring-channel.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_betaModule1.o = -g -O2 -DPOLL -DTIMING #-DUSE_FLOOD #-DDEBUG #-DDEBUG_MWAIT_RETRY
CFLAGS_betaModule.o = -g -O2 -DUSE_POLL -DTIMING -DUSE_FLOOD #-DDEBUG #-DDEBUG_MWAIT_RETRY #-DDEBUG CFLAGS_betaModule.o = -g -O2 -DPOLL -DTIMING #-DUSE_FLOOD #-DDEBUG #-DDEBUG_MWAIT_RETRY #-DDEBUG
CFLAGS_ring-channel.o = -g -O2 CFLAGS_ring-channel.o = -g -O2
betaModule1-objs := ./ring-chan/ring-channel.o ./betaModule.o 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) ...@@ -176,8 +176,9 @@ static int wait_for_producer_slot(struct ipc_message *imsg, unsigned int token)
monitor_mwait(ecx, &imsg->monitor, cstate_wait); monitor_mwait(ecx, &imsg->monitor, cstate_wait);
#endif//usemwait #endif//usemwait
#if defined(POLL) #if defined(POLL)
cpu_relax(); cpu_relax();
asm volatile("pause" ::: "memory"); // asm volatile("pause" ::: "memory");
//__builting_ia32_pause();
#endif #endif
} }
return 0; return 0;
...@@ -193,8 +194,8 @@ static int wait_for_consumer_slot(struct ipc_message *imsg, unsigned int token) ...@@ -193,8 +194,8 @@ static int wait_for_consumer_slot(struct ipc_message *imsg, unsigned int token)
monitor_mwait(ecx, &imsg->monitor, cstate_wait); monitor_mwait(ecx, &imsg->monitor, cstate_wait);
#endif//usemwait #endif//usemwait
#if defined(POLL) #if defined(POLL)
cpu_relax(); cpu_relax();
asm volatile("pause" ::: "memory"); //asm volatile("pause" ::: "memory");
#endif #endif
} }
return 0; 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