linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Tejun Heo <tj@kernel.org>
To: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Cc: mhocko@kernel.org, akpm@linux-foundation.org, linux-mm@kvack.org,
	mgorman@suse.de, vbabka@suse.cz
Subject: Re: [PATCH] mm: Use WQ_HIGHPRI for mm_percpu_wq.
Date: Mon, 28 Aug 2017 16:02:56 -0700	[thread overview]
Message-ID: <20170828230256.GF491396@devbig577.frc2.facebook.com> (raw)
In-Reply-To: <201708290715.FEI21383.HSFOQtJOMVOFFL@I-love.SAKURA.ne.jp>

Hello, Tetsuo.

On Tue, Aug 29, 2017 at 07:15:05AM +0900, Tetsuo Handa wrote:
> Isn't it any work item which does __GFP_DIRECT_RECLAIM && !__GFP_NORETRY memory
> allocation, for doing __GFP_DIRECT_RECLAIM && !__GFP_NORETRY memory allocation
> burns a lot of CPU cycles under memory pressure? In other words, won't we end up
> with setting WQ_CPU_INTENSIVE to almost all workqueues?

Ah, you're right.  It's the workers getting stuck in direct reclaim.

> > Well, there's one rescuer in the whole system and you'd need
> > nr_online_cpus kthreads if you wanna avoid constant cacheline
> > bouncing.
> 
> Excuse me, one rescuer kernel thread per each WQ_MEM_RECLAIM workqueue, doesn't it?

I meant that it isn't per-cpu.  If you use a kthread for it, that
kthread would be constantly bouncing around.

> My thought is to stop using WQ_MEM_RECLAIM workqueue for mm_percpu_wq and use a
> dedicated kernel thread like oom_reaper. Since the frequency of calling handler
> function seems to be once per a second for each online CPU, I thought switching
> cpumask for NR_CPUS times per a second is tolerable.

Hmm... all these is mostly because workqueue lost the "ignore
concurrency management" flag a while back while converting WQ_HIGHPRI
to mean high nice priority instead of the top of the queue w/o
concurrency management.  Resurrecting that shouldn't be too difficult.
I'll get back to you soon.

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>

  reply	other threads:[~2017-08-28 23:03 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1503921210-4603-1-git-send-email-penguin-kernel@I-love.SAKURA.ne.jp>
2017-08-28 12:10 ` Michal Hocko
2017-08-28 17:06   ` Tejun Heo
2017-08-28 22:15     ` Tetsuo Handa
2017-08-28 23:02       ` Tejun Heo [this message]
2017-08-28 23:09         ` Tejun Heo
2017-08-29 11:14           ` Tetsuo Handa
2017-08-29 14:38             ` Tejun Heo
2017-08-29 21:41               ` Tejun Heo
2017-08-30 13:51                 ` Tetsuo Handa
2017-08-31  1:46                   ` Tejun Heo
2017-08-31 14:52                     ` Tetsuo Handa
2017-08-31 15:25                       ` Michal Hocko
2017-08-31 22:07                         ` Tetsuo Handa
2017-09-01 13:47                           ` Tejun Heo
2017-09-01 14:29                             ` Tetsuo Handa
2017-08-29 13:33     ` Michal Hocko
2017-08-29 14:33       ` Tejun Heo
2017-08-29 20:29         ` Tetsuo Handa
2017-08-30  6:40           ` Michal Hocko

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=20170828230256.GF491396@devbig577.frc2.facebook.com \
    --to=tj@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=linux-mm@kvack.org \
    --cc=mgorman@suse.de \
    --cc=mhocko@kernel.org \
    --cc=penguin-kernel@I-love.SAKURA.ne.jp \
    --cc=vbabka@suse.cz \
    /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