From: Andrew Morton <akpm@linux-foundation.org>
To: Johannes Weiner <hannes@cmpxchg.org>
Cc: "Peter Zijlstra" <peterz@infradead.org>,
"Łukasz Siudut" <lsiudut@fb.com>,
linux-kernel@vger.kernel.org, kernel-team@fb.com
Subject: Re: [PATCH] psi: avoid divide-by-zero crash inside virtual machines
Date: Thu, 14 Feb 2019 11:58:55 -0800 [thread overview]
Message-ID: <20190214115855.76869aecd777fbd37d48f45c@linux-foundation.org> (raw)
In-Reply-To: <20190214193157.15788-1-hannes@cmpxchg.org>
On Thu, 14 Feb 2019 14:31:57 -0500 Johannes Weiner <hannes@cmpxchg.org> wrote:
> --- a/kernel/sched/psi.c
> +++ b/kernel/sched/psi.c
> @@ -322,7 +322,7 @@ static bool update_stats(struct psi_group *group)
> expires = group->next_update;
> if (now < expires)
> goto out;
> - if (now - expires > psi_period)
> + if (now - expires >= psi_period)
> missed_periods = div_u64(now - expires, psi_period);
>
> /*
It seems appropriate to use time_after64() and friends in this code.
next prev parent reply other threads:[~2019-02-14 19:59 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-14 19:31 Johannes Weiner
2019-02-14 19:58 ` Andrew Morton [this message]
2019-02-14 20:53 ` Johannes Weiner
2019-02-14 21:22 ` Andrew Morton
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=20190214115855.76869aecd777fbd37d48f45c@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=hannes@cmpxchg.org \
--cc=kernel-team@fb.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lsiudut@fb.com \
--cc=peterz@infradead.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®