qemu-ppc
[Top][All Lists]
Advanced

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

Re: [Qemu-ppc] [PATCH RFC] target-ppc: tlbie should have global effect


From: Nikunj A Dadhania
Subject: Re: [Qemu-ppc] [PATCH RFC] target-ppc: tlbie should have global effect
Date: Fri, 09 Sep 2016 10:15:42 +0530
User-agent: Notmuch/0.21 (https://notmuchmail.org) Emacs/25.0.94.1 (x86_64-redhat-linux-gnu)

Benjamin Herrenschmidt <address@hidden> writes:

> On Fri, 2016-09-09 at 09:53 +0530, Nikunj A Dadhania wrote:
>> tlbie (and H_REMOVE for pseries) should have a global effect. This is
>> achieved by iterating and setting tlb_need_flush in all the CPUs.
>> 
>> Suggested-by: Benjamin Herrenschmidt <address@hidden>
>> Signed-off-by: Nikunj A Dadhania <address@hidden>
>> 
>> --
>> 
>> Note: Haven't changed following POWERPC_MMU_32B and POWERPC_MMU_601
>> yet.
>> As I am not sure about it.
>
> 604 and 7400 can do SMP.

Sure, will add similar logic there.

> That said, I think the approach in your patch is going to be a bit big
> of a hammer.

> We should have a separate flag indicating that we need to
> broadcast a flush and only set it on tlbie (non-l) and tlbivax (on
> BookE) so that we don't end up doing expensive broadcasts on things
> like context switches.

I had implemented that initially, and was checking that in
check_tlb_flush, the logic was getting complicated, so thought about
this way.

Moreover, I was thinking about it, that needs to be a global tcg flag
and not part the CPUPPCState structure, I was then worried about how to
synchronise a global tcg variable.

> We keep the existing logic to flush locally. We additionally replace
> the one in ptesync (BookS) or tlbsync (BookE) to test for the broadcast
> flag, and flush the "other" CPUs if set.
>
> That also means you have a nice spot to do the more complex MT-TCG
> broadcast only when needed in the future.
>

Regards
Nikunj




reply via email to

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