linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
To: Alexander Viro <viro@zeniv.linux.org.uk>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Mel Gorman <mgorman@suse.de>, Michal Hocko <mhocko@suse.cz>,
	Rik van Riel <riel@redhat.com>,
	Johannes Weiner <hannes@cmpxchg.org>,
	linux-fsdevel@vger.kernel.org, linux-mm@kvack.org,
	linux-kernel@vger.kernel.org
Subject: kswapd using __this_cpu_add() in preemptible code
Date: Tue, 18 Mar 2014 21:53:30 +0300	[thread overview]
Message-ID: <20140318185329.GB430@swordfish> (raw)

Hello gentlemen,

Commit 589a606f9539663f162e4a110d117527833b58a4 ("percpu: add preemption
checks to __this_cpu ops") added preempt check to used in __count_vm_events()
__this_cpu ops, causing the following kswapd warning:

 BUG: using __this_cpu_add() in preemptible [00000000] code: kswapd0/56
 caller is __this_cpu_preempt_check+0x2b/0x2d
 Call Trace:
 [<ffffffff813b8d4d>] dump_stack+0x4e/0x7a
 [<ffffffff8121366f>] check_preemption_disabled+0xce/0xdd
 [<ffffffff812136bb>] __this_cpu_preempt_check+0x2b/0x2d
 [<ffffffff810f622e>] inode_lru_isolate+0xed/0x197
 [<ffffffff810be43c>] list_lru_walk_node+0x7b/0x14c
 [<ffffffff810f6141>] ? iput+0x131/0x131
 [<ffffffff810f681f>] prune_icache_sb+0x35/0x4c
 [<ffffffff810e3951>] super_cache_scan+0xe3/0x143
 [<ffffffff810b1301>] shrink_slab_node+0x103/0x16f
 [<ffffffff810b19fd>] shrink_slab+0x75/0xe4
 [<ffffffff810b3f3d>] balance_pgdat+0x2fa/0x47f
 [<ffffffff810b4395>] kswapd+0x2d3/0x2fd
 [<ffffffff81068049>] ? __wake_up_sync+0xd/0xd
 [<ffffffff810b40c2>] ? balance_pgdat+0x47f/0x47f
 [<ffffffff81051e75>] kthread+0xd6/0xde
 [<ffffffff81051d9f>] ? kthread_create_on_node+0x162/0x162
 [<ffffffff813be5bc>] ret_from_fork+0x7c/0xb0
 [<ffffffff81051d9f>] ? kthread_create_on_node+0x162/0x162


list_lru_walk_node() seems to be the only place where __count_vm_events()
called with preemption enabled. remaining __count_vm_events() and
__count_vm_event() calls are done with preemption disabled (unless I
overlooked something).


	-ss

--
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/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

             reply	other threads:[~2014-03-18 18:53 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-18 18:53 Sergey Senozhatsky [this message]
2014-03-18 21:22 ` kswapd using __this_cpu_add() in preemptible code Andrew Morton
2014-03-19  6:20   ` Sergey Senozhatsky
2014-03-20  1:01   ` Dave Chinner
2014-03-20 14:04   ` Christoph Lameter

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=20140318185329.GB430@swordfish \
    --to=sergey.senozhatsky@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=hannes@cmpxchg.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mgorman@suse.de \
    --cc=mhocko@suse.cz \
    --cc=riel@redhat.com \
    --cc=viro@zeniv.linux.org.uk \
    /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;
as well as URLs for NNTP newsgroup(s).