Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754509Ab0GALT3 (ORCPT ); Thu, 1 Jul 2010 07:19:29 -0400 Received: from mga11.intel.com ([192.55.52.93]:55254 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750848Ab0GALT2 (ORCPT ); Thu, 1 Jul 2010 07:19:28 -0400 Message-Id: <89k77n$o7p5no@fmsmga001.fm.intel.com> X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.53,519,1272870000"; d="scan'208";a="813471480" Date: Thu, 01 Jul 2010 12:19:21 +0100 To: Linus Torvalds Subject: Re: [Intel-gfx] [PATCH] drm/i915: Selectively enable self-reclaim 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 References: <1264605932-8540-1-git-send-email-chris@chris-wilson.co.uk> <89k77n$ms73l9@fmsmga001.fm.intel.com> <89khjo$fr177d@orsmga002.jf.intel.com> From: Chris Wilson In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1945 Lines: 41 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 > > > > +                                          mapping_gfp_mask (mapping) | > > +                                          __GFP_COLD | > > +                                          gfpmask); > > > > 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. > > .. and then I left out the one flag I _meant_ to have there, namely > __GFP_MOVABLE. > > > 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 lifted 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 page allocator, which perhaps explains why this failure is not observed with the ttm drivers. ttm uses two sets of gfp mask: HIGHUSER and USER | DMA32. So replacing the mapping_gfp_mask() with HIGHUSER would seem appropriate. And the interaction of MOVABLE could explain why hibernate broke with the introduction of GEM. * turns to his trusty copy of LDD to explain the various meanings of gfp_t... -- Chris Wilson, Intel Open Source Technology Centre -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/