All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mike Galbraith <umgwanakikbuti@gmail.com>
To: Michal Hocko <mhocko@kernel.org>
Cc: "Jörn Engel" <joern@purestorage.com>,
	"Spencer Baugh" <sbaugh@catern.com>,
	"Toshi Kani" <toshi.kani@hp.com>,
	"Andrew Morton" <akpm@linux-foundation.org>,
	"Fengguang Wu" <fengguang.wu@intel.com>,
	"Joern Engel" <joern@logfs.org>,
	"Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>,
	"Mel Gorman" <mgorman@suse.de>,
	"Johannes Weiner" <hannes@cmpxchg.org>,
	"Shachar Raindel" <raindel@mellanox.com>,
	"Boaz Harrosh" <boaz@plexistor.com>,
	"Andy Lutomirski" <luto@amacapital.net>,
	"Joonsoo Kim" <iamjoonsoo.kim@lge.com>,
	"Andrey Ryabinin" <a.ryabinin@samsung.com>,
	"Roman Pen" <r.peniaev@gmail.com>,
	"Andrey Konovalov" <adech.fo@gmail.com>,
	"Eric Dumazet" <edumazet@google.com>,
	"Dmitry Vyukov" <dvyukov@google.com>,
	"Rob Jones" <rob.jones@codethink.co.uk>,
	"WANG Chao" <chaowang@redhat.com>,
	"open list" <linux-kernel@vger.kernel.org>,
	"open list:MEMORY MANAGEMENT" <linux-mm@kvack.org>,
	"Spencer Baugh" <Spencer.baugh@purestorage.com>
Subject: Re: [PATCH] mm: add resched points to remap_pmd_range/ioremap_pmd_range
Date: Thu, 30 Jul 2015 17:22:55 +0200	[thread overview]
Message-ID: <1438269775.23663.58.camel@gmail.com> (raw)
In-Reply-To: <20150729095439.GD15801@dhcp22.suse.cz>

On Wed, 2015-07-29 at 11:54 +0200, Michal Hocko wrote:
> On Tue 28-07-15 10:08:44, JA?rn Engel wrote:
> > On Tue, Jul 28, 2015 at 03:32:55PM +0200, Michal Hocko wrote:
> > > > 
> > > > We have kernel preemption disabled.  A lower-priority task in a system
> > > > call will block higher-priority tasks.
> > > 
> > > This is an inherent problem of !PREEMPT, though. There are many
> > > loops which can take quite some time but we do not want to sprinkle
> > > cond_resched all over the kernel. On the other hand these io/remap resp.
> > > vunmap page table walks do not have any cond_resched points AFAICS so we
> > > can at least mimic zap_pmd_range which does cond_resched.
> > 
> > Even for !PREEMPT we don't want infinite scheduler latencies.  Real
> > question is how much we are willing to accept and at what point we
> > should start sprinkling cond_resched.  I would pick 100ms, but that is
> > just a personal choice.  If we decide on 200ms or 500ms, I can live with
> > that too.
> 
> I do not thing this is about a magic value. It is more about natural
> places for scheduling point. As I've written above cond_resched at pmd
> level of the page table walk sounds reasonable to me as we do that
> already for zap_pmd_range and consistency would make sense to me.

I piddled about with the thought that it might be nice to be able to
sprinkle cond_resched() about to cut rt latencies without wrecking
normal load throughput, cobbled together a cond_resched_rt().

On my little box that was a waste of time, as the biggest hits are block
softirq and free_hot_cold_page_list().

	-Mike

--
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>

WARNING: multiple messages have this Message-ID (diff)
From: Mike Galbraith <umgwanakikbuti@gmail.com>
To: Michal Hocko <mhocko@kernel.org>
Cc: "Jörn Engel" <joern@purestorage.com>,
	"Spencer Baugh" <sbaugh@catern.com>,
	"Toshi Kani" <toshi.kani@hp.com>,
	"Andrew Morton" <akpm@linux-foundation.org>,
	"Fengguang Wu" <fengguang.wu@intel.com>,
	"Joern Engel" <joern@logfs.org>,
	"Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>,
	"Mel Gorman" <mgorman@suse.de>,
	"Johannes Weiner" <hannes@cmpxchg.org>,
	"Shachar Raindel" <raindel@mellanox.com>,
	"Boaz Harrosh" <boaz@plexistor.com>,
	"Andy Lutomirski" <luto@amacapital.net>,
	"Joonsoo Kim" <iamjoonsoo.kim@lge.com>,
	"Andrey Ryabinin" <a.ryabinin@samsung.com>,
	"Roman Pen" <r.peniaev@gmail.com>,
	"Andrey Konovalov" <adech.fo@gmail.com>,
	"Eric Dumazet" <edumazet@google.com>,
	"Dmitry Vyukov" <dvyukov@google.com>,
	"Rob Jones" <rob.jones@codethink.co.uk>,
	"WANG Chao" <chaowang@redhat.com>,
	"open list" <linux-kernel@vger.kernel.org>,
	"open list:MEMORY MANAGEMENT" <linux-mm@kvack.org>,
	"Spencer Baugh" <Spencer.baugh@purestorage.com>
