Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1285852
| From | Thomas Gleixner <tglx@linutronix.de> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: Ques: [kernel/time/*] Is there any disadvantage in using sleep_range for more than 20ms delay ? |
| Date | 2015-12-07 19:40 +0100 |
| Message-ID | <qD8RA-8dS-19@gated-at.bofh.it> (permalink) |
| References | <qD8eS-7I5-11@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Mon, 7 Dec 2015, Aniroop Mathur wrote: > As in the kernel documentation, it is mentioned to use msleep for > 10ms+ delay, I am confused whether there would be any disadvantage in > using usleep_range for higher delays values because normally drivers > have variety of delays used (2, 10, 20, 40, 100, 500 ms). The real question is how precise must your delay be? If the delay needs to be precise within the min/max sleep time limits, then usleep_range() is probably the way to go. If the delay can be imprecise then using msleep() is the right way because that lets the kernel batch timers for power saving purposes. Thanks, tglx -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Ques: [kernel/time/*] Is there any disadvantage in using sleep_range for more than 20ms delay ? Aniroop Mathur <aniroop.mathur@gmail.com> - 2015-12-07 19:00 +0100
Re: Ques: [kernel/time/*] Is there any disadvantage in using sleep_range for more than 20ms delay ? Thomas Gleixner <tglx@linutronix.de> - 2015-12-07 19:40 +0100
Re: Ques: [kernel/time/*] Is there any disadvantage in using sleep_range for more than 20ms delay ? Aniroop Mathur <aniroop.mathur@gmail.com> - 2015-12-08 03:50 +0100
Re: Ques: [kernel/time/*] Is there any disadvantage in using sleep_range for more than 20ms delay ? Thomas Gleixner <tglx@linutronix.de> - 2015-12-08 11:50 +0100
Re: Ques: [kernel/time/*] Is there any disadvantage in using sleep_range for more than 20ms delay ? Aniroop Mathur <aniroop.mathur@gmail.com> - 2015-12-08 16:40 +0100
Re: Ques: [kernel/time/*] Is there any disadvantage in using sleep_range for more than 20ms delay ? Thomas Gleixner <tglx@linutronix.de> - 2015-12-08 21:50 +0100
Re: Ques: [kernel/time/*] Is there any disadvantage in using sleep_range for more than 20ms delay ? Aniroop Mathur <aniroop.mathur@gmail.com> - 2015-12-09 17:20 +0100
csiph-web