qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v6 38/50] translate-all: use a binary search tre


From: Richard Henderson
Subject: Re: [Qemu-devel] [PATCH v6 38/50] translate-all: use a binary search tree to track TBs in TBContext
Date: Thu, 19 Oct 2017 19:30:25 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0

On 10/18/2017 11:19 AM, Emilio G. Cota wrote:
> On Wed, Oct 18, 2017 at 09:41:43 +0200, Paolo Bonzini wrote:
>> On 16/10/2017 19:25, Richard Henderson wrote:
>>>   * Translation Cache-related fields of a TB.
>>> + * This struct exists just for convenience; we keep track of TB's in a 
>>> binary
>>> + * search tree, and the only fields needed to compare TB's in the tree are
>>> + * @ptr and @size. @search is brought here for consistency, since it is 
>>> also
>>> + * a TC-related field.
>>>   */
>>>  struct tb_tc {
>>>      void *ptr;    /* pointer to the translated code */
>>>      uint8_t *search;  /* pointer to search data */
>>> +    size_t size;
>>>  };
>>
>> Isn't search equal to ptr + size, or something like that?
> 
> It is indeed! Fixup below.
> 
> The change shrinks TranslationBlock, but it leaves performance unchanged
> (recall that we add padding after TranslationBlock to avoid cache line
> overlap between the struct and translated code).
> 
> Thanks,
> 
>               Emilio
> 
> -- >8 --
> Subject: [PATCH] fixup

Merged, thanks.


r~



reply via email to

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