Date: Thu, 23 Jul 2015 09:28:39 -0600 From: Ian Lepore <ian@freebsd.org> To: Brandon Allbery <allbery.b@gmail.com> Cc: deco33000@yandex.com, freebsd-stable <freebsd-stable@freebsd.org> Subject: Re: struct timehands: th_generation field Message-ID: <1437665319.1334.519.camel@freebsd.org> In-Reply-To: <CAKFCL4X3N91vgN%2BfjRAyeFFjtbb6_KDrCyDEgoWfuyULrrwwUQ@mail.gmail.com> References: <464641437658995@web16j.yandex.ru> <CAKFCL4Up=cW0mue-XXhnw%2Bu6KfTTSv8T4xzMr4%2B2p=Y4CoJ=rQ@mail.gmail.com> <190031437662308@web29g.yandex.ru> <CAKFCL4X3N91vgN%2BfjRAyeFFjtbb6_KDrCyDEgoWfuyULrrwwUQ@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 2015-07-23 at 10:59 -0400, Brandon Allbery wrote: > On Thu, Jul 23, 2015 at 10:38 AM, <deco33000@yandex.com> wrote: > > > Is the maximum value for th_generation equal to 10 ? > > http://fxr.watson.org/fxr/source/kern/kern_tc.c?v=FREEBSD10#L77 > > > > I don't think those relate to generations. Generations change on every > clock tick; the multiple timehands structs relate to forcibly setting the > time, as opposed to the clock moving forward normally. It does appear serve > a similar purpose, since forcibly setting the time is even more "violent" > (to anything currently reading the clock) than advancing the clock on a > clock tick, since that's when other adjustments including possibly > switching the clock source will be applied. > Ummm, no. The multiple timehands and related generation count are all about time moving forward normally, and doing so without needing mutxes or other locking primitives to obtain the current time. I think you guys need to read this... http://phk.freebsd.dk/pubs/timecounter.pdf Especially the section named "Locking, lack of..." -- Ian
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1437665319.1334.519.camel>