Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1533538

Re: PROBLEM-PERSISTS: dmesg spam: alloc_contig_range: [XX, YY) PFNs busy

From "Robin H. Johnson" <robbat2@gentoo.org>
Newsgroups linux.kernel
Subject Re: PROBLEM-PERSISTS: dmesg spam: alloc_contig_range: [XX, YY) PFNs busy
Date 2016-11-30 21:00 +0100
Message-ID <sJjcR-1U1-9@gated-at.bofh.it> (permalink)
References <sIZnP-670-11@gated-at.bofh.it> <sJ9nc-4fE-17@gated-at.bofh.it> <sJcO6-6wi-11@gated-at.bofh.it> <sJd7r-6CQ-9@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


(I'm going to respond directly to this email with the stack trace.)

On Wed, Nov 30, 2016 at 02:28:49PM +0100, Michal Hocko wrote:
> > On the other hand, if this didn’t happen and now happens all the time,
> > this indicates a regression in CMA’s capability to allocate pages so
> > just rate limiting the output would hide the potential actual issue.
> 
> Or there might be just a much larger demand on those large blocks, no?
> But seriously, dumping those message again and again into the low (see
> the 2.5_GB_/h to the log is just insane. So there really should be some
> throttling.
> 
> Does the following help you Robin. At least to not get swamped by those
> message.
Here's what I whipped up based on that, to ensure that dump_stack got
rate-limited at the same pass as PFNs-busy. It dropped the dmesg spew to
~25MB/hour (and is suppressing ~43 entries/second right now).

commit 6ad4037e18ec2199f8755274d8a745a9904241a1
Author: Robin H. Johnson <robbat2@gentoo.org>
Date:   Wed Nov 30 10:32:57 2016 -0800

    mm: ratelimit & trace PFNs busy.
    
    Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>

diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index 6de9440e3ae2..3c28ec3d18f8 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -7289,8 +7289,15 @@ int alloc_contig_range(unsigned long start, unsigned long end,
 
 	/* Make sure the range is really isolated. */
 	if (test_pages_isolated(outer_start, end, false)) {
-		pr_info("%s: [%lx, %lx) PFNs busy\n",
-			__func__, outer_start, end);
+		static DEFINE_RATELIMIT_STATE(ratelimit_pfn_busy,
+					DEFAULT_RATELIMIT_INTERVAL,
+					DEFAULT_RATELIMIT_BURST);
+		if (__ratelimit(&ratelimit_pfn_busy)) {
+			pr_info("%s: [%lx, %lx) PFNs busy\n",
+				__func__, outer_start, end);
+			dump_stack();
+		}
+
 		ret = -EBUSY;
 		goto done;
 	}

-- 
Robin Hugh Johnson
Gentoo Linux: Dev, Infra Lead, Foundation Trustee & Treasurer
E-Mail   : robbat2@gentoo.org
GnuPG FP : 11ACBA4F 4778E3F6 E4EDF38E B27B944E 34884E85
GnuPG FP : 7D0B3CEB E9B85B1F 825BCECF EE05E6F6 A48F6136

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

PROBLEM-PERSISTS: dmesg spam: alloc_contig_range: [XX, YY) PFNs busy "Robin H. Johnson" <robbat2@orbis-terrarum.net> - 2016-11-29 23:50 +0100
  Re: PROBLEM-PERSISTS: dmesg spam: alloc_contig_range: [XX, YY) PFNs  busy Michal Hocko <mhocko@kernel.org> - 2016-11-30 10:30 +0100
    Re: PROBLEM-PERSISTS: dmesg spam: alloc_contig_range: [XX, YY) PFNs busy Michal Nazarewicz <mina86@mina86.com> - 2016-11-30 14:10 +0100
      Re: PROBLEM-PERSISTS: dmesg spam: alloc_contig_range: [XX, YY) PFNs  busy Michal Hocko <mhocko@kernel.org> - 2016-11-30 14:30 +0100
        Re: PROBLEM-PERSISTS: dmesg spam: alloc_contig_range: [XX, YY) PFNs  busy "Robin H. Johnson" <robbat2@gentoo.org> - 2016-11-30 21:00 +0100
          drm/radeon spamming alloc_contig_range: [xxx, yyy) PFNs busy busy "Robin H. Johnson" <robbat2@gentoo.org> - 2016-11-30 21:20 +0100
            Re: drm/radeon spamming alloc_contig_range: [xxx, yyy) PFNs busy busy Vlastimil Babka <vbabka@suse.cz> - 2016-11-30 22:30 +0100
              Re: drm/radeon spamming alloc_contig_range: [xxx, yyy) PFNs busy busy "Robin H. Johnson" <robbat2@gentoo.org> - 2016-12-01 07:30 +0100
                Re: drm/radeon spamming alloc_contig_range: [xxx, yyy) PFNs busy busy Vlastimil Babka <vbabka@suse.cz> - 2016-12-01 08:40 +0100
                Re: drm/radeon spamming alloc_contig_range: [xxx, yyy) PFNs busy busy "Robin H. Johnson" <robbat2@gentoo.org> - 2016-12-01 09:00 +0100
            Re: drm/radeon spamming alloc_contig_range: [xxx, yyy) PFNs busy busy Michal Hocko <mhocko@kernel.org> - 2016-12-01 08:20 +0100
              Re: drm/radeon spamming alloc_contig_range: [xxx, yyy) PFNs busy busy Michal Hocko <mhocko@kernel.org> - 2016-12-01 08:30 +0100
                Re: drm/radeon spamming alloc_contig_range: [xxx, yyy) PFNs busy busy Vlastimil Babka <vbabka@suse.cz> - 2016-12-01 08:50 +0100
                Re: drm/radeon spamming alloc_contig_range: [xxx, yyy) PFNs busy busy Michal Hocko <mhocko@kernel.org> - 2016-12-01 15:20 +0100
                Re: drm/radeon spamming alloc_contig_range: [xxx, yyy) PFNs busy busy Michal Nazarewicz <mina86@mina86.com> - 2016-12-01 17:10 +0100
                Re: drm/radeon spamming alloc_contig_range: [xxx, yyy) PFNs busy busy Michal Hocko <mhocko@kernel.org> - 2016-12-01 17:20 +0100
                Re: drm/radeon spamming alloc_contig_range: [xxx, yyy) PFNs busy busy Michal Nazarewicz <mina86@mina86.com> - 2016-12-01 22:10 +0100
                Re: drm/radeon spamming alloc_contig_range: [xxx, yyy) PFNs busy busy Vlastimil Babka <vbabka@suse.cz> - 2016-12-02 07:40 +0100
                Re: drm/radeon spamming alloc_contig_range: [xxx, yyy) PFNs busy  busy Lucas Stach <l.stach@pengutronix.de> - 2016-12-02 11:30 +0100
                Re: drm/radeon spamming alloc_contig_range: [xxx, yyy) PFNs busy busy Jerome Glisse <j.glisse@gmail.com> - 2016-12-02 16:20 +0100
          Re: PROBLEM-PERSISTS: dmesg spam: alloc_contig_range: [XX, YY) PFNs busy Michal Nazarewicz <mina86@mina86.com> - 2016-12-01 02:40 +0100

csiph-web