[Top][All Lists]

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

Re: [Qemu-devel] [RFC 02/10] use a different translation block list for

From: Richard Henderson
Subject: Re: [Qemu-devel] [RFC 02/10] use a different translation block list for each cpu.
Date: Tue, 03 Feb 2015 08:17:06 -0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0

On 01/16/2015 09:19 AM, address@hidden wrote:
> @@ -759,7 +760,9 @@ static void page_flush_tb_1(int level, void **lp)
>          PageDesc *pd = *lp;
>          for (i = 0; i < V_L2_SIZE; ++i) {
> -            pd[i].first_tb = NULL;
> +            for (j = 0; j < MAX_CPUS; j++) {
> +                pd[i].first_tb[j] = NULL;
> +            }
>              invalidate_page_bitmap(pd + i);
>          }
>      } else {

Surely you've got to do some locking somewhere in order to be able to modify
another thread's cpu tb list.

I realize that we do have to solve this problem for x86, but for most other
targets we ought, in principal, be able to avoid it.  Which simply requires
that we not treat icache flushes as nops.

When the kernel has modified a page, like so, it will also have notified the
other cpus that like so,

        if (smp_call_function(ipi_flush_icache_page, mm, 1)) {

We ought to be able to leverage this to avoid some locking at the qemu level.


reply via email to

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