diff options
author | Atish Patra <atish.patra@wdc.com> | 2019-08-29 15:19:13 -0700 |
---|---|---|
committer | Anup Patel <anup@brainfault.org> | 2019-08-31 13:15:21 +0530 |
commit | 7b7690ed9c0e5990a8cda2511f4c438c9ad8c9dc (patch) | |
tree | cea19a98e22d0b92a132406853272518ea5ebc2e /lib/sbi/sbi_tlb.c | |
parent | 6bd1512024c84250a248dea37f30b71a2c4c260f (diff) |
lib: Upgrade to full flush if size is at least threshold
Currently, we upgrade to a full tlb flush only If a tlb flush request
size is greater than the threshold. This is done as sfence in RISC-V
can only flush 4KB at a time. Doing a large number of flushes page by
page impacts the performance. It is better to do a full tlbflush if the
request size is at least equal to the threshold size.
Signed-off-by: Atish Patra <atish.patra@wdc.com>
Reviewed-by: Anup Patel <anup.patel@wdc.com>
Diffstat (limited to 'lib/sbi/sbi_tlb.c')
-rw-r--r-- | lib/sbi/sbi_tlb.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/sbi/sbi_tlb.c b/lib/sbi/sbi_tlb.c index e4f6fe2..c4e5f48 100644 --- a/lib/sbi/sbi_tlb.c +++ b/lib/sbi/sbi_tlb.c @@ -232,7 +232,7 @@ int sbi_tlb_fifo_update(struct sbi_scratch *rscratch, u32 hartid, void *data) * upgrade it to flush all because we can only flush * 4KB at a time. */ - if (tinfo->size >= SBI_TLB_FLUSH_MAX_SIZE) { + if (tinfo->size > SBI_TLB_FLUSH_MAX_SIZE) { tinfo->start = 0; tinfo->size = SBI_TLB_FLUSH_ALL; } |