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


Groups > linux.kernel > #1583373

[PATCH v2 0/2] sched/loadavg: Fix loadavg spikes and sprinkle {READ,WRITE}_ONCE()

From Matt Fleming <matt@codeblueprint.co.uk>
Newsgroups linux.kernel
Subject [PATCH v2 0/2] sched/loadavg: Fix loadavg spikes and sprinkle {READ,WRITE}_ONCE()
Date 2017-02-17 13:10 +0100
Message-ID <tbPwl-47n-5@gated-at.bofh.it> (permalink)
Organization linux.* mail to news gateway

Show all headers | View raw


Peter, Frederic, 

Here's a v2 of the patch series to fix the loadavg spikes I'm seeing
on a v3.12 based kernel, caused by delaying load sampling if a sample
period was crossed while in NO_HZ idle.

I tried to make the changelog for PATCH 1 clearer this time around by
incorporating suggestions from both of you. Please let me know if it's
still unclear.

PATCH 2 addresses Peter's comment:

  "Irrespective the above though; should we not make this:
   
   +       this_rq->calc_load_update = READ_ONCE(calc_load_update);
   
   because if for some reason we do a double load of calc_load_update and
   see two different values, weird stuff could happen.
   
   And because, on general principle, a READ_ONCE() should be paired with a
   WRITE_ONCE(), that should be done too I suppose."

The v1 of the patch can be found here:

  https://lkml.kernel.org/r/20170208132924.3038-1-matt@codeblueprint.co.uk

Matt Fleming (2):
  sched/loadavg: Avoid loadavg spikes caused by delayed NO_HZ accounting
  sched/loadavg: Use {READ,WRITE}_ONCE() for sample window

 kernel/sched/loadavg.c | 20 ++++++++++++--------
 1 file changed, 12 insertions(+), 8 deletions(-)

-- 
2.10.0

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


Thread

[PATCH v2 0/2] sched/loadavg: Fix loadavg spikes and sprinkle {READ,WRITE}_ONCE() Matt Fleming <matt@codeblueprint.co.uk> - 2017-02-17 13:10 +0100
  [PATCH v2 1/2] sched/loadavg: Avoid loadavg spikes caused by delayed NO_HZ accounting Matt Fleming <matt@codeblueprint.co.uk> - 2017-02-17 13:10 +0100
    Re: [PATCH v2 1/2] sched/loadavg: Avoid loadavg spikes caused by  delayed NO_HZ accounting Frederic Weisbecker <fweisbec@gmail.com> - 2017-02-22 16:20 +0100

csiph-web