Skip to content
This repository has been archived by the owner on Feb 26, 2020. It is now read-only.

Return -1 for generic kmem cache shrinker #268

Closed
wants to merge 1 commit into from

Conversation

behlendorf
Copy link
Contributor

It has been observed that it's possible to get in a state where
shrink_slabs() will spin repeated invoking the generic kmem cache
shrinker. It fails to detect it's not making forward progress
reclaiming from the cache and doesn't give up. To ensure this
never occurs we unconditionally return -1 after reclaiming what
we can.

Signed-off-by: Brian Behlendorf behlendorf1@llnl.gov
Issue openzfs/zfs#1276
Issue openzfs/zfs#1598

It has been observed that it's possible to get in a state where
shrink_slabs() will spin repeated invoking the generic kmem cache
shrinker.  It fails to detect it's not making forward progress
reclaiming from the cache and doesn't give up.  To ensure this
never occurs we unconditionally return -1 after reclaiming what
we can.

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Issue openzfs/zfs#1276
Issue openzfs/zfs#1598
@behlendorf
Copy link
Contributor Author

Also expected to fix openzfs/zfs#1432

@ryao
Copy link
Contributor

ryao commented Jul 27, 2013

The same change should probably be made to the arc_shrinker. I will refresh openzfs/zfs#1613 to include it.

@behlendorf
Copy link
Contributor Author

@ryao You know I've never seen or had reports of similar spinning in arc_shrinker(), it may have something to do with the fact that the generic spl shrinker is for multiple caches.

@behlendorf
Copy link
Contributor Author

b9b3715 Return -1 for generic kmem cache shrinker

@behlendorf behlendorf closed this Jul 31, 2013
@behlendorf behlendorf deleted the issue-1598 branch July 28, 2017 21:51
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants