Project

General

Profile

Bug #5601

regression in 5498, too many TLB pages invalidated

Added by Ryan Zezeski over 5 years ago. Updated over 5 years ago.

Status:
Rejected
Priority:
Normal
Assignee:
Category:
-
Start date:
2015-02-08
Due date:
% Done:

0%

Estimated time:
Difficulty:
Medium
Tags:
needs-triage
Gerrit CR:

Description

In 5498 the TLB invalidation code was modified to allow a
contiguous range of pages to be invalidated by one xcall, instead
of one per page. A new function, hat_tlb_inval_range(), was
introduced and the old function, hat_tlb_inval(), was redefined
in terms of the new one. However, the range function takes the
number of pages as its third argument, but hat_tlb_inval() is
passing the pagesize (4K). This will potentially invalidate more
pages than planned.

Since the original semantic of hat_tlb_inval() was to invalidate
one page, the third argument should be 1.

https://github.com/illumos/illumos-gate/commit/a6a74e0e62d62ff750cd4b790be5eacc99c3bb8c#diff-81b754752dfe37691b9903054cb5cc64R2168


Related issues

Related to illumos gate - Bug #5498: kmem_reap does one xcall per pageClosed2014-12-30

Actions

History

#1

Updated by Ryan Zezeski over 5 years ago

  • Subject changed from TLB invalidation regression in 5498 to regression in 5498, too many TLB pages invalidated
  • Assignee set to Ryan Zezeski
#2

Updated by Ryan Zezeski over 5 years ago

  • Status changed from New to Rejected

It turns out I misread the for loop in hati_demap_func(), it's
increasing i by MMU_PAGESIZE as well so passing MMU_PAGESIZE as
length will indeed only unmap one page. I'm sorry for this noise.
Next time I'll ask someone to confirm my findings before writing
a bug like this.

Also available in: Atom PDF