All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michael Trimarchi <trimarchi@gandalf.sssup.it>
To: "Arve Hjønnevåg" <arve@android.com>
Cc: swetland@google.com, linux-pm@lists.linux-foundation.org,
	u.luckas@road.de, ncunningham@crca.org.au
Subject: Re: [PATCH 8/9] PM: suspend_block: Add timeout support.
Date: Fri, 01 May 2009 01:57:28 +0200	[thread overview]
Message-ID: <49FA3AE8.7060501@gandalf.sssup.it> (raw)
In-Reply-To: <49FA39CF.3000007@gandalf.sssup.it>

Michael Trimarchi wrote:
> Hi,
>
> Arve Hjønnevåg wrote:
>
> [snip]
>   
>> Add suspend_block_timeout to block suspend for a limited time.
>>
>> Signed-off-by: Arve Hjønnevåg <arve@android.com>
>> ---
>> +static DEFINE_TIMER(expire_timer, expire_suspend_blockers, 0, 0);
>> +
>> +static void update_suspend(struct suspend_blocker *blocker, long max_timeout)
>> +{
>> +	if (max_timeout > 0) {
>> +		if (debug_mask & DEBUG_EXPIRE)
>> +			pr_info("suspend_blocker: %s, start expire timer, "
>> +				"%ld\n", blocker->name, max_timeout);
>> +		mod_timer(&expire_timer, jiffies + max_timeout);
>> +	} else {
>> +		if (del_timer(&expire_timer))
>> +			if (debug_mask & DEBUG_EXPIRE)
>> +				pr_info("suspend_blocker: %s, stop expire "
>> +					"timer\n", blocker->name);
>> +		if (max_timeout == 0)
>>   
>>     
> So the max_timeout can be negative?
>   

	update_sleep_wait_stats_locked(false);
+	update_suspend(blocker, has_timeout ?
+			max_suspend_blocker_timeout_locked() : -1);
 	spin_unlock_irqrestore(&list_lock, irqflags);

Ok sorry maybe in this call... I write to fast the email :(

>> +
>>     
> Michael
> _______________________________________________
> linux-pm mailing list
> linux-pm@lists.linux-foundation.org
> https://lists.linux-foundation.org/mailman/listinfo/linux-pm

_______________________________________________
linux-pm mailing list
linux-pm@lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/linux-pm

  reply	other threads:[~2009-04-30 23:57 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-30  3:09 [RFC][PATCH 0/9] Suspend block api (version 2) Arve Hjønnevåg
2009-04-30  3:10 ` [PATCH 1/9] PM: Add suspend block api Arve Hjønnevåg
2009-04-30  3:10   ` [PATCH 2/9] PM: suspend_block: Add driver to access suspend blockers from user-space Arve Hjønnevåg
2009-04-30  3:10     ` [PATCH 3/9] PM: suspend_block: Abort task freezing if a suspend_blocker is active Arve Hjønnevåg
2009-04-30  3:10       ` [PATCH 4/9] Input: Block suspend while event queue is not empty Arve Hjønnevåg
2009-04-30  3:10         ` [PATCH 5/9] PM: suspend_block: Switch to list of active and inactive suspend blockers Arve Hjønnevåg
2009-04-30  3:10           ` [PATCH 6/9] PM: suspend_block: Add debugfs file Arve Hjønnevåg
2009-04-30  3:10             ` [PATCH 7/9] PM: suspend_block: Add suspend_blocker stats Arve Hjønnevåg
2009-04-30  3:10               ` [PATCH 8/9] PM: suspend_block: Add timeout support Arve Hjønnevåg
2009-04-30  3:10                 ` [PATCH 9/9] PM: suspend_block: Add timeout support to user-space suspend_blockers Arve Hjønnevåg
2009-04-30 23:52                 ` [PATCH 8/9] PM: suspend_block: Add timeout support Michael Trimarchi
2009-04-30 23:57                   ` Michael Trimarchi [this message]
  -- strict thread matches above, loose matches on Subject: below --
2009-05-06  4:18 [RFC][PATCH 0/9] Suspend block api (version 3) Arve Hjønnevåg
2009-05-06  4:18 ` [PATCH 1/9] PM: Add suspend block api Arve Hjønnevåg
2009-05-06  4:18   ` [PATCH 2/9] PM: suspend_block: Add driver to access suspend blockers from user-space Arve Hjønnevåg
2009-05-06  4:18     ` [PATCH 3/9] PM: suspend_block: Abort task freezing if a suspend_blocker is active Arve Hjønnevåg
2009-05-06  4:18       ` [PATCH 4/9] Input: Block suspend while event queue is not empty Arve Hjønnevåg
2009-05-06  4:18         ` [PATCH 5/9] PM: suspend_block: Switch to list of active and inactive suspend blockers Arve Hjønnevåg
2009-05-06  4:18           ` [PATCH 6/9] PM: suspend_block: Add debugfs file Arve Hjønnevåg
2009-05-06  4:18             ` [PATCH 7/9] PM: suspend_block: Add suspend_blocker stats Arve Hjønnevåg
2009-05-06  4:18               ` [PATCH 8/9] PM: suspend_block: Add timeout support Arve Hjønnevåg

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=49FA3AE8.7060501@gandalf.sssup.it \
    --to=trimarchi@gandalf.sssup.it \
    --cc=arve@android.com \
    --cc=linux-pm@lists.linux-foundation.org \
    --cc=ncunningham@crca.org.au \
    --cc=swetland@google.com \
    --cc=u.luckas@road.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.