From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dave Hansen Subject: Re: [PATCH] mm: Throttle shrinkers harder Date: Mon, 28 Apr 2014 09:38:41 -0700 Message-ID: <535E8411.3050304@intel.com> References: <1397113506-9177-1-git-send-email-chris@chris-wilson.co.uk> <20140418121416.c022eca055da1b6d81b2cf1b@linux-foundation.org> <20140422193041.GD10722@phenom.ffwll.local> <53582D3C.1010509@intel.com> <20140424055836.GB31221@nuc-i3427.alporthouse.com> <53592C16.8000906@intel.com> <20140424153920.GM31221@nuc-i3427.alporthouse.com> <535991C3.9080808@intel.com> <20140425072325.GO31221@nuc-i3427.alporthouse.com> <535A9901.6090607@intel.com> <20140426131026.GA4418@nuc-i3427.alporthouse.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by gabe.freedesktop.org (Postfix) with ESMTP id EFB4A6E01C for ; Mon, 28 Apr 2014 09:38:51 -0700 (PDT) In-Reply-To: <20140426131026.GA4418@nuc-i3427.alporthouse.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" To: Chris Wilson , Andrew Morton , linux-mm@kvack.org, intel-gfx@lists.freedesktop.org, Mel Gorman , Michal Hocko , Rik van Riel , Johannes Weiner , Dave Chinner , Glauber Costa , Hugh Dickins , David Rientjes List-Id: intel-gfx@lists.freedesktop.org On 04/26/2014 06:10 AM, Chris Wilson wrote: >>> > > Thanks for the pointer to >>> > > register_oom_notifier(), I can use that to make sure that we do purge >>> > > everything from the GPU, and do a sanity check at the same time, before >>> > > we start killing processes. >> > >> > Actually, that one doesn't get called until we're *SURE* we are going to >> > OOM. Any action taken in there won't be taken in to account. > blocking_notifier_call_chain(&oom_notify_list, 0, &freed); > if (freed > 0) > /* Got some memory back in the last second. */ > return; > > That looks like it should abort the oom and so repeat the allocation > attempt? Or is that too hopeful? You're correct. I was reading the code utterly wrong.