[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v3 42/43] tcg: introduce regions to split code_g
From: |
Emilio G. Cota |
Subject: |
Re: [Qemu-devel] [PATCH v3 42/43] tcg: introduce regions to split code_gen_buffer |
Date: |
Thu, 20 Jul 2017 19:23:18 -0400 |
User-agent: |
Mutt/1.5.24 (2015-08-30) |
On Thu, Jul 20, 2017 at 11:22:10 -1000, Richard Henderson wrote:
> >Perhaps we should then enlarge both the first and last regions so that we
> >fully use the buffer.
>
> I really like the idea. That's a lot of space recovered for 64k page hosts.
>
> I do think we can make the computation clearer. How about
(snip)
>
> static inline void tcg_region_bounds(TCGContext *s, size_t curr_region,
> void **pstart, void **pend)
> {
> void *start, *end;
>
> /* ??? Maybe store "aligned" precomputed. */
> start = QEMU_ALIGN_PTR_UP(region.start, qemu_real_host_page_size);
> /* ??? Maybe store "stride" precomputed. */
> start += curr_region * (region.size + qemu_real_host_page_size);
> end = start + region.size;
>
> if (curr_region == 0) {
> start = region.start;
> }
> if (curr_region == region.n - 1) {
> end = region.end;
> }
>
> *pstart = start;
> *pend = end;
> }
That's a nice helper -- will do it this way.
For v4, should I send all patches again, or just the handful of patches
that are changing from v3?
E.
- [Qemu-devel] [PATCH v3 40/43] translate-all: use qemu_protect_rwx/none helpers, (continued)
- [Qemu-devel] [PATCH v3 40/43] translate-all: use qemu_protect_rwx/none helpers, Emilio G. Cota, 2017/07/19
- [Qemu-devel] [PATCH v3 43/43] tcg: enable multiple TCG contexts in softmmu, Emilio G. Cota, 2017/07/19
- [Qemu-devel] [PATCH v3 38/43] util: move qemu_real_host_page_size/mask to osdep.h, Emilio G. Cota, 2017/07/19
- [Qemu-devel] [PATCH v3 27/43] translate-all: use a binary search tree to track TBs in TBContext, Emilio G. Cota, 2017/07/19
- [Qemu-devel] [PATCH v3 42/43] tcg: introduce regions to split code_gen_buffer, Emilio G. Cota, 2017/07/19
[Qemu-devel] [PATCH v3 30/43] tci: move tci_regs to tcg_qemu_tb_exec's stack, Emilio G. Cota, 2017/07/19
[Qemu-devel] [PATCH v3 14/43] target/hppa: check CF_PARALLEL instead of parallel_cpus, Emilio G. Cota, 2017/07/19
[Qemu-devel] [PATCH v3 36/43] tcg: introduce **tcg_ctxs to keep track of all TCGContext's, Emilio G. Cota, 2017/07/19
[Qemu-devel] [PATCH v3 31/43] tcg: take tb_ctx out of TCGContext, Emilio G. Cota, 2017/07/19
[Qemu-devel] [PATCH v3 39/43] osdep: introduce qemu_mprotect_rwx/none, Emilio G. Cota, 2017/07/19
[Qemu-devel] [PATCH v3 41/43] tcg: define TCG_HIGHWATER, Emilio G. Cota, 2017/07/19
[Qemu-devel] [PATCH v3 12/43] tcg: convert tb->cflags reads to tb_cflags(tb), Emilio G. Cota, 2017/07/19