[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commit-gnuradio] r8090 - in gnuradio/trunk/gcell/src: include/spu lib/r
From: |
eb |
Subject: |
[Commit-gnuradio] r8090 - in gnuradio/trunk/gcell/src: include/spu lib/runtime/spu |
Date: |
Mon, 24 Mar 2008 01:46:48 -0600 (MDT) |
Author: eb
Date: 2008-03-24 01:46:47 -0600 (Mon, 24 Mar 2008)
New Revision: 8090
Modified:
gnuradio/trunk/gcell/src/include/spu/gc_jd_queue.h
gnuradio/trunk/gcell/src/lib/runtime/spu/gc_main.c
gnuradio/trunk/gcell/src/lib/runtime/spu/gc_spu_jd_queue.c
Log:
Fix for gcell corrrectness/performance problem. Replaces mfc_sync
with appropriate use of tag and fenced get. We could pick up a bit
of additional performance by double buffering the the local store
job descriptor, but that's left for a rainy day.
Modified: gnuradio/trunk/gcell/src/include/spu/gc_jd_queue.h
===================================================================
--- gnuradio/trunk/gcell/src/include/spu/gc_jd_queue.h 2008-03-24 07:39:22 UTC
(rev 8089)
+++ gnuradio/trunk/gcell/src/include/spu/gc_jd_queue.h 2008-03-24 07:46:47 UTC
(rev 8090)
@@ -35,12 +35,14 @@
*
* \param[in] q is EA address of queue structure.
* \param[out] item_ea is EA address of item at head of queue.
+ * \param[in] jd_tag is the tag to use to get the LS copy of the item.
* \param[out] item is local store copy of item at head of queue.
* \returns false if the queue is empty, otherwise returns true
* and sets \p item_ea and DMA's job descriptor into \p item
*/
bool
-gc_jd_queue_dequeue(gc_eaddr_t q, gc_eaddr_t *item_ea, gc_job_desc_t *item);
+gc_jd_queue_dequeue(gc_eaddr_t q, gc_eaddr_t *item_ea,
+ int jd_tag, gc_job_desc_t *item);
/*!
Modified: gnuradio/trunk/gcell/src/lib/runtime/spu/gc_main.c
===================================================================
--- gnuradio/trunk/gcell/src/lib/runtime/spu/gc_main.c 2008-03-24 07:39:22 UTC
(rev 8089)
+++ gnuradio/trunk/gcell/src/lib/runtime/spu/gc_main.c 2008-03-24 07:46:47 UTC
(rev 8090)
@@ -542,9 +542,6 @@
int tag = ci_tags + ci_idx; // use the current completion
tag
mfc_put(jd, jd_ea, sizeof(*jd), tag, 0, 0);
- mfc_sync(tag); // FIXME this makes it work, but is expensive
-
-
// Tell PPE we're done with the job.
//
// We queue these up until we run out of room, or until we can send
@@ -593,7 +590,7 @@
// by somebody doing something to the queue. Go look and see
// if there's anything for us.
//
- if (gc_jd_queue_dequeue(spu_args.queue, &jd_ea, &jd))
+ if (gc_jd_queue_dequeue(spu_args.queue, &jd_ea, ci_tags + ci_idx, &jd))
process_job(jd_ea, &jd);
gc_jd_queue_getllar(spu_args.queue); // get a new reservation
@@ -608,7 +605,7 @@
#else
// try to get a job from the job queue
- if (gc_jd_queue_dequeue(spu_args.queue, &jd_ea, &jd)){
+ if (gc_jd_queue_dequeue(spu_args.queue, &jd_ea, ci_tags + ci_idx, &jd)){
total_jobs++;
gc_log_write2(GCL_SS_SYS, 0x10, jd.sys.job_id, total_jobs);
Modified: gnuradio/trunk/gcell/src/lib/runtime/spu/gc_spu_jd_queue.c
===================================================================
--- gnuradio/trunk/gcell/src/lib/runtime/spu/gc_spu_jd_queue.c 2008-03-24
07:39:22 UTC (rev 8089)
+++ gnuradio/trunk/gcell/src/lib/runtime/spu/gc_spu_jd_queue.c 2008-03-24
07:46:47 UTC (rev 8090)
@@ -26,7 +26,8 @@
extern int gc_sys_tag;
bool
-gc_jd_queue_dequeue(gc_eaddr_t q, gc_eaddr_t *item_ea, gc_job_desc_t *item)
+gc_jd_queue_dequeue(gc_eaddr_t q, gc_eaddr_t *item_ea,
+ int jd_tag, gc_job_desc_t *item)
{
gc_jd_queue_t local_q;
@@ -61,8 +62,12 @@
// copy in job descriptor at head of queue
*item_ea = local_q.head;
- mfc_get(item, local_q.head, sizeof(gc_job_desc_t), gc_sys_tag, 0, 0);
- mfc_write_tag_mask(1 << gc_sys_tag); // the tag we're interested in
+
+ // We must use the fence with the jd_tag to ensure that any
+ // previously initiated put of a job desc is locally ordered before
+ // the get of the new one.
+ mfc_getf(item, local_q.head, sizeof(gc_job_desc_t), jd_tag, 0, 0);
+ mfc_write_tag_mask(1 << jd_tag); // the tag we're interested in
mfc_read_tag_status_all(); // wait for DMA to complete
local_q.head = item->sys.next;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Commit-gnuradio] r8090 - in gnuradio/trunk/gcell/src: include/spu lib/runtime/spu,
eb <=