Re: [PATCHv4 03/28] posix-clocks: add another call back to return clock time in ktime_t

From
Dmitry Safonov <hidden>
Date
2019-06-14 14:39:20
Also in
lkml
Reply to
Thomas Gleixner, 2019-06-14
Hi Thomas,

Thanks much for the review,

On 6/14/19 2:32 PM, Thomas Gleixner wrote:
Dmitry,

On Wed, 12 Jun 2019, Dmitry Safonov wrote:
quoted
From: Andrei Vagin <redacted>

The callsite in common_timer_get() has already a comment:
        /*
         * The timespec64 based conversion is suboptimal, but it's not
         * worth to implement yet another callback.
         */
        kc->clock_get(timr->it_clock, &ts64);
        now = timespec64_to_ktime(ts64);

Now we are going to add time namespaces and we need to be able to get:
Please avoid 'we' and try to describe the changes in a neutral technical
form, e.g.:

 The upcoming support for time namespaces requires to have access to:
quoted
* clock value in a task time namespace to return it from the clock_gettime
  syscall.
  - The time in a tasks time namespace for sys_clock_gettime()
quoted
* clock valuse in the root time namespace to use it in
  common_timer_get().
  - The time in the root name space for common_timer_get()
quoted
It looks like another reason why we need a separate callback to return
clock value in ktime_t.
 That adds a valid reason to finally implement a separate callback which
 returns the time in ktime_t format.

Hmm?
Agree, the patch has become bigger than wanted and the message could
have been better in technical sense. Will split, add kernel doc and fix
the commit message(s).

[..]
TBH, this patch is way to big. It changes too many things at once. Can you
please structure it this way:

 1) Rename k_clock::clock_get to k_clock::clock_get_timespec and fix up all
    struct initializers

 2) Rename the clock_get_timespec functions per instance

 3) Add the new callback

 4) Add the new functions per instance and add them to the corresponding
    struct initializers

 5) Use the new callback
Thanks,
          Dima
Thread (47 messages) 47 messages, 4 authors, last reply 2019-07-29
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help