From: Linus Torvalds <torvalds@linux-foundation.org> To: "M. Vefa Bicakci" <bicave@superonline.com> Cc: Chris Wilson <chris@chris-wilson.co.uk>, Dave Airlie <airlied@gmail.com>, earny@net4u.de, Roman Jarosz <kedgedev@gmail.com>, intel-gfx@lists.freedesktop.org, linux-kernel@vger.kernel.org, jcnengel@googlemail.com, "A. Boulan" <arnaud.boulan@libertysurf.fr>, Hugh Dickins <hugh.dickins@tiscali.co.uk>, Pekka Enberg <penberg@cs.helsinki.fi>, A Rojas <nqn1976list@gmail.com>, KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>, rientjes@google.com, michael@reinelt.co.at, stable@kernel.org Subject: Re: [Intel-gfx] [PATCH] drm/i915: Selectively enable self-reclaim Date: Thu, 1 Jul 2010 16:59:50 -0700 [thread overview] Message-ID: <AANLkTiklUBmNYs3710WftVX0Z3QihxFtDlK7tPlHZh8H@mail.gmail.com> (raw) In-Reply-To: <4C2D180C.5050805@superonline.com> On Thu, Jul 1, 2010 at 3:34 PM, M. Vefa Bicakci <bicave@superonline.com> wrote: > > Based on my testing, I am happy to report that the change you suggest > fixes the "memory corruption (segfaults) after thaw" issue for me. > I can't thank you enough times for this. Hey, goodie. And you're the one to be thanked - bisecting it down to that commit that wasn't _meant_ to have any real semantic changes (except for the bug-fix of racy mapping gfp-flags update) is what really cracked the lid on the problem. > Now, the obligatory question: Could we have this fix applied to 2.6.32, > 2.6.33 and 2.6.34 ? No problem, except we should first determine exactly what flags are the appropriate ones. My original patch was obviously not even compile-tested, and I actually meant for people to use GFP_HIGHUSER rather than __GFP_HIGHMEM. That contains all the "regular" allocation flags (but not the __GFP_MOVABLE, which is still just a suspicion of being the core reason for the problem). And the original DRM code had: GFP_HIGHUSER | __GFP_COLD | __GFP_FS | __GFP_RECLAIMABLE | __GFP_NORETRY | __GFP_NOWARN | __GFP_NOMEMALLOC which is not entirely sensible (__GFP_FS is already part of GFP_HIGHUSER, for example), and two of the flags (NORETRY and NOWARN) are the ones the driver wants to do conditionally. But that still leaves the question about __GFP_COLD (probably sane), __GFP_RECLAIMABLE (I wonder about that one) and __GFP_NOMEMALLOC (usually used together with NORETRY, and I'm not at all sure it makes sense as a base flag). So I suspect the final patch should not look like the one you tested, but instead likely have GFP_HIGHUSER | __GFP_COLD and possibly the __GFP_RECLAIMABLE flag too instead of just the bare __GFP_HIGHMEM.. (Well, we already had that __GFP_COLD there from before, so it's really about replacing __GFP_HIGHMEM with something like "GFP_HIGHUSER | __GFP_RECLAIMABLE"). But its' great to hear that this does seem to be the underlying cause. If you could test with that GFP_HIGHUSER | __GFP_RECLAIMABLE, that would be a good thing. After all - maybe the problem was triggered by some other flag than __GFP_MOVABLE, and as such, having some additional testing with a bigger set of allocation flags would be a really good thing. Linus
WARNING: multiple messages have this Message-ID (diff)
From: Linus Torvalds <torvalds@linux-foundation.org> To: "M. Vefa Bicakci" <bicave@superonline.com> Cc: earny@net4u.de, intel-gfx@lists.freedesktop.org, linux-kernel@vger.kernel.org, michael@reinelt.co.at, Hugh Dickins <hugh.dickins@tiscali.co.uk>, Pekka Enberg <penberg@cs.helsinki.fi>, A Rojas <nqn1976list@gmail.com>, KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>, rientjes@google.com, "A. Boulan" <arnaud.boulan@libertysurf.fr>, Roman Jarosz <kedgedev@gmail.com>, stable@kernel.org Subject: Re: [PATCH] drm/i915: Selectively enable self-reclaim Date: Thu, 1 Jul 2010 16:59:50 -0700 [thread overview] Message-ID: <AANLkTiklUBmNYs3710WftVX0Z3QihxFtDlK7tPlHZh8H@mail.gmail.com> (raw) In-Reply-To: <4C2D180C.5050805@superonline.com> On Thu, Jul 1, 2010 at 3:34 PM, M. Vefa Bicakci <bicave@superonline.com> wrote: > > Based on my testing, I am happy to report that the change you suggest > fixes the "memory corruption (segfaults) after thaw" issue for me. > I can't thank you enough times for this. Hey, goodie. And you're the one to be thanked - bisecting it down to that commit that wasn't _meant_ to have any real semantic changes (except for the bug-fix of racy mapping gfp-flags update) is what really cracked the lid on the problem. > Now, the obligatory question: Could we have this fix applied to 2.6.32, > 2.6.33 and 2.6.34 ? No problem, except we should first determine exactly what flags are the appropriate ones. My original patch was obviously not even compile-tested, and I actually meant for people to use GFP_HIGHUSER rather than __GFP_HIGHMEM. That contains all the "regular" allocation flags (but not the __GFP_MOVABLE, which is still just a suspicion of being the core reason for the problem). And the original DRM code had: GFP_HIGHUSER | __GFP_COLD | __GFP_FS | __GFP_RECLAIMABLE | __GFP_NORETRY | __GFP_NOWARN | __GFP_NOMEMALLOC which is not entirely sensible (__GFP_FS is already part of GFP_HIGHUSER, for example), and two of the flags (NORETRY and NOWARN) are the ones the driver wants to do conditionally. But that still leaves the question about __GFP_COLD (probably sane), __GFP_RECLAIMABLE (I wonder about that one) and __GFP_NOMEMALLOC (usually used together with NORETRY, and I'm not at all sure it makes sense as a base flag). So I suspect the final patch should not look like the one you tested, but instead likely have GFP_HIGHUSER | __GFP_COLD and possibly the __GFP_RECLAIMABLE flag too instead of just the bare __GFP_HIGHMEM.. (Well, we already had that __GFP_COLD there from before, so it's really about replacing __GFP_HIGHMEM with something like "GFP_HIGHUSER | __GFP_RECLAIMABLE"). But its' great to hear that this does seem to be the underlying cause. If you could test with that GFP_HIGHUSER | __GFP_RECLAIMABLE, that would be a good thing. After all - maybe the problem was triggered by some other flag than __GFP_MOVABLE, and as such, having some additional testing with a bigger set of allocation flags would be a really good thing. Linus
next prev parent reply other threads:[~2010-07-02 0:08 UTC|newest] Thread overview: 57+ messages / expand[flat|nested] mbox.gz Atom feed top 2010-01-14 13:15 OOM-Killer kills too much with 2.6.32.2 Roman Jarosz 2010-01-23 0:40 ` David Rientjes 2010-01-25 22:12 ` Roman Jarosz 2010-01-25 1:48 ` KOSAKI Motohiro 2010-01-25 20:47 ` Roman Jarosz 2010-01-26 5:19 ` KOSAKI Motohiro 2010-01-26 7:51 ` A Rojas 2010-01-26 9:06 ` Roman Jarosz 2010-01-26 11:07 ` KOSAKI Motohiro 2010-01-26 12:33 ` Chris Wilson 2010-01-26 13:03 ` KOSAKI Motohiro 2010-01-26 13:18 ` Chris Wilson 2010-01-26 13:59 ` Michael Reinelt 2010-01-26 14:07 ` Michael Reinelt 2010-01-27 0:50 ` KOSAKI Motohiro 2010-01-27 9:56 ` Pekka Enberg 2010-01-27 10:55 ` Linus Torvalds 2010-01-27 11:12 ` Pekka Enberg 2010-01-27 11:14 ` [PATCH] drm/i915: Selectively enable self-reclaim Chris Wilson 2010-01-27 11:20 ` Pekka Enberg 2010-01-27 11:30 ` Michael Reinelt 2010-01-28 3:15 ` Michael Reinelt 2010-01-28 18:21 ` Roman Jarosz 2010-01-27 11:50 ` KOSAKI Motohiro 2010-01-27 12:16 ` Linus Torvalds 2010-01-27 12:28 ` Linus Torvalds 2010-01-27 15:25 ` Chris Wilson 2010-01-27 16:09 ` Linus Torvalds 2010-01-27 17:14 ` Chris Wilson 2010-01-27 17:19 ` Linus Torvalds 2010-01-27 21:03 ` Roman Jarosz 2010-06-30 6:54 ` [Intel-gfx] " Dave Airlie 2010-06-30 7:05 ` Chris Wilson 2010-06-30 7:05 ` Chris Wilson 2010-06-30 23:07 ` [Intel-gfx] " Linus Torvalds 2010-07-01 1:24 ` Linus Torvalds 2010-07-01 1:55 ` KOSAKI Motohiro 2010-07-01 10:15 ` Dave Airlie 2010-07-01 11:19 ` Chris Wilson 2010-07-01 11:19 ` Chris Wilson 2010-07-01 22:34 ` M. Vefa Bicakci 2010-07-01 23:59 ` Linus Torvalds [this message] 2010-07-01 23:59 ` Linus Torvalds 2010-07-02 0:06 ` [Intel-gfx] " Dave Airlie 2010-07-02 0:49 ` Dave Airlie 2010-07-02 1:28 ` Linus Torvalds 2010-07-02 1:28 ` Linus Torvalds 2010-07-17 18:58 ` [Intel-gfx] " M. Vefa Bicakci 2010-07-17 19:15 ` Linus Torvalds 2010-07-18 14:27 ` M. Vefa Bicakci 2010-07-18 14:27 ` M. Vefa Bicakci 2010-07-18 16:59 ` Linus Torvalds 2010-01-28 6:37 ` Willy Tarreau 2010-01-26 13:41 ` OOM-Killer kills too much with 2.6.32.2 Roman Jarosz 2010-01-27 0:14 ` KOSAKI Motohiro 2010-01-27 9:53 ` Roman Jarosz 2010-01-26 13:57 ` Pekka Enberg
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=AANLkTiklUBmNYs3710WftVX0Z3QihxFtDlK7tPlHZh8H@mail.gmail.com \ --to=torvalds@linux-foundation.org \ --cc=airlied@gmail.com \ --cc=arnaud.boulan@libertysurf.fr \ --cc=bicave@superonline.com \ --cc=chris@chris-wilson.co.uk \ --cc=earny@net4u.de \ --cc=hugh.dickins@tiscali.co.uk \ --cc=intel-gfx@lists.freedesktop.org \ --cc=jcnengel@googlemail.com \ --cc=kedgedev@gmail.com \ --cc=kosaki.motohiro@jp.fujitsu.com \ --cc=linux-kernel@vger.kernel.org \ --cc=michael@reinelt.co.at \ --cc=nqn1976list@gmail.com \ --cc=penberg@cs.helsinki.fi \ --cc=rientjes@google.com \ --cc=stable@kernel.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.