Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1519253

Re: [lustre-devel] [PATCH] staging: lustre: ldlm: pl_recalc time handling is wrong

From James Simmons <jsimmons@infradead.org>
Newsgroups linux.kernel
Subject Re: [lustre-devel] [PATCH] staging: lustre: ldlm: pl_recalc time handling is wrong
Date 2016-11-10 19:10 +0100
Message-ID <sC1NL-TY-1@gated-at.bofh.it> (permalink)
References <sB4NH-3p8-7@gated-at.bofh.it> <sBDBL-18k-29@gated-at.bofh.it> <sBWEq-6aV-63@gated-at.bofh.it> <sBZ9g-7QM-9@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


> On Thursday, November 10, 2016 1:21:08 PM CET Greg Kroah-Hartman wrote:
> > > 
> > > the intention here is simply to have the console log keep the
> > > same numbers as "date +%s" for absolute values. The patch that
> > > James suggested converting everything to ktime_get_seconds()
> > > would result in the same intervals that have always been there
> > > (until I broke it by using time domains inconsistently), but
> > > would mean we could use a u32 type for pl_recalc_time and
> > > pl_recalc_period because that doesn't overflow until 136 years
> > > after booting. (signed time_t overflows 68 years after 1970,
> > > i.e 2038).
> > 
> > So, is this patch correct and should be merged to the tree, or not?
> > 
> 
> No, I think it's wrong in a different way as before. After my
> patch, there were six instances of ktime_get_real_seconds() and
> three instances of ktime_get_seconds(), and that was wrong.
> 
> James's patch converts three of the six instances to
> ktime_get_seconds(), which is equally wrong, just different.
> 
> We can either convert the six ktime_get_real_seconds()
> to ktime_get_seconds(), or convert the four (one was added
> in the meantime) ktime_get_seconds() to ktime_get_real_seconds().
> 
> I'll follow up with a patch for the latter as it is what I
> had originally intended. We can also do what James intended
> instead.

I tought about it and yes ktime_get_real_seconds() is the
right way to go due to the debug message. Especially if the
node happens to reboot. Having a debug message after a reboot
with a smaller time reported in the debug message compared to
a earlier debug message might be confusing to someone.

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH] staging: lustre: ldlm: pl_recalc time handling is wrong James Simmons <jsimmons@infradead.org> - 2016-11-08 04:00 +0100
  Re: [lustre-devel] [PATCH] staging: lustre: ldlm: pl_recalc time         handling is wrong "Dilger, Andreas" <andreas.dilger@intel.com> - 2016-11-09 05:00 +0100
    Re: [lustre-devel] [PATCH] staging: lustre: ldlm: pl_recalc time handling is wrong Arnd Bergmann <arnd@arndb.de> - 2016-11-09 17:10 +0100
      Re: [lustre-devel] [PATCH] staging: lustre: ldlm: pl_recalc time  handling is wrong Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-11-10 13:30 +0100
        Re: [lustre-devel] [PATCH] staging: lustre: ldlm: pl_recalc time handling is wrong Arnd Bergmann <arnd@arndb.de> - 2016-11-10 16:10 +0100
          Re: [lustre-devel] [PATCH] staging: lustre: ldlm: pl_recalc time  handling is wrong James Simmons <jsimmons@infradead.org> - 2016-11-10 19:10 +0100
        [PATCH v2] staging: lustre: ldlm: pl_recalc time handling is wrong Arnd Bergmann <arnd@arndb.de> - 2016-11-10 16:30 +0100
          Re: [PATCH v2] staging: lustre: ldlm: pl_recalc time handling is  wrong James Simmons <jsimmons@infradead.org> - 2016-11-10 20:00 +0100

csiph-web