From mboxrd@z Thu Jan 1 00:00:00 1970 From: Chris Wilson Subject: Re: [Intel-gfx] [PATCH] drm/i915: Selectively enable self-reclaim Date: Thu, 01 Jul 2010 12:19:21 +0100 Message-ID: <89k77n$o7p5no@fmsmga001.fm.intel.com> References: <1264605932-8540-1-git-send-email-chris@chris-wilson.co.uk> <89k77n$ms73l9@fmsmga001.fm.intel.com> <89khjo$fr177d@orsmga002.jf.intel.com> Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=ISO-8859-1 Content-Transfer-Encoding: QUOTED-PRINTABLE Return-path: In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org To: Linus Torvalds Cc: Dave Airlie , earny@net4u.de, Roman Jarosz , intel-gfx@lists.freedesktop.org, linux-kernel@vger.kernel.org, jcnengel@googlemail.com, "A. Boulan" , Hugh Dickins , Pekka Enberg , A Rojas , KOSAKI Motohiro , rientjes@google.com, michael@reinelt.co.at, stable@kernel.org, Vefa Bicakci List-Id: intel-gfx@lists.freedesktop.org On Wed, 30 Jun 2010 18:24:04 -0700, Linus Torvalds wrote: > On Wed, Jun 30, 2010 at 4:07 PM, Linus Torvalds > wrote: > > > > That commit changes the page cache allocation to use > > > > + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0mapping_gfp_mask (mapping) | > > + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0__GFP_COLD | > > + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0gfpmask); > > > > if I read it right. And the default mapping_gfp_mask() is > > GFP_HIGHUSER_MOVABLE, so I think you get all of > > (__GFP_WAIT | __GFP_IO | __GFP_FS | __GFP_HARDWALL | __GFP_HIGHMEM) > > set by default. >=20 > .. and then I left out the one flag I _meant_ to have there, namely > __GFP_MOVABLE. >=20 > > The old code didn't just play games with ~__GFP_NORETRY and change > > that at runtime (which was buggy - no locking, no protection, no > > nothing), it also initialized the gfp mask. And that code also got > > removed: That code I added with the original shrinker patch, and the flags lifte= d from the shmem defaults, tweaked to what seemed sane with the addition = of NORETRY and friends. I see that i915 is unique in using shmem as the pa= ge allocator, which perhaps explains why this failure is not observed with the ttm drivers. ttm uses two sets of gfp mask: HIGHUSER and USER | DMA= 32. So replacing the mapping_gfp_mask() with HIGHUSER would seem appropriat= e. And the interaction of MOVABLE could explain why hibernate broke with t= he introduction of GEM. * turns to his trusty copy of LDD to explain the various meanings of gfp_t... --=20 Chris Wilson, Intel Open Source Technology Centre