Permalink
Browse files

Several things done here:

   1. Removing most warnings during compiling process
   2. Fix one issue in cbuf/deallocate and now there is no assert
      happened in cbuf side
  • Loading branch information...
songjiguo committed Oct 3, 2011
1 parent 1b9103b commit b443602235d7930bc33f509ec1b1ace46eab7d3c
View
@@ -2,12 +2,12 @@
# four paths:
# the directory this file is in
-TOP_DIR=/home/interwq/research/composite/src/
+TOP_DIR=/home/songjiguo/research/composite/src/
# the directory the linux source is in
-LDIR=/home/interwq/research/linux-2.6.33/
+LDIR=/home/songjiguo/research/linux-2.6.33/
# the directory all objects will be copied to when they are ready for
# deployment
-TRANS_DIR=/home/interwq/transfer
+TRANS_DIR=/home/songjiguo/transfer
# the directory that root can access that the objects are copied to
# where the experiments are run from
TEST_DIR=/root/experiments/
@@ -226,11 +226,11 @@ struct cbuf_slab_freelist {
};
extern struct cbuf_slab_freelist slab_freelists[N_CBUF_SLABS];
-static inline void printfl(struct cbuf_slab_freelist *fl){
+static inline void printfl(struct cbuf_slab_freelist *fl, char *c){
struct cbuf_slab *p;
p = fl->list;
while (p) {
- printc("p->cbid %d @ %p\n", p->cbid, p->mem);
+ printc("[[[ %s p->cbid %d @ %p\n]]]", c, p->cbid, p->mem);
p = FIRST_LIST(p, next, prev);
if (p==fl->list) break;
}
@@ -250,6 +250,8 @@ slab_rem_freelist(struct cbuf_slab *s, struct cbuf_slab_freelist *fl)
fl->npages--;
assert(fl->npages >= 0);
+ printc("thd %d REM:fl->npages %d cbid is %d\n",cos_get_thd_id(),fl->npages, s->cbid);
+ /* printfl(fl,"REM"); */
return;
}
@@ -269,59 +271,22 @@ slab_add_freelist(struct cbuf_slab *s, struct cbuf_slab_freelist *fl)
}
fl->list = s;
fl->npages++;
- return;
-}
+ printc("thd %d ADD:fl->npages %d cbid is %d\n",cos_get_thd_id(),fl->npages, s->cbid);
+ /* printfl(fl,"ADD"); */
-static int cbuf_vect_del(cos_vect_t *v, long id)
-{
- assert(v);
- if (__cbuf_vect_set((cbuf_vect_t *)v, id, (void*)CBUF_VECT_INIT_VAL)) return 1;
- return 0;
+ return;
}
static void
slab_deallocate(struct cbuf_slab *s, struct cbuf_slab_freelist *fl)
{
slab_rem_freelist(s, fl);
- cbuf_vect_del(&slab_descs, (u32_t)s->mem >> PAGE_ORDER);
+ cos_vect_del(&slab_descs, (u32_t)s->mem >> PAGE_ORDER);
free(s);
return;
}
-/* static inline void */
-/* slab_freelist_lookup(int cbid, struct cbuf_slab_freelist *fl) */
-/* { */
-/* struct cbuf_slab *free = NULL; */
-
-/* int ret = 0; */
-
-/* printc("look up my freelist\n"); */
-/* if (!fl) goto done; */
-/* printc("2\n"); */
-/* if (!fl->list) goto done; */
-
-/* printc("3\n"); */
-/* /\* if (fl->list->cbid == cbid) return fl->list; *\/ */
-
-/* for (free = FIRST_LIST(fl->list, next, prev); */
-/* free != fl->list; */
-/* free = FIRST_LIST(free, next, prev)) { */
-/* printc("2\n"); */
-/* if (free->cbid == cbid) { */
-/* assert(fl->npages > 0); */
-/* ret++; */
-/* if(ret > 1) { */
-/* slab_rem_freelist(free, fl); */
-/* ret--; */
-/* } */
-/* } */
-/* } */
-/* printc("duplics :: %d\n", duplics); */
-
-/* return; */
-
-/* } */
extern struct cbuf_slab *cbuf_slab_alloc(int size, struct cbuf_slab_freelist *freelist);
extern void cbuf_slab_free(struct cbuf_slab *s);
@@ -417,7 +382,7 @@ __cbuf_alloc(struct cbuf_slab_freelist *slab_freelist, int size, cbuf_t *cb)
cm.c_0.v = (u32_t)cbuf_vect_lookup(&meta_cbuf, cbidx);
if (unlikely(!cm.c_0.v || cm.c.ptr != ((u32_t)s->mem >> PAGE_ORDER))) {
slab_deallocate(s, slab_freelist);
- /* printc("goto again\n"); */
+ printc("goto again\n");
goto again;
}
@@ -168,16 +168,9 @@ cbuf_slab_free(struct cbuf_slab *s)
if(cos_comp_info.cos_tmem_relinquish[COMP_INFO_TMEM_CBUF_RELINQ] == 1){
assert(!CBUF_IN_USE(cm.c.flags));
printc("need relinquish\n");
- /* cm.c.flags |= CBUFM_RELINQUISH_TEST; */
- /* cbuf_vect_add_id(&meta_cbuf, (void*)cm.c_0.v, cbid_to_meta_idx(s->cbid)); */
cbuf_c_delete(cos_spd_id(), s->cbid);
- /* if (cm.c_0.v = (u32_t)cbuf_vect_lookup(&meta_cbuf, cbid_to_meta_idx(s->cbid))){ */
- /* cm.c.flags &= ~CBUFM_RELINQUISH_TEST; */
- /* cbuf_vect_add_id(&meta_cbuf, (void*)cm.c_0.v, cbid_to_meta_idx(s->cbid)); */
- /* } */
-
}
return;
@@ -10,7 +10,7 @@
#define MEM_POOL_H_
#define NUM_TMEM_MGR 2
-#define MAX_NUM_MEM 80
+#define MAX_NUM_MEM 200
int mempool_put_mem(spdid_t d_spdid, void* mgr_addr);
void *mempool_get_mem(spdid_t spdid, int pages);
Binary file not shown.

