[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2 08/28] target/i386: Use cpu_*_mmuidx_ra instead of templat
From: |
Richard Henderson |
Subject: |
Re: [PATCH v2 08/28] target/i386: Use cpu_*_mmuidx_ra instead of templates |
Date: |
Sun, 29 Dec 2019 08:02:38 +1100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.2.2 |
On 12/21/19 4:42 AM, Alex Bennée wrote:
>> +/*
>> + * TODO: Convert callers to compute cpu_mmu_index_kernel once
>> + * and use *_mmuidx_ra directly.
>> + */
>
> I guess this would only be if it was a significant performance impact?
> They seem to be mainly called for (I assume) infrequently called
> helpers.
Yes, they are infrequent.
But if you expose all of the hidden cpu_mmu_index_kernel() invocations, one
should immediately ask why we're not caching the result in a local variable.
If for nothing else, readability.
r~
- Re: [PATCH v2 04/28] cputlb: Move body of cpu_ldst_template.h out of line, (continued)
- [PATCH v2 05/28] translator: Use cpu_ld*_code instead of open-coding, Richard Henderson, 2019/12/16
- [PATCH v2 06/28] cputlb: Rename helper_ret_ld*_cmmu to cpu_ld*_code, Richard Henderson, 2019/12/16
- [PATCH v2 07/28] cputlb: Provide cpu_(ld, st}*_mmuidx_ra for user-only, Richard Henderson, 2019/12/16
- [PATCH v2 08/28] target/i386: Use cpu_*_mmuidx_ra instead of templates, Richard Henderson, 2019/12/16
- [PATCH v2 09/28] target/s390x: Include tcg.h in mem_helper.c, Richard Henderson, 2019/12/16
- [PATCH v2 10/28] target/arm: Include tcg.h in sve_helper.c, Richard Henderson, 2019/12/16
- [PATCH v2 11/28] accel/tcg: Include tcg.h in tcg-runtime.c, Richard Henderson, 2019/12/16
- [PATCH v2 13/28] linux-user: Include trace-root.h in syscall-trace.h, Richard Henderson, 2019/12/16
- [PATCH v2 12/28] linux-user: Include tcg.h in syscall.c, Richard Henderson, 2019/12/16
- [PATCH v2 15/28] target/nios2: Remove MMU_MODE{0,1}_SUFFIX, Richard Henderson, 2019/12/16