diff options
author | Andy Chiu <andy.chiu@sifive.com> | 2024-01-15 05:59:28 +0000 |
---|---|---|
committer | Palmer Dabbelt <palmer@rivosinc.com> | 2024-01-16 07:14:01 -0800 |
commit | bd446f5df5afab212917f6732ba6442a5e8de85e (patch) | |
tree | dce6c1b77b3260997ded34e7e30afc9a16c3d24b /arch/riscv/kernel/kernel_mode_vector.c | |
parent | 5b6048f2ff710196c85ce14373febe8be5115bbe (diff) |
riscv: vector: use kmem_cache to manage vector context
The allocation size of thread.vstate.datap is always riscv_v_vsize. So
it is possbile to use kmem_cache_* to manage the allocation. This gives
users more information regarding allocation of vector context via
/proc/slabinfo. And it potentially reduces the latency of the first-use
trap because of the allocation caches.
Signed-off-by: Andy Chiu <andy.chiu@sifive.com>
Tested-by: Björn Töpel <bjorn@rivosinc.com>
Tested-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Link: https://lore.kernel.org/r/20240115055929.4736-10-andy.chiu@sifive.com
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
Diffstat (limited to 'arch/riscv/kernel/kernel_mode_vector.c')
0 files changed, 0 insertions, 0 deletions