Subject: Re: [PATCH] mm: add resched points to remap_pmd_range/ioremap_pmd_range
Date: Thu, 30 Jul 2015 17:22:55 +0200	[thread overview]
Message-ID: <1438269775.23663.58.camel@gmail.com> (raw)
In-Reply-To: <20150729095439.GD15801@dhcp22.suse.cz>

On Wed, 2015-07-29 at 11:54 +0200, Michal Hocko wrote:
> On Tue 28-07-15 10:08:44, Jörn Engel wrote:
> > On Tue, Jul 28, 2015 at 03:32:55PM +0200, Michal Hocko wrote:
> > > > 
> > > > We have kernel preemption disabled.  A lower-priority task in a system
> > > > call will block higher-priority tasks.
> > > 
> > > This is an inherent problem of !PREEMPT, though. There are many
> > > loops which can take quite some time but we do not want to sprinkle
> > > cond_resched all over the kernel. On the other hand these io/remap resp.
> > > vunmap page table walks do not have any cond_resched points AFAICS so we
> > > can at least mimic zap_pmd_range which does cond_resched.
> > 
> > Even for !PREEMPT we don't want infinite scheduler latencies.  Real
> > question is how much we are willing to accept and at what point we
> > should start sprinkling cond_resched.  I would pick 100ms, but that is
> > just a personal choice.  If we decide on 200ms or 500ms, I can live with
> > that too.
> 
> I do not thing this is about a magic value. It is more about natural
> places for scheduling point. As I've written above cond_resched at pmd
> level of the page table walk sounds reasonable to me as we do that
> already for zap_pmd_range and consistency would make sense to me.

I piddled about with the thought that it might be nice to be able to
sprinkle cond_resched() about to cut rt latencies without wrecking
normal load throughput, cobbled together a cond_resched_rt().

On my little box that was a waste of time, as the biggest hits are block
softirq and free_hot_cold_page_list().

	-Mike


  reply	other threads:[~2015-07-30 15:23 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-23 21:54 [PATCH] mm: add resched points to remap_pmd_range/ioremap_pmd_range Spencer Baugh
2015-07-23 21:54 ` Spencer Baugh
2015-07-23 23:32 ` Toshi Kani
2015-07-23 23:32   ` Toshi Kani
2015-07-24 17:00   ` Jörn Engel
2015-07-24 17:00     ` Jörn Engel
2015-07-24  7:04 ` Michal Hocko
2015-07-24  7:04   ` Michal Hocko
2015-07-24 16:56   ` Jörn Engel
2015-07-24 16:56     ` Jörn Engel
2015-07-27  7:08     ` Michal Hocko
2015-07-27  7:08       ` Michal Hocko
2015-07-27  8:29       ` Mike Galbraith
2015-07-27  8:29         ` Mike Galbraith
2015-07-27 15:18       ` Jörn Engel
2015-07-27 15:18         ` Jörn Engel
2015-07-28 13:32         ` Michal Hocko
2015-07-28 13:32           ` Michal Hocko
2015-07-28 17:08           ` Jörn Engel
2015-07-28 17:08             ` Jörn Engel
2015-07-29  9:54             ` Michal Hocko
2015-07-29  9:54               ` Michal Hocko
2015-07-30 15:22               ` Mike Galbraith [this message]
2015-07-30 15:22                 ` Mike Galbraith
2015-07-30 16:58                 ` Jörn Engel
2015-07-30 16:58                   ` Jörn Engel
2015-07-30 18:55                   ` Mike Galbraith
2015-07-30 18:55                     ` Mike Galbraith
2015-08-09  9:25                     ` [hack] sched: create PREEMPT_VOLUNTARY_RT and some RT specific resched points Mike Galbraith
2015-08-09  9:25                       ` Mike Galbraith
2015-08-09 10:51                       ` Mike Galbraith
2015-08-09 10:51                         ` Mike Galbraith
2015-08-06  8:55                   ` [PATCH] mm: add resched points to remap_pmd_range/ioremap_pmd_range Mike Galbraith
2015-08-06  8:55                     ` Mike Galbraith

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=1438269775.23663.58.camel@gmail.com \
    --to=umgwanakikbuti@gmail.com \
    --cc=Spencer.baugh@purestorage.com \
    --cc=a.ryabinin@samsung.com \
    --cc=adech.fo@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=boaz@plexistor.com \
    --cc=chaowang@redhat.com \
    --cc=dvyukov@google.com \
    --cc=edumazet@google.com \
    --cc=fengguang.wu@intel.com \
    --cc=hannes@cmpxchg.org \
    --cc=iamjoonsoo.kim@lge.com \
    --cc=joern@logfs.org \
    --cc=joern@purestorage.com \
    --cc=kirill.shutemov@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=luto@amacapital.net \
    --cc=mgorman@suse.de \
    --cc=mhocko@kernel.org \
    --cc=r.peniaev@gmail.com \
    --cc=raindel@mellanox.com \
    --cc=rob.jones@codethink.co.uk \
    --cc=sbaugh@catern.com \
    --cc=toshi.kani@hp.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 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.