Project

General

Profile

Actions

Bug #7241

closed

page_reclaim_mem() gives up on reclaiming memory too easily

Added by Daniel Kimmel almost 6 years ago. Updated almost 6 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
kernel
Start date:
2016-07-28
Due date:
% Done:

100%

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

Description

While debugging an out of memory issue (unable to create shared memory segment due to large segspt_minfree) we found that page_reclaim_mem() was triggering the ARC kmem cache hdr_recl() code, but the ARC wasn't quite freeing memory quickly enough for the page_reclaim_mem() call, so the ARC lost some cached pages AND the shmat() memory allocation failed. We should make the page_reclaim_mem() code try a little bit harder before giving up.

This makes page_reclaim_mem() give up after it's failed to reclaim any memory three times in a row, rather than failing if no memory is freed after the first pass. (This might not happen because all the reclaiming occurs asynchronously.)

Actions #1

Updated by Electric Monk almost 6 years ago

  • Status changed from New to Closed
  • % Done changed from 0 to 100

git commit 9424a8dfe0a200274497dbfbbc8d8e53bfc38ac7

commit  9424a8dfe0a200274497dbfbbc8d8e53bfc38ac7
Author: Dan Kimmel <dan.kimmel@delphix.com>
Date:   2016-09-07T22:39:44.000Z

    7241 page_reclaim_mem() gives up on reclaiming memory too easily
    Reviewed by: Matthew Ahrens <mahrens@delphix.com>
    Reviewed by: Paul Dagnelie <pcd@delphix.com>
    Reviewed by: Prashanth Sreenivasa <prashksp@gmail.com>
    Approved by: Dan McDonald <danmcd@omniti.com>

Actions

Also available in: Atom PDF