From: Andrew Morton <akpm@linux-foundation.org>
To: kernel test robot <xiaolong.ye@intel.com>
Cc: Josef Bacik <josef@toxicpanda.com>,
Stephen Rothwell <sfr@canb.auug.org.au>,
Josef Bacik <jbacik@fb.com>, Rik van Riel <riel@redhat.com>,
Johannes Weiner <hannes@cmpxchg.org>,
LKML <linux-kernel@vger.kernel.org>,
lkp@01.org
Subject: Re: [lkp-robot] [mm] aefd950b83: divide_error:#[##]
Date: Wed, 31 May 2017 13:52:26 -0700 [thread overview]
Message-ID: <20170531135226.0a1b403a7a4e3f76f8f9d6bc@linux-foundation.org> (raw)
In-Reply-To: <20170531063116.GD1795@yexl-desktop>
On Wed, 31 May 2017 14:31:16 +0800 kernel test robot <xiaolong.ye@intel.com> wrote:
>
> FYI, we noticed the following commit:
>
> commit: aefd950b83d2d8cf4d3c270546c8725f866da191 ("mm: make kswapd try harder to keep active pages in cache")
> https://git.kernel.org/cgit/linux/kernel/git/next/linux-next.git master
>
> in testcase: boot
>
> ...
>
> [ 160.541829] divide error: 0000 [#1] PREEMPT SMP DEBUG_PAGEALLOC
>
> ...
>
> [ 160.587334] RIP: shrink_node+0x47f/0x5a0 RSP: ffffc900001bbd78
>
> ...
hm. This?
--- a/mm/vmscan.c~mm-make-kswapd-try-harder-to-keep-active-pages-in-cache-fix-2
+++ a/mm/vmscan.c
@@ -2724,7 +2724,7 @@ static bool shrink_node(pg_data_t *pgdat
if (sc->nr_reclaimed - nr_reclaimed) {
reclaimable = true;
} else if (sc->inactive_only && !skip_slab) {
- unsigned long percent;
+ unsigned long percent = 100;
/*
* We didn't reclaim anything this go around, so the
@@ -2735,7 +2735,8 @@ static bool shrink_node(pg_data_t *pgdat
* hoping that eventually we'll start freeing enough
* objects to reclaim space.
*/
- percent = (slab_reclaimed * 100 / slab_scanned);
+ if (slab_scanned)
+ percent = (slab_reclaimed * 100 / slab_scanned);
if (percent < 50)
sc->inactive_only = 0;
else
Or this?
--- a/mm/vmscan.c~mm-make-kswapd-try-harder-to-keep-active-pages-in-cache-fix-3
+++ a/mm/vmscan.c
@@ -2628,7 +2628,7 @@ static bool shrink_node(pg_data_t *pgdat
};
unsigned long node_lru_pages = 0;
unsigned long slab_reclaimed = 0;
- unsigned long slab_scanned = 0;
+ unsigned long slab_scanned = 1; /* Avoid div-by-zero */
struct mem_cgroup *memcg;
nr_reclaimed = sc->nr_reclaimed;
_
next prev parent reply other threads:[~2017-05-31 20:52 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-31 6:31 kernel test robot
2017-05-31 20:52 ` Andrew Morton [this message]
2017-05-31 20:58 ` Josef Bacik
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=20170531135226.0a1b403a7a4e3f76f8f9d6bc@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=hannes@cmpxchg.org \
--cc=jbacik@fb.com \
--cc=josef@toxicpanda.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lkp@01.org \
--cc=riel@redhat.com \
--cc=sfr@canb.auug.org.au \
--cc=xiaolong.ye@intel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®