public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: Will Deacon <will.deacon@arm.com>
Cc: linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, ard.biesheuvel@linaro.org,
	catalin.marinas@arm.com, rml@tech9.net, tglx@linutronix.de,
	schwidefsky@de.ibm.com
Subject: Re: [PATCH v2 0/2] arm64: Only call into preempt_schedule() if need_resched()
Date: Thu, 6 Dec 2018 16:08:50 +0100	[thread overview]
Message-ID: <20181206150850.GI13538@hirez.programming.kicks-ass.net> (raw)
In-Reply-To: <1543599271-14339-1-git-send-email-will.deacon@arm.com>

On Fri, Nov 30, 2018 at 05:34:29PM +0000, Will Deacon wrote:
> Hi all,
> 
> This is version two of the patches I originally posted here:
> 
>   http://lkml.kernel.org/r/1543347902-21170-1-git-send-email-will.deacon@arm.com
> 
> The only change since v1 is that  __preempt_count_dec_and_test() now
> reloads the need_resched flag if it initially saw that it was set. This
> resolves the issue spotted by Peter, where an IRQ coming in during the
> decrement can cause a reschedule to be missed.

Yes, I think this one will work, so:

Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>

However, this leaves me wondering if the sequence is actually much
better than what you had?

I suppose there's a win due to cache locality -- you only have to load a
single line -- but I'm thinking that on pure instruction count, you're
not actually winning much.

  parent reply	other threads:[~2018-12-06 15:09 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-30 17:34 [PATCH v2 0/2] arm64: Only call into preempt_schedule() if need_resched() Will Deacon
2018-11-30 17:34 ` [PATCH v2 1/2] preempt: Move PREEMPT_NEED_RESCHED definition into arch code Will Deacon
2018-11-30 17:34 ` [PATCH v2 2/2] arm64: preempt: Provide our own implementation of asm/preempt.h Will Deacon
2018-12-04 16:09   ` Ard Biesheuvel
2018-12-06 15:08 ` Peter Zijlstra [this message]
2018-12-06 19:18   ` [PATCH v2 0/2] arm64: Only call into preempt_schedule() if need_resched() Will Deacon

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=20181206150850.GI13538@hirez.programming.kicks-ass.net \
    --to=peterz@infradead.org \
    --cc=ard.biesheuvel@linaro.org \
    --cc=catalin.marinas@arm.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rml@tech9.net \
    --cc=schwidefsky@de.ibm.com \
    --cc=tglx@linutronix.de \
    --cc=will.deacon@arm.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