Large diffs are not rendered by default.

Oops, something went wrong.
@@ -1,10 +1,10 @@
#ifndef COS_CONFIG_H
#define COS_CONFIG_H
-#define CPU_GHZ 3.39
+#define CPU_GHZ 2.534
#define CPU_TIMER_FREQ 100 // set in your linux .config
-#define RUNTIME 6 // seconds
+#define RUNTIME 60 // seconds
// After how many seconds should schedulers print out their information?
#define SCHED_PRINTOUT_PERIOD 50
@@ -1 +1 @@
-kernel//home/interwq/research/composite/src/platform/linux/module/cos.ko
+kernel//home/songjiguo/research/composite/src/platform/linux/module/cos.ko
@@ -1 +1 @@
-kernel//home/interwq/research/composite/src/platform/linux/net/cnet.ko
+kernel//home/songjiguo/research/composite/src/platform/linux/net/cnet.ko
@@ -11,20 +11,11 @@
(!p1.o=exe_cb_pt.o),a11'p7 e700 s0 d120';\
(!p2.o=exe_cb_pt.o),a8'p4 e3600 s0 d120';\
(!p3.o=exe_cb_pt.o),a10'p6 e2400 s0 d120';\
-(!p4.o=exe_cb_pt.o),a10'p6 e600 s0 d120';\
-(!p5.o=exe_cb_pt.o),a7'p3 e1500 s0 d120';\
-(!p6.o=exe_cb_pt.o),a7'p3 e1800 s0 d120';\
-(!p7.o=exe_cb_pt.o),a12'p13 e10400 s0 d120';\
-(!p8.o=exe_cb_pt.o),a14'p29 e2900 s0 d120';\
-(!p9.o=exe_cb_pt.o),a13'p17 e6800 s0 d120';\
\
(!sh0.o=exe_cb_sh.o),'s50000 n1';(!sh1.o=exe_cb_sh.o),'s5000 n1 r2';(!sh2.o=exe_cb_sh.o),'s50000 n1 r96 ';\
(!sh3.o=exe_cb_sh.o),'s5000 n1 r32';(!sh4.o=exe_cb_sh.o),'s50000 n1 r125';(!sh5.o=exe_cb_sh.o),'s50000 n1 r96 ';\
(!sh6.o=exe_cb_sh.o),'s50000 n1 r32';(!sh7.o=exe_cb_sh.o),'s50000 n1 r96';(!sh8.o=exe_cb_sh.o),'s500000 n1 ';\
\
-(!sh12.o=exe_cb_sh.o),'s500000 n1 r32';(!sh13.o=exe_cb_sh.o),'s50000 n1 r32';(!sh14.o=exe_cb_sh.o),'s50000 n1 r32';\
-(!sh9.o=exe_cb_sh.o),'s50000 n1 r32';(!sh10.o=exe_cb_sh.o),'s500000 n1 r32';(!sh11.o=exe_cb_sh.o),'s50000 n1 r32';\
-\
(!sh18.o=exe_cb_sh.o),'s500000 n1 r32';(!sh19.o=exe_cb_sh.o),'s50000 n1 r32';(!sh20.o=exe_cb_sh.o),'s50000 n1 r96';\
(!sh15.o=exe_cb_sh.o),'s50000 n1 r32';(!sh16.o=exe_cb_sh.o),'s5000 n1 r32';(!sh17.o=exe_cb_sh.o),'s50000 n1 r96';\
\
@@ -52,19 +43,6 @@ p0.o-te.o|fprr.o|schedconf.o|print.o|sh18.o|smn.o;\
p1.o-te.o|fprr.o|schedconf.o|print.o|sh18.o|smn.o;\
p2.o-te.o|fprr.o|schedconf.o|print.o|sh18.o|smn.o;\
p3.o-te.o|fprr.o|schedconf.o|print.o|sh18.o|smn.o;\
-p4.o-te.o|fprr.o|schedconf.o|print.o|sh18.o|smn.o;\
-p5.o-te.o|fprr.o|schedconf.o|print.o|sh12.o|smn.o;\
-p6.o-te.o|fprr.o|schedconf.o|print.o|sh12.o|smn.o;\
-p7.o-te.o|fprr.o|schedconf.o|print.o|sh12.o|smn.o;\
-p8.o-te.o|fprr.o|schedconf.o|print.o|sh12.o|smn.o;\
-p9.o-te.o|fprr.o|schedconf.o|print.o|sh12.o|smn.o;\
-\
-sh12.o-fprr.o|schedconf.o|print.o|[calll_]sh13.o|[callr_]sh9.o|smn.o|buf.o|va.o|mm.o;\
-sh13.o-fprr.o|schedconf.o|print.o|[calll_]sh14.o|[callr_]sh10.o|smn.o|buf.o|va.o|mm.o;\
-sh14.o-fprr.o|schedconf.o|print.o|[calll_]exe_cb_sbc.o|[callr_]sh11.o|smn.o|buf.o|va.o|mm.o;\
-sh9.o-fprr.o|schedconf.o|print.o|[calll_]sh10.o|[callr_]sh0.o|smn.o|buf.o|va.o|mm.o;\
-sh10.o-fprr.o|schedconf.o|print.o|[calll_]sh11.o|[callr_]sh1.o|smn.o|buf.o|va.o|mm.o;\
-sh11.o-fprr.o|schedconf.o|print.o|[calll_]exe_cb_sbc.o|[callr_]sh3.o|smn.o|buf.o|va.o|mm.o;\
\
sh18.o-fprr.o|schedconf.o|print.o|[calll_]sh15.o|[callr_]sh19.o|smn.o|buf.o|va.o|mm.o;\
sh19.o-fprr.o|schedconf.o|print.o|[calll_]sh16.o|[callr_]sh20.o|smn.o|buf.o|va.o|mm.o;\

0 comments on commit b443602

Please sign in to comment.