All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Michal Hocko <mhocko@kernel.org>
Cc: Tetsuo Handa <penguin-kernel@i-love.sakura.ne.jp>,
	Chris Metcalf <chris.d.metcalf@gmail.com>,
	Rusty Russell <rusty@rustcorp.com.au>,
	linux-mm@kvack.org, Guenter Roeck <linux@roeck-us.net>,
	Tejun Heo <tj@kernel.org>
Subject: Re: [PATCH] mm/swap.c: workaround for_each_cpu() bug on UP kernel.
Date: Wed, 13 Feb 2019 13:37:54 -0800	[thread overview]
Message-ID: <20190213133754.dae63726a93ba818e114cdb9@linux-foundation.org> (raw)
In-Reply-To: <20190213124334.GH4525@dhcp22.suse.cz>

On Wed, 13 Feb 2019 13:43:34 +0100 Michal Hocko <mhocko@kernel.org> wrote:

> Since for_each_cpu(cpu, mask) added by commit 2d3854a37e8b767a ("cpumask:
> introduce new API, without changing anything") did not evaluate the mask
> argument if NR_CPUS == 1 due to CONFIG_SMP=n, lru_add_drain_all() is
> hitting WARN_ON() at __flush_work() added by commit 4d43d395fed12463
> ("workqueue: Try to catch flush_work() without INIT_WORK().")
> by unconditionally calling flush_work() [1].
> 
> Workaround this issue by using CONFIG_SMP=n specific lru_add_drain_all
> implementation. There is no real need to defer the implementation to the
> workqueue as the draining is going to happen on the local cpu. So alias
> lru_add_drain_all to lru_add_drain which does all the necessary work.
> 

I assume that warning comes out a LOT of times under the correct
circumstances.

Tejun, I think a WARN_ON_ONCE() would be better.


  reply	other threads:[~2019-02-13 21:37 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-07  9:53 Tetsuo Handa
2019-02-07 14:07 ` Guenter Roeck
2019-02-07 14:18 ` William Kucharski
2019-02-12 10:11 ` Michal Hocko
2019-02-12 10:25   ` Tetsuo Handa
2019-02-12 11:21     ` Michal Hocko
2019-02-12 11:29       ` Michal Hocko
2019-02-12 11:37         ` Tetsuo Handa
2019-02-12 21:06         ` Andrew Morton
2019-02-13 12:43           ` Michal Hocko
2019-02-13 21:37             ` Andrew Morton [this message]
2019-02-12 23:19         ` [PATCH] mm: handle lru_add_drain_all for UP properly kbuild test robot
2019-02-12 23:48         ` kbuild test robot

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=20190213133754.dae63726a93ba818e114cdb9@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=chris.d.metcalf@gmail.com \
    --cc=linux-mm@kvack.org \
    --cc=linux@roeck-us.net \
    --cc=mhocko@kernel.org \
    --cc=penguin-kernel@i-love.sakura.ne.jp \
    --cc=rusty@rustcorp.com.au \
    --cc=tj@kernel.org \
    --subject='Re: [PATCH] mm/swap.c: workaround for_each_cpu() bug on UP kernel.' \
    /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

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.