From: Mel Gorman <mgorman@techsingularity.net>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Peter Zijlstra <peterz@infradead.org>,
Michal Hocko <mhocko@kernel.org>,
Vlastimil Babka <vbabka@suse.cz>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org,
Ingo Molnar <mingo@kernel.org>
Subject: Re: [PATCH] mm, page_alloc: only use per-cpu allocator for irq-safe requests -fix
Date: Wed, 8 Feb 2017 15:12:26 +0000 [thread overview]
Message-ID: <20170208151226.rctwvaqwkgjpbzzn@techsingularity.net> (raw)
In-Reply-To: <alpine.DEB.2.20.1702081550440.3536@nanos>
On Wed, Feb 08, 2017 at 03:56:22PM +0100, Thomas Gleixner wrote:
> On Wed, 8 Feb 2017, Mel Gorman wrote:
>
> > preempt_enable_no_resched() was used based on review feedback that had no
> > strong objection at the time. It avoided introducing a preemption point
> > where one didn't exist before which was marginal at best.
>
> Actually local_irq_enable() _IS_ a preemption point, indirect but still:
>
> local_irq_disable()
> ....
> --> HW interrupt is raised
> ....
> local_irq_enable()
>
> handle_irq()
> set_need_resched()
> ret_from_irq()
> preempt()
>
> while with preempt_disable that looks like this:
>
> preempt_disable()
> ....
> --> HW interrupt is raised
> handle_irq()
> set_need_resched()
> ret_from_irq()
> ....
> preempt_enable()
> preempt()
>
> Now if you use preempt_enable_no_resched() then you miss the preemption and
> depending on the actual code path you might run something which takes ages
> without hitting a preemption point after that.
>
Thanks for the education, I had missed it. The changelog should have been
"fix a dumb mistake and stick to preempt_enable". Assuming Andrew picks
this patch up, it'll be folded into the patch that introduced the problem
in the first place and will the broken usage will never hit mainline.
> It's not only a problem for RT. It's also in mainline a violation of the
> preemption mechanism.
>
Understood, thanks.
--
Mel Gorman
SUSE Labs
--
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>
prev parent reply other threads:[~2017-02-08 15:12 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-08 14:31 Mel Gorman
2017-02-08 14:56 ` Thomas Gleixner
2017-02-08 15:12 ` Mel Gorman [this message]
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=20170208151226.rctwvaqwkgjpbzzn@techsingularity.net \
--to=mgorman@techsingularity.net \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mhocko@kernel.org \
--cc=mingo@kernel.org \
--cc=peterz@infradead.org \
--cc=tglx@linutronix.de \
--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