All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andi Kleen <andi@firstfloor.org>
To: Andrew Lutomirski <luto@mit.edu>
Cc: Minchan Kim <minchan.kim@gmail.com>,
	linux-mm@kvack.org, intel-gfx@lists.freedesktop.org
Subject: Re: Root-causing kswapd spinning on Sandy Bridge laptops?
Date: Fri, 24 Jun 2011 11:44:12 -0700	[thread overview]
Message-ID: <m2liwrul1f.fsf@firstfloor.org> (raw)
In-Reply-To: <BANLkTik7ubq9ChR6UEBXOo5D9tn3mMb1Yw@mail.gmail.com> (Andrew Lutomirski's message of "Fri, 24 Jun 2011 02:22:50 -0400")

Andrew Lutomirski <luto@mit.edu> writes:

[Putting the Intel graphics driver developers in cc.]

> I'm back :-/
>
> I just triggered the kswapd bug on 2.6.39.1, which has the
> cond_resched in shrink_slab.  This time my system's still usable (I'm
> tying this email on it), but kswapd0 is taking 100% cpu.  It *does*
> schedule (tested by setting its affinity the same as another CPU hog
> and confirming that each one gets 50%).
>
> It appears to be calling i915_gem_inactive_shrink in a loop.  I have
> probes on entry and return of i915_gem_inactive_shrink and on return
> of shrink_slab.  I see:
>
>          kswapd0    47 [000] 59599.956573: mm_vmscan_kswapd_wake: nid=0 order=0
>          kswapd0    47 [000] 59599.956575: shrink_zone:
> (ffffffff810c848c) priority=12 zone=ffff8801005fe000
>          kswapd0    47 [000] 59599.956576: shrink_zone_return:
> (ffffffff810c848c <- ffffffff810c96c6) arg1=0
>          kswapd0    47 [000] 59599.956578: i915_gem_inactive_shrink:
> (ffffffffa0081e48) gfp_mask=d0 nr_to_scan=0
>          kswapd0    47 [000] 59599.956589: shrink_return:
> (ffffffffa0081e48 <- ffffffff810c6a62) arg1=320
>          kswapd0    47 [000] 59599.956589: shrink_slab_return:
> (ffffffff810c69f5 <- ffffffff810c96ec) arg1=0
>          kswapd0    47 [000] 59599.956592: i915_gem_inactive_shrink:
> (ffffffffa0081e48) gfp_mask=d0 nr_to_scan=0
>          kswapd0    47 [000] 59599.956602: shrink_return:
> (ffffffffa0081e48 <- ffffffff810c6a62) arg1=320
>          kswapd0    47 [000] 59599.956603: shrink_slab_return:
> (ffffffff810c69f5 <- ffffffff810c96ec) arg1=0
>          kswapd0    47 [000] 59599.956605: shrink_zone:
> (ffffffff810c848c) priority=12 zone=ffff8801005fee00
>          kswapd0    47 [000] 59599.956606: shrink_zone_return:
> (ffffffff810c848c <- ffffffff810c96c6) arg1=0
>          kswapd0    47 [000] 59599.956608: i915_gem_inactive_shrink:
> (ffffffffa0081e48) gfp_mask=d0 nr_to_scan=0
>          kswapd0    47 [000] 59599.956609: shrink_return:
> (ffffffffa0081e48 <- ffffffff810c6a62) arg1=0
>          kswapd0    47 [000] 59599.956610: shrink_slab_return:
> (ffffffff810c69f5 <- ffffffff810c96ec) arg1=0
>          kswapd0    47 [000] 59599.956611: mm_vmscan_kswapd_wake: nid=0 order=0
>          kswapd0    47 [000] 59599.956612: shrink_zone:
> (ffffffff810c848c) priority=12 zone=ffff8801005fe000
>          kswapd0    47 [000] 59599.956614: shrink_zone_return:
> (ffffffff810c848c <- ffffffff810c96c6) arg1=0
>          kswapd0    47 [000] 59599.956616: i915_gem_inactive_shrink:
> (ffffffffa0081e48) gfp_mask=d0 nr_to_scan=0
>          kswapd0    47 [000] 59599.956617: shrink_return:
> (ffffffffa0081e48 <- ffffffff810c6a62) arg1=0
>          kswapd0    47 [000] 59599.956618: shrink_slab_return:
> (ffffffff810c69f5 <- ffffffff810c96ec) arg1=0
>          kswapd0    47 [000] 59599.956620: i915_gem_inactive_shrink:
> (ffffffffa0081e48) gfp_mask=d0 nr_to_scan=0
>          kswapd0    47 [000] 59599.956621: shrink_return:
> (ffffffffa0081e48 <- ffffffff810c6a62) arg1=0
>          kswapd0    47 [000] 59599.956621: shrink_slab_return:
> (ffffffff810c69f5 <- ffffffff810c96ec) arg1=0
>          kswapd0    47 [000] 59599.956623: shrink_zone:
> (ffffffff810c848c) priority=12 zone=ffff8801005fee00
>          kswapd0    47 [000] 59599.956624: shrink_zone_return:
> (ffffffff810c848c <- ffffffff810c96c6) arg1=0
>          kswapd0    47 [000] 59599.956626: i915_gem_inactive_shrink:
> (ffffffffa0081e48) gfp_mask=d0 nr_to_scan=0
>          kswapd0    47 [000] 59599.956627: shrink_return:
> (ffffffffa0081e48 <- ffffffff810c6a62) arg1=0
>          kswapd0    47 [000] 59599.956628: shrink_slab_return:
> (ffffffff810c69f5 <- ffffffff810c96ec) arg1=0
>          kswapd0    47 [000] 59599.956629: mm_vmscan_kswapd_wake: nid=0 order=0
>
> The command was:
>
> perf record -g -aR -p 47 -e probe:i915_gem_inactive_shrink -e
> probe:shrink_return -e probe:shrink_slab_return -e probe:shrink_zone
> -e probe:shrink_zone_return -e probe:kswapd_try_to_sleep -e
> vmscan:mm_vmscan_kswapd_sleep -e vmscan:mm_vmscan_kswapd_wake -e
> vmscan:mm_vmscan_wakeup_kswapd -e vmscan:mm_vmscan_lru_shrink_inactive
> -e probe:wakeup_kswapd; perf script
>
> (shrink_return is i915_gem_inactive_shrink's return.  sorry, badly named.)
>
> It looks like something kswapd_try_to_sleep is not getting called.
>
> I do not know how to reproduce this, but I'll leave it running overnight.
>
> --Andy
>
> --
> To unsubscribe, send a message with 'unsubscribe linux-mm' in
> the body to majordomo@kvack.org.  For more info on Linux MM,
> see: http://www.linux-mm.org/ .
> Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
> Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
>

-- 
ak@linux.intel.com -- Speaking for myself only

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

  parent reply	other threads:[~2011-06-24 18:44 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-24  6:22 Root-causing kswapd spinning on Sandy Bridge laptops? Andrew Lutomirski
2011-06-24  9:27 ` Minchan Kim
2011-06-24  9:38   ` Minchan Kim
2011-06-24 10:24   ` Pádraig Brady
2011-06-24 12:15     ` Pádraig Brady
2011-06-24 12:51     ` Mel Gorman
2011-06-24 13:32       ` Andrew Lutomirski
2011-06-24 18:44 ` Andi Kleen [this message]
2011-06-24 18:48   ` Andrew Lutomirski
2011-06-24 19:13     ` Andi Kleen
2011-06-24 19:17       ` Christoph Hellwig
2011-06-24 18:54   ` Chris Mason
2011-06-27 11:03     ` Mel Gorman
2011-06-27 20:18       ` James Bottomley

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=m2liwrul1f.fsf@firstfloor.org \
    --to=andi@firstfloor.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=linux-mm@kvack.org \
    --cc=luto@mit.edu \
    --cc=minchan.kim@gmail.com \
    /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: link
Be 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.