linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Byungchul Park <max.byungchul.park@gmail.com>
To: Peter Zijlstra <peterz@infradead.org>
Cc: Byungchul Park <byungchul.park@lge.com>,
	Tejun Heo <tj@kernel.org>,
	johannes.berg@intel.com, Ingo Molnar <mingo@kernel.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	oleg@redhat.com, david@fromorbit.com,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	kernel-team@lge.com
Subject: Re: [PATCH] lockdep: Remove unnecessary acquisitions wrt workqueue flush
Date: Fri, 8 Sep 2017 06:19:57 +0900	[thread overview]
Message-ID: <CANrsvRNtVV25do-hdXEf6K5iHMrPoerdvHCpY=Wj8pvhr3ayhA@mail.gmail.com> (raw)
In-Reply-To: <20170907152107.v4wbvzi2zxlaelms@hirez.programming.kicks-ass.net>

On Fri, Sep 8, 2017 at 12:21 AM, Peter Zijlstra <peterz@infradead.org> wrote:
> On Thu, Sep 07, 2017 at 08:37:08PM +0900, Byungchul Park wrote:
>> On Thu, Sep 7, 2017 at 6:41 PM, Peter Zijlstra <peterz@infradead.org> wrote:
>> > On Thu, Sep 07, 2017 at 09:33:16AM +0900, Byungchul Park wrote:
>> >> Workqueue added manual acquisitions to catch deadlock cases. Now
>> >> crossrelease was introduced, some of those are redundant because
>> >> crossrelease-enabled wait_for_completeion() also does it. Removed it.
>> >
>> > This does not explain how it doesn't become the regular timing dependent
>> > stuff cross-release normally is.
>>
>> Yes, I will add more explanation for it at the next spin.
>>
>> But, let me explain it a bit here to help you get it, since it's very
>> simple. This has nothing to do with 'might' thing I introduced
>> previously. For 'might' thing, I will start it after getting your response.
>>
>> Here, I just removed acquire() because wait_for_completion()
>> already includes the acquire() by LOCKDEP_COMPLETIONS.
>> That's all.
>
> Ah I see, but it does so using some fairly nasty completion init stuff.
> The old code was far easier to read.

Agree.

But, old code has redundant acquisitions, moreover uses sub-class
to avoid false detection, even though they are the same class.

I will try to enhance readability of completion init, and fix the incorrect
use at the next spin.

-- 
Thanks,
Byungchul

      reply	other threads:[~2017-09-07 21:20 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-07  0:33 [PATCH] lockdep: Remove unnecessary acquisitions wrt workqueue flush Byungchul Park
2017-09-07  9:41 ` Peter Zijlstra
2017-09-07 11:37   ` Byungchul Park
2017-09-07 15:21     ` Peter Zijlstra
2017-09-07 21:19       ` Byungchul Park [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='CANrsvRNtVV25do-hdXEf6K5iHMrPoerdvHCpY=Wj8pvhr3ayhA@mail.gmail.com' \
    --to=max.byungchul.park@gmail.com \
    --cc=byungchul.park@lge.com \
    --cc=david@fromorbit.com \
    --cc=johannes.berg@intel.com \
    --cc=kernel-team@lge.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=oleg@redhat.com \
    --cc=peterz@infradead.org \
    --cc=tglx@linutronix.de \
    --cc=tj@kernel.org \
    /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).