From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mika Kuoppala Subject: Re: [PATCH 3/3] drm/i915; Preallocate the lazy request Date: Wed, 04 Sep 2013 15:05:57 +0300 Message-ID: <87ioygeqqi.fsf@gaia.fi.intel.com> References: <1378287952-29783-1-git-send-email-chris@chris-wilson.co.uk> <1378287952-29783-3-git-send-email-chris@chris-wilson.co.uk> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by gabe.freedesktop.org (Postfix) with ESMTP id 94A80E7039 for ; Wed, 4 Sep 2013 05:06:02 -0700 (PDT) In-Reply-To: <1378287952-29783-3-git-send-email-chris@chris-wilson.co.uk> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org Errors-To: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org To: Chris Wilson , intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org Chris Wilson writes: > It is possible for us to be forced to perform an allocation for the lazy > request whilst running the shrinker. This allocation may fail, leaving > us unable to reclaim any memory leading to premature OOM. A neat > solution to the problem is to preallocate the request at the same time > as acquiring the seqno for the ring transaction. This means that we can > report ENOMEM prior to touching the rings. > > Signed-off-by: Chris Wilson Reviewed-by: Mika Kuoppala