All new accounts created on Gitlab now require administrator approval. If you invite any collaborators, please let Flux staff know so they can approve the accounts.

Commit 55a0190d authored by Scotty Bauer's avatar Scotty Bauer

Mwait numbers

Signed-off-by: Scotty Bauer's avatarScotty Bauer <sbauer@eng.utah.edu>
parent 01b7a15d
......@@ -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 -DPOLL -DUSE_FLOOD #-DDEBUG_MWAIT_RETRY #-DDEBUG
CFLAGS_betaModule2.o = -O2 -DPOLL -DUSE_FLOOD #-DDEBUG_MWAIT_RETRY #-DDEBUG
CFLAGS_test.o = -O2 -DUSE_MWAIT -DUSE_FLOOD #-DDEBUG_MWAIT_RETRY #-DDEBUG
CFLAGS_betaModule2.o = -O2 -DUSE_MWAIT -DUSE_FLOOD #-DDEBUG_MWAIT_RETRY #-DDEBUG
CFLAGS_ring-channel.o = -O2
......
......@@ -177,6 +177,7 @@ static int wait_for_consumer_slot(struct ipc_message *imsg, unsigned int token)
while (likely(check_cons_slot_available(imsg, token))) {
#if defined(USE_MWAIT)
cpu_relax();
monitor_mwait(ecx, &imsg->monitor, cstate_wait);
#endif//usemwait
#if defined(POLL)
......
......@@ -174,6 +174,7 @@ static int wait_for_producer_slot(struct ipc_message *imsg, unsigned int token)
while (check_prod_slot_available(imsg, token)) {
#if defined(USE_MWAIT)
cpu_relax();
monitor_mwait(ecx, &imsg->monitor, cstate_wait);
#endif//usemwait
#if defined(POLL)
......
......@@ -2,13 +2,13 @@
int CHAN_NUM_PAGES = 16;
int BUF_SIZE = 124;
int BUF_SIZE = 60;
int NUM_LOOPS = 10000;
int FLOOD_SIZE = 1;
#if defined(USE_MWAIT)
unsigned long ecx = 1; /*break of interrupt flag */
unsigned long cstate_wait = 0x0; /* 4 states, 0x0, 0x1 0x10 0x20 */
unsigned long cstate_wait = 0x20; /* 4 states, 0x0, 0x1 0x10 0x20 */
#endif
......@@ -21,7 +21,7 @@ struct ipc_container{
/*Don't let gcc do anything cute, we need this to be 128 bytes */
struct ipc_message{
char message[124];
char message[60];
volatile uint32_t monitor;
}__attribute__((packed));
......
#!/bin/bash
echo "UNLOADING DRIVERS"
rmmod betaModule
rmmod betaModule2
rmmod betaModule1
rmmod test
cd /home/scotty/research/xcap/norepo/kernel;
cd /users/sbauer/ipc/xcap/xcap/kernel
make clean;
make | grep "error"
......@@ -13,7 +13,7 @@ if [ $? == 0 ]; then
exit
fi
insmod betaModule.ko;
insmod betaModule1.ko;
cd 2
make clean
......@@ -25,7 +25,9 @@ if [ $? == 0 ]; then
exit
fi
insmod betaModule2.ko
insmod test.ko
cd ../
ls /dev/ --color | grep beta
../userland/uland 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