[Cbe-oss-dev] [PATCH 17/28]MARS/base: cache workload context

Kazunori Asayama asayama at sm.sony.co.jp
Tue Feb 10 14:33:47 EST 2009


Yuji Mano wrote:
> It is guaranteed that the workload ELF has not changed for that workload
> until it is destroyed or a new workload has been created in that slot
> (workload_id). Since a destroyed workload cannot be scheduled for

Yes, of course I know that.

> execution, I think it is sufficient to reset the 'WORKLOAD_KERNEL_ID'
> at the time of workload creation into that workload_id slot.
> 
> Currently the task module does not make use of this feature because it
> does not differentiate the text section and data sections when loading
> the workload. In the future we may plan to. So the above feature might
> allow for avoiding unnecessary dma of text section + read-only sections
> when the same workload is scheduled repeatedly.

Once 'workload context cache' is introduced and if reset state of cache
only when adding workload to the queue, there will be 4 context load states:

  1. Start of workload
    1-a. Not loaded
    1-b. Cached
  2. Workload (task) restore
    2-a. Not cached
    2-b. Cached

My question is, how can the task module distinguish between 1-b and 2-b?
As you are saying, 'data' should be reloaded in 1-b case. So I thought
it was a simple way to invalidate the cache and reload whole of the
program always when starting workload...

-- 
(Kazunori Asayama
  (asayama at sm.sony.co.jp))
t




More information about the cbe-oss-dev mailing list