Repository navigation
Commit 6e317c3
timer: Improve the comment describing schedule_timeout()
When working commit 6dcd5d7, a mistake was noticed by Linus:
schedule_timeout() was called without setting the task state to anything
particular.
It calls the scheduler, but doesn't delay anything, because the task stays
runnable. That happens because sched_submit_work() does nothing for tasks
in TASK_RUNNING state.
That turned out to be the intended behavior. Adding a WARN() is not useful
as the task could be woken up right after setting the state and before
reaching schedule_timeout().
Improve the comment about schedule_timeout() and describe that more
explicitly.
Signed-off-by: Alexander Popov <alex.popov@linux.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lkml.kernel.org/r/20200117225900.16340-1-alex.popov@linux.com1 parent e876f0b commit 6e317c3
1 file changed
Lines changed: 9 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1828 | 1828 | | |
1829 | 1829 | | |
1830 | 1830 | | |
1831 | | - | |
1832 | | - | |
1833 | | - | |
| 1831 | + | |
| 1832 | + | |
| 1833 | + | |
1834 | 1834 | | |
1835 | | - | |
| 1835 | + | |
| 1836 | + | |
| 1837 | + | |
1836 | 1838 | | |
1837 | 1839 | | |
1838 | 1840 | | |
1839 | | - | |
| 1841 | + | |
1840 | 1842 | | |
1841 | 1843 | | |
1842 | 1844 | | |
1843 | 1845 | | |
1844 | 1846 | | |
1845 | | - | |
| 1847 | + | |
1846 | 1848 | | |
1847 | 1849 | | |
1848 | 1850 | | |
1849 | 1851 | | |
1850 | 1852 | | |
1851 | 1853 | | |
1852 | 1854 | | |
1853 | | - | |
| 1855 | + | |
1854 | 1856 | | |
1855 | 1857 | | |
1856 | 1858 | | |
| |||
0 commit comments