public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Franck Bui-Huu <vagabon.xyz@gmail.com>
To: "Rafael J. Wysocki" <rjw@sisk.pl>
Cc: linux-pm@lists.linux-foundation.org, lkml <linux-kernel@vger.kernel.org>
Subject: Re: apm emulation driver broken ?
Date: Mon, 19 Nov 2007 14:05:04 +0100	[thread overview]
Message-ID: <47418A00.1000704@gmail.com> (raw)
In-Reply-To: <200711182322.41354.rjw@sisk.pl>

Rafael J. Wysocki wrote:
> On Sunday, 18 of November 2007, Franck Bui-Huu wrote:
>> Rafael J. Wysocki wrote:
>> See the call to wait_even() made by apm_ioctl(). If any processes
>> run this, it will prevent the system to suspend...
> 
> True, but does it actually happen in practice?
> 

when several processes are waiting for a suspend event.

> 
> At this point the second branch of the "if (as->suspend_state == SUSPEND_READ)"
> can be fixed by replacing wait_event_interruptible() with
> wait_event_freezable(), 

yes

> but the fix for the first branch depends on whether or
> not the wait_event() is really necessary.

As I said I don't know. It's probably time to put some people
on CC but don't know who though.

> 
> If it can be replaced with an interruptible sleep, we can use
> wait_event_freezable() in this case too.  Otherwise, the only woking fix would
> be to reintroduce the PF_NOFREEZE in there.

BTW, why not raising PF_NOFREEZE in wait_event(), so thread sleeping
in UNINTERRUPTIBLE state won't prevent suspend to happen ?


		Franck

  reply	other threads:[~2007-11-19 13:05 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-16 15:06 apm emulation driver broken ? Franck Bui-Huu
2007-11-16 16:20 ` Rafael J. Wysocki
2007-11-16 17:29   ` Franck Bui-Huu
2007-11-16 21:20     ` Rafael J. Wysocki
2007-11-17  8:53       ` Franck Bui-Huu
2007-11-17  9:59         ` Rafael J. Wysocki
2007-11-17 11:09           ` Rafael J. Wysocki
2007-11-17 11:57           ` Franck Bui-Huu
2007-11-17 12:46             ` Rafael J. Wysocki
2007-11-18 19:57               ` Franck Bui-Huu
2007-11-18 22:22                 ` Rafael J. Wysocki
2007-11-19 13:05                   ` Franck Bui-Huu [this message]
2007-11-21  1:32                     ` Rafael J. Wysocki

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=47418A00.1000704@gmail.com \
    --to=vagabon.xyz@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@lists.linux-foundation.org \
    --cc=rjw@sisk.pl \
    /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