Mercurial > hg > Game > Cerium
changeset 1465:fc5b23108608 draft
TaskList on going...
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Sun, 15 Jul 2012 09:56:54 +0900 |
parents | 3f2230d79eba |
children | cb57420a8219 |
files | TaskManager/Cell/spe/SpeTaskManagerImpl.h TaskManager/ChangeLog TaskManager/kernel/ppe/TaskLog.h TaskManager/kernel/ppe/TaskManagerImpl.cc TaskManager/kernel/ppe/TaskManagerImpl.h TaskManager/kernel/schedule/SchedTask.cc TaskManager/kernel/schedule/SchedTaskList.cc |
diffstat | 7 files changed, 18 insertions(+), 12 deletions(-) [+] |
line wrap: on
line diff
--- a/TaskManager/Cell/spe/SpeTaskManagerImpl.h Sat Jul 14 21:16:27 2012 +0900 +++ b/TaskManager/Cell/spe/SpeTaskManagerImpl.h Sun Jul 15 09:56:54 2012 +0900 @@ -4,6 +4,7 @@ #include "TaskManagerImpl.h" #include "MainScheduler.h" #include "Scheduler.h" +#include "TaskList.h" class SpeTaskManagerImpl : public TaskManagerImpl { public: @@ -22,6 +23,7 @@ HTaskPtr create_task(int cmd); HTaskPtr create_task(int cmd, memaddr rbuf, long r_size, memaddr wbuf, long w_size); HTaskPtr create_task_array(int cmd, memaddr rbuf, long rs, memaddr wbuf, long ws); + TaskListPtr createTaskList() { return 0; } void set_task_depend(HTaskPtr master, HTaskPtr slave); void spawn_task(HTaskPtr); void set_task_cpu(HTaskPtr, CPU_TYPE);
--- a/TaskManager/ChangeLog Sat Jul 14 21:16:27 2012 +0900 +++ b/TaskManager/ChangeLog Sun Jul 15 09:56:54 2012 +0900 @@ -1,3 +1,10 @@ +2012-7-15 Shinji KONO <toma@cr.ie.u-ryukyu.ac.jp> + + inData をmallocしないで、小さいものは SchedTask に入れておく方が良い。 + HTask には TaskList が必ず付くようになったので、create_task した時に、dependency と + CPU が同一なら、そのTaskList を再利用して良い。そのためには、それらを最初に定義した + 方が良い。 + 2012-3-16 Shinji KONO <toma@cr.ie.u-ryukyu.ac.jp> create_taskを sub task でやると、tasklist のallocate にlockがいる。
--- a/TaskManager/kernel/ppe/TaskLog.h Sat Jul 14 21:16:27 2012 +0900 +++ b/TaskManager/kernel/ppe/TaskLog.h Sun Jul 15 09:56:54 2012 +0900 @@ -13,6 +13,8 @@ waitTask *waiter; }; +static int task_id; + class TaskLog { public: @@ -36,7 +38,6 @@ private: // Unique id - static int task_id; };
--- a/TaskManager/kernel/ppe/TaskManagerImpl.cc Sat Jul 14 21:16:27 2012 +0900 +++ b/TaskManager/kernel/ppe/TaskManagerImpl.cc Sun Jul 15 09:56:54 2012 +0900 @@ -14,7 +14,6 @@ QueueInfo<HTask> *htaskPool = new QueueInfo<HTask>() ; QueueInfo<TaskList> *taskListPool = new QueueInfo<TaskList>() ; - static HTaskPtr systask_start; static HTaskPtr systask_finish; @@ -60,12 +59,11 @@ */ HTaskPtr TaskManagerImpl::create_task(int cmd,memaddr rbuf, long r_size, memaddr wbuf, long w_size, void *from) { - HTaskPtr new_task; - - new_task = htaskImpl->create(); + HTaskPtr new_task = htaskImpl->create(); new_task->init(cmd, rbuf, r_size, wbuf, w_size); + new_task->mimpl = this; + new_task->create_task_array(cmd, 1, 8, 8, 8) ; new_task->post_func = noaction; - new_task->mimpl = this; new_task->from = (memaddr)from; TaskLog *tasklog = new TaskLog(); @@ -100,10 +98,8 @@ HTaskPtr TaskManagerImpl::create_task(int cmd,void *from) { - HTaskPtr new_task; - // for compatibility - new_task = htaskImpl->create(); new_task->init(TaskArray1); + HTaskPtr new_task = create_task(TaskArray,0,0,0,0, from); new_task->post_func = noaction; new_task->mimpl = this; new_task->create_task_array(cmd,1,8,8,8);
--- a/TaskManager/kernel/ppe/TaskManagerImpl.h Sat Jul 14 21:16:27 2012 +0900 +++ b/TaskManager/kernel/ppe/TaskManagerImpl.h Sun Jul 15 09:56:54 2012 +0900 @@ -58,7 +58,7 @@ virtual HTaskPtr create_task(int cmd,void *from); virtual HTaskPtr create_task(int cmd, memaddr rbuf, long r_size, memaddr wbuf, long w_size,void *from); virtual HTaskPtr create_task_array(int id, int num_task, int num_param, int num_inData, int num_outData,void *from); - virtual TaskListPtr createTaskList(); + virtual TaskListPtr createTaskList() = 0; const char *get_task_name(int cmd); const char *get_task_name(TaskPtr task); const char *get_task_name(SimpleTaskPtr simpletask);
--- a/TaskManager/kernel/schedule/SchedTask.cc Sat Jul 14 21:16:27 2012 +0900 +++ b/TaskManager/kernel/schedule/SchedTask.cc Sun Jul 15 09:56:54 2012 +0900 @@ -148,7 +148,7 @@ if (cur_index->next() < list->last()) { // Task List が残っているので、次を準備 - TaskPtr nextTask = cur_index = atask->next(); + TaskPtr nextTask = cur_index = cur_index->next(); SchedTask *nextSched = new SchedTask(); nextSched->init(list, nextTask, scheduler, this->tag^1);
--- a/TaskManager/kernel/schedule/SchedTaskList.cc Sat Jul 14 21:16:27 2012 +0900 +++ b/TaskManager/kernel/schedule/SchedTaskList.cc Sun Jul 15 09:56:54 2012 +0900 @@ -23,8 +23,8 @@ memaddr params_addr = addr; // should check TaskList size Todo scheduler = sched; - cur_index = 0; list = scheduler->get_curListBuf(); + cur_index = list->tasks; connector = scheduler->connector; list = (TaskListPtr)connector->dma_load1(list, params_addr, sizeof(TaskList), DMA_READ_TASKLIST);