Re: [PATCH 08/10] Don't invalidate dcache when option stack-cache is changed

Yao Qi
2013-11-19T06:19:54Z

On 11/18/2013 11:43 PM, Pedro Alves wrote:
> On 11/17/2013 09:44 PM, Doug Evans wrote:
>
>> I'm still not comfortable with this.
>> This is optimizing a rare occurrence. Users aren't expected to be
>> turning this on and off during a session.
>
> My thoughts exactly. This seems to be adding extra code, therefore
> a wider surface for bugs, for no apparent real use case?
>

The motivation of this patch is not about performance improvement, but
about using target_dcache for code caching, as I described in the mail
below...

> Nowadays, option "stack-cache" on->off and off->on transitions trigger
> cache invalidation. It is not very necessary and not friendly to
> using target_dcache for other purpose, such as code caching.

... here.

We've decided to use a single global target_dcache for both stack
caching and code caching. However, it is odd to me that option
"stack-cache" transitions invalidate cache for code. If the behaviour
like this is acceptable to you, I am OK to keep the existing behaviour
unchanged, and add option "code-cache". Finally, either option
"stack-cache" or option "code-cache" transitions will invalidate the
global cache. What do you think?

--
Yao (é½å°§)