[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] sh: dcache flush breaks text region?

From: Edgar E. Iglesias
Subject: Re: [Qemu-devel] sh: dcache flush breaks text region?
Date: Tue, 13 Jan 2009 03:57:22 +0100
User-agent: Mutt/1.5.16 (2007-06-09)

On Sun, Jan 11, 2009 at 11:42:59AM +0100, Edgar E. Iglesias wrote:
> On Sun, Jan 11, 2009 at 12:58:12PM +0900, Shin-ichiro KAWASAKI wrote:
> >
> > Edgar E. Iglesias wrote:
> >> Another solution might be for linux to use a ocpb followed by a ocpi insn
> >> on the line. IIUC that should achieve the same results net results.
> > I'm not sure about it.  But I think we should not modify linux,
> I agree.
> The ocpb followed by the ocpi that I suggested won't work and I cant
> think of anything better than what linux is already doing.

I gave this some more thought and I think that there might be room for
improvements in the cache-sh4 flushing loops anyway.

The reason why the suggested ocbp+ocbi sequences didn't work was because
I later noticed that the same loop was beeing used for unconditional line
flushes aswell as for flushes for ranges where you actually know the
virtual addresses you want to flush (complete page flushes seem to be
treated differently).

If you separate the two, the flushes for virtual ranges can be done with
the ocbp+ocbi sequence. If I'm not misstaken, there are two main

1. You will flush and invalidate much fewer lines, only those that
   actually hit in the cache. This could turn out to be a pretty
   significant win.
2. You get rid of the atomic requirements. It means you can do all the
   ranged flushes with interrupts enabled all the time.

Best regards

reply via email to

[Prev in Thread] Current Thread [Next in Thread]