From: isaacm@codeaurora.org
To: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Cc: peterz@infradead.org, matt@codeblueprint.co.uk, mingo@kernel.org,
tglx@linutronix.de, linux-kernel@vger.kernel.org,
psodagud@codeaurora.org, gregkh@linuxfoundation.org,
pkondeti@codeaurora.org, stable@vger.kernel.org
Subject: Re: [PATCH] stop_machine: Disable preemption after queueing stopper threads
Date: Tue, 24 Jul 2018 21:15:05 -0700 [thread overview]
Message-ID: <9d89ec1c84546e7b8044b3d2b24fc175@codeaurora.org> (raw)
In-Reply-To: <20180724062350.nlem2suuy5wlxpts@linutronix.de>
Hi Sebastian,
Thanks for the response.
"I haven't look in detail at this but your new preempt_disable() makes
things unbalanced for the err != 0 case."
This cannot happen. The only possible return values of this function
are -ENOENT or 0.
In the case where we return -ENOENT, we'll go
straight to "unlock," which releases the two locks being held, but
doesn't disable preemption, and since err != we won't call
preemption_enable.
In the case where we return 0, then that means the works were queued
successfully, and preemption was disabled, and we'll fall into the
if branch, after releasing the locks, and enable preemption, which is
correct.
In either case, there is no imbalance between the
preemption_[disable/enable]
calls.
Thanks,
Isaac Manjarres
On 2018-07-23 23:23, Sebastian Andrzej Siewior wrote:
> On 2018-07-23 18:13:48 [-0700], isaacm@codeaurora.org wrote:
>> Hi all,
> Hi,
>
>> Are there any comments about this patch?
>
> I haven't look in detail at this but your new preempt_disable() makes
> things unbalanced for the err != 0 case.
>
>> Thanks,
>> Isaac Manjarres
>
> Sebastian
next prev parent reply other threads:[~2018-07-25 4:15 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-17 19:35 [PATCH] stop_machine: Disable preemption after queueing stopper threads Isaac J. Manjarres
2018-07-24 1:13 ` isaacm
2018-07-24 6:23 ` Sebastian Andrzej Siewior
2018-07-25 4:15 ` isaacm [this message]
2018-07-30 10:20 ` Thomas Gleixner
2018-07-30 11:21 ` Peter Zijlstra
2018-07-30 12:41 ` Thomas Gleixner
2018-07-30 17:12 ` Sodagudi Prasad
2018-07-30 17:16 ` Thomas Gleixner
2018-07-30 21:07 ` Peter Zijlstra
2018-08-01 8:07 ` Sodagudi Prasad
2018-08-06 8:37 ` Pavan Kondeti
2018-08-02 12:06 ` [tip:sched/core] stop_machine: Reflow cpu_stop_queue_two_works() tip-bot for Peter Zijlstra
2018-08-02 13:27 ` tip-bot for Peter Zijlstra
2018-07-25 14:21 ` [tip:sched/core] stop_machine: Disable preemption after queueing stopper threads tip-bot for Isaac J. Manjarres
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=9d89ec1c84546e7b8044b3d2b24fc175@codeaurora.org \
--to=isaacm@codeaurora.org \
--cc=bigeasy@linutronix.de \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=matt@codeblueprint.co.uk \
--cc=mingo@kernel.org \
--cc=peterz@infradead.org \
--cc=pkondeti@codeaurora.org \
--cc=psodagud@codeaurora.org \
--cc=stable@vger.kernel.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).