On Sun, 23 Jan 2005, D. Hugh Redelmeier wrote: > That is correct. > > | Jiffies, from my limited understanding, > | has to do with timing, i.e. a jiffie (jiffy?) is usually measured in ms. > > Measured in HZ, which is 1000 on many architectures. Other common > values are 100 and 1024. Note: this need not be the same as the > userland HZ. > > But what type should be used to hold jiffy counts? Traditionally, LINUX > has used unsigned long: 32 bits on 32-bit machines. This has the > problem that 2 ^ 32 / 1024 seconds is only about 48 days. Long enough > for device timeouts but not for uptime or even process times. > > Since the kernel deals mostly with device timeouts and the like, most > uses of the jiffy count can be satisfied with a counter that wraps > around after 48 days. But it is important that code can deal with > wraparound. For example there are special macros for comparing times > in this form (time_after, time_before, ...). > > To reiterate what I said in my original message: the portable > way to declare a variable to hold jiffies is "unsigned long". This > works in all architectures... for a slightly broken meaning of > "works". In particular, the macros I mentioned will malfunction for > durations longer than 24 days (half of the aforementioned 48 days). > > I imagine that all uses in ivtv would fit within the 24-day > limitation. But I have not read the code.
I haven't read it either, but I do plan to check it esp. with regards to smp, preemption and 4k stacks (it's annoying to run an UP-kernel on an smp machine)... Ok, that's basically how I understood the issue. Thanks for the clarification! Best regards Peter K -- We Can Put an End to Word Attachments: http://www.fsf.org/philosophy/no-word-attachments.html ------------------------------------------------------- This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting Tool for open source databases. Create drag-&-drop reports. Save time by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc. Download a FREE copy at http://www.intelliview.com/go/osdn_nl _______________________________________________ ivtv-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/ivtv-devel
