[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v3 11/11] translate-all: add tb hash bucket info
From: |
Richard Henderson |
Subject: |
Re: [Qemu-devel] [PATCH v3 11/11] translate-all: add tb hash bucket info to 'info jit' dump |
Date: |
Fri, 22 Apr 2016 10:41:25 -0700 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.7.1 |
On 04/19/2016 04:07 PM, Emilio G. Cota wrote:
> + ht_avg_len = qht_avg_bucket_chain_length(&tcg_ctx.tb_ctx.htable,
> &ht_heads);
> + cpu_fprintf(f, "TB hash avg chain %0.5f buckets\n", ht_avg_len);
> + cpu_fprintf(f, "TB hash size %zu head buckets\n", ht_heads);
I think the accounting is questionable here.
Consider the following data:
TB count 230467/671088
TB invalidate count 25915
TB hash avg chain 1.03073 buckets
TB hash size 131072 head buckets
This means that we've got 230467 - 25915 = 204552 active TB's, installed into a
hash table with 131072 heads. For a perfectly uniform distribution of TBs,
that would be an average chain length of 204552 / 131072 = 1.56.
In order to get the average down to 1.03, there need to be a substantial number
of heads with zero entries.
I think perhaps it might be more enlightening to separately account for empty
and non-empty heads. E.g.
TB hash buckets used xxxx/131072
TB hash avg chain yyyy
where xxxx is the number of non-empty heads, and yyyy = |TBs| / xxxx.
I also wonder if it wouldn't be better to size the hash table as appropriate
for the maximum number of allowable TBs.
r~
- [Qemu-devel] [PATCH v3 08/11] qht: QEMU's fast, resizable and scalable Hash Table, (continued)
- [Qemu-devel] [PATCH v3 08/11] qht: QEMU's fast, resizable and scalable Hash Table, Emilio G. Cota, 2016/04/19
- [Qemu-devel] [PATCH v3 06/11] exec: add tb_hash_func5, derived from xxhash, Emilio G. Cota, 2016/04/19
- [Qemu-devel] [PATCH v3 11/11] translate-all: add tb hash bucket info to 'info jit' dump, Emilio G. Cota, 2016/04/19
- Re: [Qemu-devel] [PATCH v3 11/11] translate-all: add tb hash bucket info to 'info jit' dump, Richard Henderson, 2016/04/20
- Re: [Qemu-devel] [PATCH v3 11/11] translate-all: add tb hash bucket info to 'info jit' dump, Alex Bennée, 2016/04/22
- Re: [Qemu-devel] [PATCH v3 11/11] translate-all: add tb hash bucket info to 'info jit' dump,
Richard Henderson <=
- Re: [Qemu-devel] [PATCH v3 11/11] translate-all: add tb hash bucket info to 'info jit' dump, Emilio G. Cota, 2016/04/22
- Re: [Qemu-devel] [PATCH v3 11/11] translate-all: add tb hash bucket info to 'info jit' dump, Richard Henderson, 2016/04/22
- Re: [Qemu-devel] [PATCH v3 11/11] translate-all: add tb hash bucket info to 'info jit' dump, Emilio G. Cota, 2016/04/22
- Re: [Qemu-devel] [PATCH v3 11/11] translate-all: add tb hash bucket info to 'info jit' dump, Richard Henderson, 2016/04/24
- Re: [Qemu-devel] [PATCH v3 11/11] translate-all: add tb hash bucket info to 'info jit' dump, Emilio G. Cota, 2016/04/24
- Re: [Qemu-devel] [PATCH v3 11/11] translate-all: add tb hash bucket info to 'info jit' dump, Emilio G. Cota, 2016/04/26
- Re: [Qemu-devel] [PATCH v3 11/11] translate-all: add tb hash bucket info to 'info jit' dump, Richard Henderson, 2016/04/28