From: Tejun Heo <tj@kernel.org>
To: Wang Sheng-Hui <shhuiw@foxmail.com>
Cc: keith.busch@intel.com, peterz@infradead.org, treding@nvidia.com,
mingo@redhat.com, akpm@linux-foundation.org, linux-mm@kvack.org
Subject: Re: [PATCH] mm: Introduce dedicated WQ_MEM_RECLAIM workqueue to do lru_add_drain_all
Date: Thu, 2 Jun 2016 10:39:25 -0400 [thread overview]
Message-ID: <20160602143925.GJ14868@mtj.duckdns.org> (raw)
In-Reply-To: <1464853731-8599-1-git-send-email-shhuiw@foxmail.com>
On Thu, Jun 02, 2016 at 03:48:51PM +0800, Wang Sheng-Hui wrote:
> +static int __init lru_init(void)
> +{
> + lru_add_drain_wq = alloc_workqueue("lru-add-drain",
> + WQ_MEM_RECLAIM | WQ_UNBOUND, 0);
Why is it unbound?
> + if (WARN(!lru_add_drain_wq,
> + "Failed to create workqueue lru_add_drain_wq"))
> + return -ENOMEM;
I don't think we need an explicit warn here. Doesn't error return
from an init function trigger boot failure anyway?
> + return 0;
> +}
> +early_initcall(lru_init);
> +
> void lru_add_drain_all(void)
> {
> static DEFINE_MUTEX(lock);
> static struct cpumask has_work;
> int cpu;
>
> + struct workqueue_struct *lru_wq = lru_add_drain_wq ?: system_wq;
> +
> + WARN_ONCE(!lru_add_drain_wq,
> + "Use system_wq to do lru_add_drain_all()");
Ditto. The system is crashing for sure. What's the point of this
warning?
Thanks.
--
tejun
--
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>
next prev parent reply other threads:[~2016-06-02 14:39 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-02 7:48 Wang Sheng-Hui
2016-06-02 14:39 ` Tejun Heo [this message]
2016-06-03 0:48 ` Wang Sheng-Hui
2016-06-03 1:08 ` Wang Sheng-Hui
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=20160602143925.GJ14868@mtj.duckdns.org \
--to=tj@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=keith.busch@intel.com \
--cc=linux-mm@kvack.org \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=shhuiw@foxmail.com \
--cc=treding@nvidia.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