From: Arnd Bergmann <arnd@arndb.de> To: Linus Walleij <linus.walleij@linaro.org> Cc: Gregor Boirie <gregor.boirie@parrot.com>, Jonathan Cameron <jic23@kernel.org>, linux-iio@vger.kernel.org, Lars-Peter Clausen <lars@metafoo.de>, Randy Dunlap <rdunlap@infradead.org>, Dave Chinner <david@fromorbit.com>, John Stultz <john.stultz@linaro.org>, Thomas Gleixner <tglx@linutronix.de>, Stephen Boyd <sboyd@kernel.org>, Jonathan Corbet <corbet@lwn.net>, Matthew Wilcox <willy@infradead.org>, Mauro Carvalho Chehab <mchehab+samsung@kernel.org>, "open list:DOCUMENTATION" <linux-doc@vger.kernel.org>, "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org> Subject: Re: [PATCH] [v2] Documentation: document ktime_get_*() APIs Date: Fri, 13 Jul 2018 11:16:16 +0200 [thread overview] Message-ID: <CAK8P3a1M78gtJm95eMjrk+N4KdiY3T=dqyksYdNJotd90qV60A@mail.gmail.com> (raw) In-Reply-To: <CACRpkdY5oMG0WknSEnG1khTTm_UKwWwdAbAthA54geGhqgyXpQ@mail.gmail.com> On Fri, Jul 13, 2018 at 9:24 AM, Linus Walleij <linus.walleij@linaro.org> wrote: > On Tue, Jul 10, 2018 at 4:48 PM Arnd Bergmann <arnd@arndb.de> wrote: >> >> Cc: Dave Chinner <david@fromorbit.com> >> Cc: John Stultz <john.stultz@linaro.org> >> Cc: Thomas Gleixner <tglx@linutronix.de> >> Cc: Stephen Boyd <sboyd@kernel.org> >> Cc: Linus Walleij <linus.walleij@linaro.org> >> Tested-by: Randy Dunlap <rdunlap@infradead.org> >> Reviewed-by: Randy Dunlap <rdunlap@infradead.org> >> Signed-off-by: Arnd Bergmann <arnd@arndb.de> >> --- >> v2: minor changes suggested by Randy > > Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Thanks! > This brings into question commit bc2b7dab629a5 > "iio:core: timestamping clock selection support" > that has bothered me for some time. Now that is ABI, but > we might be able to do some recommendations based on the > time base and have a sensible default moving forward. > > As I want to make that clock base parsing similar for GPIO > I first thought it was a good idea to support the same clocks, > but now it seems like a bad idea. > > IIRC you told me to simply hammer down the clock that > makes the most sense. Right, my general recommendation would be to return the result of ktime_get_ns() in a __u64, since this does not suffer from the settimeofday or leap second issues that clock_realtime has, using the coarse clock to save 100 cycles per call probably won't help. Arnd
WARNING: multiple messages have this Message-ID (diff)
From: Arnd Bergmann <arnd@arndb.de> To: Linus Walleij <linus.walleij@linaro.org> Cc: Gregor Boirie <gregor.boirie@parrot.com>, Jonathan Cameron <jic23@kernel.org>, linux-iio@vger.kernel.org, Lars-Peter Clausen <lars@metafoo.de>, Randy Dunlap <rdunlap@infradead.org>, Dave Chinner <david@fromorbit.com>, John Stultz <john.stultz@linaro.org>, Thomas Gleixner <tglx@linutronix.de>, Stephen Boyd <sboyd@kernel.org>, Jonathan Corbet <corbet@lwn.net>, Matthew Wilcox <willy@infradead.org>, Mauro Carvalho Chehab <mchehab+samsung@kernel.org>, "open list:DOCUMENTATION" <linux-doc@vger.kernel.org>, "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org> Subject: Re: [PATCH] [v2] Documentation: document ktime_get_*() APIs Date: Fri, 13 Jul 2018 11:16:16 +0200 [thread overview] Message-ID: <CAK8P3a1M78gtJm95eMjrk+N4KdiY3T=dqyksYdNJotd90qV60A@mail.gmail.com> (raw) In-Reply-To: <CACRpkdY5oMG0WknSEnG1khTTm_UKwWwdAbAthA54geGhqgyXpQ@mail.gmail.com> On Fri, Jul 13, 2018 at 9:24 AM, Linus Walleij <linus.walleij@linaro.org> wrote: > On Tue, Jul 10, 2018 at 4:48 PM Arnd Bergmann <arnd@arndb.de> wrote: >> >> Cc: Dave Chinner <david@fromorbit.com> >> Cc: John Stultz <john.stultz@linaro.org> >> Cc: Thomas Gleixner <tglx@linutronix.de> >> Cc: Stephen Boyd <sboyd@kernel.org> >> Cc: Linus Walleij <linus.walleij@linaro.org> >> Tested-by: Randy Dunlap <rdunlap@infradead.org> >> Reviewed-by: Randy Dunlap <rdunlap@infradead.org> >> Signed-off-by: Arnd Bergmann <arnd@arndb.de> >> --- >> v2: minor changes suggested by Randy > > Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Thanks! > This brings into question commit bc2b7dab629a5 > "iio:core: timestamping clock selection support" > that has bothered me for some time. Now that is ABI, but > we might be able to do some recommendations based on the > time base and have a sensible default moving forward. > > As I want to make that clock base parsing similar for GPIO > I first thought it was a good idea to support the same clocks, > but now it seems like a bad idea. > > IIRC you told me to simply hammer down the clock that > makes the most sense. Right, my general recommendation would be to return the result of ktime_get_ns() in a __u64, since this does not suffer from the settimeofday or leap second issues that clock_realtime has, using the coarse clock to save 100 cycles per call probably won't help. Arnd -- To unsubscribe from this list: send the line "unsubscribe linux-doc" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2018-07-13 9:16 UTC|newest] Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top 2018-07-10 14:46 [PATCH] [v2] Documentation: document ktime_get_*() APIs Arnd Bergmann 2018-07-10 14:46 ` Arnd Bergmann 2018-07-13 7:24 ` Linus Walleij 2018-07-13 7:24 ` Linus Walleij 2018-07-13 9:16 ` Arnd Bergmann [this message] 2018-07-13 9:16 ` Arnd Bergmann 2018-07-15 9:27 ` Jonathan Cameron 2018-07-15 9:27 ` Jonathan Cameron 2018-07-15 10:25 ` Lars-Peter Clausen 2018-07-15 10:25 ` Lars-Peter Clausen 2018-07-23 15:23 ` Jonathan Corbet 2018-07-23 15:23 ` Jonathan Corbet
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to='CAK8P3a1M78gtJm95eMjrk+N4KdiY3T=dqyksYdNJotd90qV60A@mail.gmail.com' \ --to=arnd@arndb.de \ --cc=corbet@lwn.net \ --cc=david@fromorbit.com \ --cc=gregor.boirie@parrot.com \ --cc=jic23@kernel.org \ --cc=john.stultz@linaro.org \ --cc=lars@metafoo.de \ --cc=linus.walleij@linaro.org \ --cc=linux-doc@vger.kernel.org \ --cc=linux-iio@vger.kernel.org \ --cc=linux-kernel@vger.kernel.org \ --cc=mchehab+samsung@kernel.org \ --cc=rdunlap@infradead.org \ --cc=sboyd@kernel.org \ --cc=tglx@linutronix.de \ --cc=willy@infradead.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.