public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: "Dilger, Andreas" <andreas.dilger@intel.com>,
	James Simmons <jsimmons@infradead.org>,
	"devel@driverdev.osuosl.org" <devel@driverdev.osuosl.org>,
	"Drokin, Oleg" <oleg.drokin@intel.com>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Lustre Development List <lustre-devel@lists.lustre.org>
Subject: Re: [lustre-devel] [PATCH] staging: lustre: ldlm: pl_recalc time handling is wrong
Date: Thu, 10 Nov 2016 16:01:18 +0100	[thread overview]
Message-ID: <5149342.oboLeYkUcs@wuerfel> (raw)
In-Reply-To: <20161110122108.GA7580@kroah.com>

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.

	Arnd

  reply	other threads:[~2016-11-10 15:02 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-08  2:47 [PATCH] staging: lustre: ldlm: pl_recalc time handling is wrong James Simmons
2016-11-09  3:50 ` [lustre-devel] " Dilger, Andreas
2016-11-09 16:00   ` Arnd Bergmann
2016-11-10 12:21     ` Greg Kroah-Hartman
2016-11-10 15:01       ` Arnd Bergmann [this message]
2016-11-10 17:53         ` James Simmons
2016-11-10 15:21       ` [PATCH v2] " Arnd Bergmann
2016-11-10 18:59         ` James Simmons

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=5149342.oboLeYkUcs@wuerfel \
    --to=arnd@arndb.de \
    --cc=andreas.dilger@intel.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=jsimmons@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lustre-devel@lists.lustre.org \
    --cc=oleg.drokin@intel.com \
    /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: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox