All of lore.kernel.org
 help / color / mirror / Atom feed
From: Heiko Carstens <heiko.carstens@de.ibm.com>
To: Thomas Gleixner <tglx@linutronix.de>,
	Stefan Liebler <stli@linux.vnet.ibm.com>,
	Preeti U Murthy <preeti@linux.vnet.ibm.com>,
	Peter Zijlstra <peterz@infradead.org>,
	linux-kernel@vger.kernel.org
Subject: Re: futex timeout not working? (bisected)
Date: Fri, 16 Oct 2015 13:50:03 +0200	[thread overview]
Message-ID: <20151016115003.GC6354@osiris> (raw)
In-Reply-To: <20151016105451.GB6354@osiris>

On Fri, Oct 16, 2015 at 12:54:51PM +0200, Heiko Carstens wrote:
> > > So you are saying this works on x86 and it must be some s390 specific bug?
> > 
> > Looks like. I have no idea why that would break on s390. Did you try
> > to revert the commit on top of tree?
> 
> Reverting the patch isn't easy due to all the dependencies the code has in
> the meantime. However the following code snippet does logically revert the
> patch and it works again:
> 
> diff --git a/kernel/time/timekeeping.c b/kernel/time/timekeeping.c
> index 3739ac6aa473..c97dd1cc9bd5 100644
> --- a/kernel/time/timekeeping.c
> +++ b/kernel/time/timekeeping.c
> @@ -1953,12 +1953,10 @@ ktime_t ktime_get_update_offsets_now(unsigned int *cwsseq, ktime_t *offs_real,
>  		nsecs = timekeeping_get_ns(&tk->tkr_mono);
>  		base = ktime_add_ns(base, nsecs);
>  
> -		if (*cwsseq != tk->clock_was_set_seq) {
> -			*cwsseq = tk->clock_was_set_seq;
> -			*offs_real = tk->offs_real;
> -			*offs_boot = tk->offs_boot;
> -			*offs_tai = tk->offs_tai;
> -		}
> +		*cwsseq = tk->clock_was_set_seq;
> +		*offs_real = tk->offs_real;
> +		*offs_boot = tk->offs_boot;
> +		*offs_tai = tk->offs_tai;

Adding the patch below also "fixes" this. Right now I don't see why this
could architecture specific. Hmm.

diff --git a/kernel/time/timekeeping.c b/kernel/time/timekeeping.c
index 3739ac6aa473..75771b15647c 100644
--- a/kernel/time/timekeeping.c
+++ b/kernel/time/timekeeping.c
@@ -1835,7 +1835,7 @@ void update_wall_time(void)
 	 * memcpy under the tk_core.seq against one before we start
 	 * updating.
 	 */
-	timekeeping_update(tk, clock_set);
+	timekeeping_update(tk, clock_set | TK_CLOCK_WAS_SET);
 	memcpy(real_tk, tk, sizeof(*tk));
 	/* The memcpy must come last. Do not put anything here! */
 	write_seqcount_end(&tk_core.seq);


  reply	other threads:[~2015-10-16 11:50 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-15 10:43 futex timeout not working? (bisected) Heiko Carstens
2015-10-16 10:21 ` Thomas Gleixner
2015-10-16 10:31   ` Heiko Carstens
2015-10-16 10:33     ` Thomas Gleixner
2015-10-16 10:38       ` Heiko Carstens
2015-10-16 10:35     ` Thomas Gleixner
2015-10-16 10:54       ` Heiko Carstens
2015-10-16 11:50         ` Heiko Carstens [this message]
2015-10-16 12:19           ` Thomas Gleixner
2015-10-16 12:45             ` Thomas Gleixner
2015-10-16 13:41               ` Heiko Carstens

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=20151016115003.GC6354@osiris \
    --to=heiko.carstens@de.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=peterz@infradead.org \
    --cc=preeti@linux.vnet.ibm.com \
    --cc=stli@linux.vnet.ibm.com \
    --cc=tglx@linutronix.de \
    /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 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.