public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Pavel Machek <pavel@ucw.cz>
To: len.brown@intel.com, linux-kernel@vger.kernel.org,
	tglx@linutronix.de, mingo@kernel.org, peterz@infradead.org,
	torvalds@linux-foundation.org, rjw@rjwysocki.net, hpa@zytor.com
Cc: linux-tip-commits@vger.kernel.org
Subject: Re: [tip:sched/core] sched/wait: Reimplement wait_event_freezable()
Date: Tue, 4 Nov 2014 21:12:03 +0100	[thread overview]
Message-ID: <20141104201203.GA15071@amd> (raw)
In-Reply-To: <tip-d86fz1jmso9wjxa8jfpinp8o@git.kernel.org>

Hi!

> Commit-ID:  36df04bc5273a046f53b5e359febc1225f85aa7b
> Gitweb:     http://git.kernel.org/tip/36df04bc5273a046f53b5e359febc1225f85aa7b
> Author:     Peter Zijlstra <peterz@infradead.org>
> AuthorDate: Wed, 29 Oct 2014 12:21:57 +0100
> Committer:  Ingo Molnar <mingo@kernel.org>
> CommitDate: Tue, 4 Nov 2014 07:17:45 +0100
> 
> sched/wait: Reimplement wait_event_freezable()
> 
> Provide better implementations of wait_event_freezable() APIs.
> 
> The problem is with freezer_do_not_count(), it hides the thread from
> the freezer, even though this thread might not actually freeze/sleep
> at all.

Can you elaborate?

The thread will be in freezer_do_not_count() area, but it is just
waiting for event there, it should not do much damage.

If this is bugfix, should it be cc-ed to stable?

Did you test it with suspend/hibernation? Because I can't really see
how it works.

> +#define __wait_event_freezable(wq, condition)				\
> +	___wait_event(wq, condition, TASK_INTERRUPTIBLE, 0, 0,		\
> +			    schedule(); try_to_freeze())
> +

_Three_ underscores. And two underscore version exists, too,
fortunately it at least has different number of arguments.
									Pavel
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

  reply	other threads:[~2014-11-04 20:12 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-04 16:08 [tip:sched/core] sched/wait: Reimplement wait_event_freezable() tip-bot for Peter Zijlstra
2014-11-04 20:12 ` Pavel Machek [this message]
2014-11-05  8:18   ` Peter Zijlstra
2014-11-13 14:03     ` Pavel Machek

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=20141104201203.GA15071@amd \
    --to=pavel@ucw.cz \
    --cc=hpa@zytor.com \
    --cc=len.brown@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=peterz@infradead.org \
    --cc=rjw@rjwysocki.net \
    --cc=tglx@linutronix.de \
    --cc=torvalds@linux-foundation.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