From: "Shi, Yang" <yang.shi@linaro.org>
To: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Cc: tglx@linutronix.de, rostedt@goodmis.org,
linux-kernel@vger.kernel.org, linux-rt-users@vger.kernel.org,
linaro-kernel@lists.linaro.org
Subject: Re: [PATCH v2] rt: x86: enable preemption in IST exception for x86-32
Date: Tue, 22 Dec 2015 10:12:42 -0800 [thread overview]
Message-ID: <5679929A.5030806@linaro.org> (raw)
In-Reply-To: <20151222120628.GA27274@linutronix.de>
On 12/22/2015 4:06 AM, Sebastian Andrzej Siewior wrote:
> * Yang Shi | 2015-12-14 15:06:44 [-0800]:
>
>> Mainline kernel commit 959274753857efe9c5f1ba35fe727f51e9aa128d
>> ("x86, traps: Track entry into and exit from IST context"), introduced
>> ist_enter which disables preemption uncondiontionally for both x86-64 and
>> x86-32. However, x86-32 does not have an IST and the stack still belongs to
>> the current task and there is no problem in scheduling out the task.
>
> no no. So from a quick look I *assumed* you merged your v1 and revert of the
> Steven's patch into one piece. But now I see that you don't disable preemption
> 64bit which means you revert upstream change.
No, I neither merged my v1 patch nor reverted Steven's patch.
Directed by Thomas's suggestion in v1 patch review, I looked into the
code further.
Currently, the code does:
ist_enter disables preemption unconditionally for both x86-64 and x86-32
(by mainline commit). So, for the x86-64 part, it is fine since the
preemption should be disabled because ist exception will use per CPU
stack and signal delay send is necessary.
But, disabling preemption on x86-32 is unnecessary since it doesn't have
ist stacks, so the v2 patch re-enables preemption for x86-32.
upstream commit 959274753857efe9c5f1ba35fe727f51e9aa128d ("x86, traps:
Track entry into and exit from IST context") commit log has more details
for the ist stacks.
So, #1) v1 patch is not needed anymore since x86-32 still doesn't need
signal delay send in v2, #2) don't need revert Steven's patch, the logic
is just changed slightly (#ifdef CONFIG_X86_64 --> #if
!defined(CONFIG_X86_64)) and adopted the mainline APIs.
So, this is definitely a new approach for fixing the same problem and
*not* an incremental patch.
>
> Here is what happens:
> - I drop your v2
> - I merge your v1 with updated patch description
> - I revert "x86: Do not disable preemption in int3 on 32bit". If someone
> wants to skip the delayed signal on 32bit please address this upstream
> first (that is skip the preempt_disable() on 32bit if it is not
> required there).
> - Yang Shi, please send a changelong if you send incremental patches.
Sorry for any inconvenience. I should made the comment clearer at the
first place even though it is not an incremental patch.
Thanks,
Yang
>
> Sebastian
>
prev parent reply other threads:[~2015-12-22 18:12 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-14 23:06 [PATCH v2] rt: x86: enable preemption in IST exception for x86-32 Yang Shi
2015-12-22 12:06 ` Sebastian Andrzej Siewior
2015-12-22 18:12 ` Shi, Yang [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=5679929A.5030806@linaro.org \
--to=yang.shi@linaro.org \
--cc=bigeasy@linutronix.de \
--cc=linaro-kernel@lists.linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rt-users@vger.kernel.org \
--cc=rostedt@goodmis.org \
--cc=tglx@linutronix.de \
/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;
as well as URLs for NNTP newsgroup(s).