Re: [PATCH] PM / suspend: Count suspend-to-idle loop as sleep time

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

 



Hi Rafael,

I love your patch! Yet something to improve:

[auto build test ERROR on linus/master]
[also build test ERROR on v4.19-rc4 next-20180921]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Rafael-J-Wysocki/PM-suspend-Count-suspend-to-idle-loop-as-sleep-time/20180914-170606
config: i386-randconfig-a1-09200857 (attached as .config)
compiler: gcc-4.9 (Debian 4.9.4-2) 4.9.4
reproduce:
        # save the attached .config to linux build tree
        make ARCH=i386 

All errors (new ones prefixed by >>):

   kernel/power/suspend.o: In function `s2idle_loop':
>> kernel/power/suspend.c:168: undefined reference to `timekeeping_inject_sleeptime64'

vim +168 kernel/power/suspend.c

   109	
   110	static void s2idle_loop(void)
   111	{
   112		ktime_t start, delta;
   113	
   114		pm_pr_dbg("suspend-to-idle\n");
   115	
   116		start = ktime_get();
   117	
   118		for (;;) {
   119			int error;
   120	
   121			dpm_noirq_begin();
   122	
   123			/*
   124			 * Suspend-to-idle equals
   125			 * frozen processes + suspended devices + idle processors.
   126			 * Thus s2idle_enter() should be called right after
   127			 * all devices have been suspended.
   128			 *
   129			 * Wakeups during the noirq suspend of devices may be spurious,
   130			 * so prevent them from terminating the loop right away.
   131			 */
   132			error = dpm_noirq_suspend_devices(PMSG_SUSPEND);
   133			if (!error)
   134				s2idle_enter();
   135			else if (error == -EBUSY && pm_wakeup_pending())
   136				error = 0;
   137	
   138			if (!error && s2idle_ops && s2idle_ops->wake)
   139				s2idle_ops->wake();
   140	
   141			dpm_noirq_resume_devices(PMSG_RESUME);
   142	
   143			dpm_noirq_end();
   144	
   145			if (error)
   146				break;
   147	
   148			if (s2idle_ops && s2idle_ops->sync)
   149				s2idle_ops->sync();
   150	
   151			if (pm_wakeup_pending())
   152				break;
   153	
   154			pm_wakeup_clear(false);
   155		}
   156	
   157		/*
   158		 * If the monotonic clock difference between the start of the loop and
   159		 * this point is too large, user space may get confused about whether or
   160		 * not the system has been suspended and tasks may get killed by
   161		 * watchdogs etc., so count the loop as "sleep time" to compensate for
   162		 * that.
   163		 */
   164		delta = ktime_sub(ktime_get(), start);
   165		if (ktime_to_ns(delta) > 0) {
   166			struct timespec64 timespec64_delta = ktime_to_timespec64(delta);
   167	
 > 168			timekeeping_inject_sleeptime64(&timespec64_delta);
   169		}
   170	
   171		pm_pr_dbg("resume from suspend-to-idle\n");
   172	}
   173	

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

Attachment: .config.gz
Description: application/gzip


[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux