Re: [PATCH 8/9] PM: suspend_block: Add timeout support.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxx>>> --->> +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@xxxxxxxxxxxxxxxxxxxxxxxxxx> https://lists.linux-foundation.org/mailman/listinfo/linux-pm
_______________________________________________linux-pm mailing listlinux-pm@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx://lists.linux-foundation.org/mailman/listinfo/linux-pm


[Index of Archives]     [Linux ACPI]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [CPU Freq]     [Kernel Newbies]     [Fedora Kernel]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux