diff options
author | eb | 2009-01-15 10:23:50 +0000 |
---|---|---|
committer | eb | 2009-01-15 10:23:50 +0000 |
commit | 4b5cfa809a01a494c4f5e6b052414ed9b3d066cb (patch) | |
tree | 1524eb995c21cccb3d76f62ec0cc8bf9a319a54f /gcell/lib/runtime/spu/gc_spu_jd_queue.c | |
parent | ddd347cc96e38c3758dea53cb0d93391ea566a35 (diff) | |
download | gnuradio-4b5cfa809a01a494c4f5e6b052414ed9b3d066cb.tar.gz gnuradio-4b5cfa809a01a494c4f5e6b052414ed9b3d066cb.tar.bz2 gnuradio-4b5cfa809a01a494c4f5e6b052414ed9b3d066cb.zip |
Merged eb/gcell-wip -r10213:10230 into the trunk. This reduces the
overhead of off-loading jobs, such that it is now feasible to off-load
50us jobs on the QS21 and 10us jobs on the PS3. See wiki:Gcell for
performance graphs. There is still plenty of room for improvement.
I'll be revisiting this in a week or so.
git-svn-id: http://gnuradio.org/svn/gnuradio/trunk@10231 221aa14e-8319-0410-a670-987f0aec2ac5
Diffstat (limited to 'gcell/lib/runtime/spu/gc_spu_jd_queue.c')
-rw-r--r-- | gcell/lib/runtime/spu/gc_spu_jd_queue.c | 27 |
1 files changed, 19 insertions, 8 deletions
diff --git a/gcell/lib/runtime/spu/gc_spu_jd_queue.c b/gcell/lib/runtime/spu/gc_spu_jd_queue.c index 42deac34e..91bb5bc7e 100644 --- a/gcell/lib/runtime/spu/gc_spu_jd_queue.c +++ b/gcell/lib/runtime/spu/gc_spu_jd_queue.c @@ -1,6 +1,6 @@ /* -*- c++ -*- */ /* - * Copyright 2007,2008 Free Software Foundation, Inc. + * Copyright 2007,2008,2009 Free Software Foundation, Inc. * * This file is part of GNU Radio * @@ -29,8 +29,14 @@ extern int gc_sys_tag; +// keep track of stats +int jdq_ok; +int jdq_empty; +int jdq_locked; + + #define INITIAL_BACKOFF 32.0 -#define MAX_BACKOFF 16384.0 +#define MAX_BACKOFF 8192.0 /* 2.6us */ #define RANDOM_WEIGHT 0.2 static float @@ -47,7 +53,7 @@ next_backoff(float backoff) return t; } -bool +gc_dequeue_status_t gc_jd_queue_dequeue(gc_eaddr_t q, gc_eaddr_t *item_ea, int jd_tag, gc_job_desc_t *item) { @@ -65,11 +71,15 @@ gc_jd_queue_dequeue(gc_eaddr_t q, gc_eaddr_t *item_ea, mfc_getllar(local_q, q, 0, 0); spu_readch(MFC_RdAtomicStat); - if (local_q->mutex != 0) // somebody else has it locked - return false; + if (local_q->mutex != 0){ // somebody else has it locked + jdq_locked++; + return GCQ_LOCKED; + } - if (local_q->head == 0) // the queue is empty - return false; + if (local_q->head == 0){ // the queue is empty + jdq_empty++; + return GCQ_EMPTY; + } // Try to acquire the lock @@ -108,5 +118,6 @@ gc_jd_queue_dequeue(gc_eaddr_t q, gc_eaddr_t *item_ea, mfc_putlluc(local_q, q, 0, 0); spu_readch(MFC_RdAtomicStat); - return true; + jdq_ok++; + return GCQ_OK; } |