All of lore.kernel.org
 help / color / mirror / Atom feed
From: Heiko Carstens <heiko.carstens@de.ibm.com>
To: linux-s390@vger.kernel.org
Subject: Re: Garbage results for system time from getrusage on 4.11
Date: Fri, 16 Jun 2017 11:09:18 +0000	[thread overview]
Message-ID: <20170616110918.GA19736@osiris> (raw)
In-Reply-To: <87zida3gyf.fsf@oldenburg.str.redhat.com>

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1916 bytes --]

On Wed, Jun 14, 2017 at 02:13:28PM +0200, Florian Weimer wrote:
> Occasionally, when using the ���time��� bash built-in, I get bogus output,
> like this:
> 
> real    0m34.671s
> user    0m24.755s
> sys     .+(.0*-)m,/.222s
> 
> real    0m23.049s
> user    0m15.599s
> sys     153122387m27.677s
> 
> This is not corruption caused by concurrently running programs, it's
> actually what bash prints, as shown by strace:

...

> I see this with kernel-4.11.0-2.fc26.s390x from Fedora.  This could be a
> regression because I have never noticed it before when running the glibc
> testsuite under earlier kernels.

Thank you for the bug report. This should have been fixed with git commit
07a63cbe8bcb ("s390/cputime: fix incorrect system time"). This has only
been recently merged and is marked for stable kernel backports. With that
fix it seems to work.

commit 07a63cbe8bcb6ba72fb989dcab1ec55ec6c36c7e
Author: Martin Schwidefsky <schwidefsky@de.ibm.com>
Date:   Tue May 2 13:36:00 2017 +0200

    s390/cputime: fix incorrect system time

    git commit c5328901aa1db134 "[S390] entry[64].S improvements" removed
    the update of the exit_timer lowcore field from the critical section
    cleanup of the .Lsysc_restore/.Lsysc_done and .Lio_restore/.Lio_done
    blocks. If the PSW is updated by the critical section cleanup to point to
    user space again, the interrupt entry code will do a vtime calculation
    after the cleanup completed with an exit_timer value which has *not* been
    updated. Due to this incorrect system time deltas are calculated.

    If an interrupt occured with an old PSW between .Lsysc_restore/.Lsysc_done
    or .Lio_restore/.Lio_done update __LC_EXIT_TIMER with the system entry
    time of the interrupt.

    Cc: stable@vger.kernel.org # 3.3+
    Tested-by: Christian Borntraeger <borntraeger@de.ibm.com>
    Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>

           reply	other threads:[~2017-06-16 11:09 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <87zida3gyf.fsf@oldenburg.str.redhat.com>]

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=20170616110918.GA19736@osiris \
    --to=heiko.carstens@de.ibm.com \
    --cc=linux-s390@vger.kernel.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: 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.