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>
This commit is contained in:
parent
6bd1512024
commit
7b7690ed9c
|
@ -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
|
* upgrade it to flush all because we can only flush
|
||||||
* 4KB at a time.
|
* 4KB at a time.
|
||||||
*/
|
*/
|
||||||
if (tinfo->size >= SBI_TLB_FLUSH_MAX_SIZE) {
|
if (tinfo->size > SBI_TLB_FLUSH_MAX_SIZE) {
|
||||||
tinfo->start = 0;
|
tinfo->start = 0;
|
||||||
tinfo->size = SBI_TLB_FLUSH_ALL;
|
tinfo->size = SBI_TLB_FLUSH_ALL;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue