Project

General

Profile

Actions

Bug #5498

closed

kmem_reap does one xcall per page

Added by Matthew Ahrens over 7 years ago. Updated over 7 years ago.

Status:
Closed
Priority:
Normal
Category:
kernel
Start date:
2014-12-30
Due date:
% Done:

100%

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

Description

We see performance problems due to kmem_reap() of ZFS's zio buf caches. The kmem_reap() causes a lot of cross-calls to tear down TLB entries, which is slow. It can also cause latency bubbles in concurrent zfs_read/zfs_write operations.

The problem is reliably triggered when a workload switches between accessing files of different blocksizes. This causes kmem to need to free lots of buffers of the old size in order to allocate ones of the new size.

We can improve on this in some cases by using one xcall per slab, to tear down all the virtually contiguous pages used to back the slab. The performance benefit will be most noticeable when reaping larger (e.g. 128KB) caches.


Related issues

Related to illumos gate - Bug #5601: regression in 5498, too many TLB pages invalidatedRejectedRyan Zezeski2015-02-08

Actions
Actions

Also available in: Atom PDF