Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1699813
| From | Peter Zijlstra <peterz@infradead.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 3/3] mm/sched: memdelay: memory health interface for systems and workloads |
| Date | 2017-07-31 10:40 +0200 |
| Message-ID | <u9ep4-3Xg-3@gated-at.bofh.it> (permalink) |
| References | <u7T3j-7P8-7@gated-at.bofh.it> <u7T3j-7P8-11@gated-at.bofh.it> <u8w4F-7n-1@gated-at.bofh.it> <u8Ykh-230-7@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Sun, Jul 30, 2017 at 11:28:13AM -0400, Johannes Weiner wrote:
> On Sat, Jul 29, 2017 at 11:10:55AM +0200, Peter Zijlstra wrote:
> > On Thu, Jul 27, 2017 at 11:30:10AM -0400, Johannes Weiner wrote:
> > > +static void domain_cpu_update(struct memdelay_domain *md, int cpu,
> > > + int old, int new)
> > > +{
> > > + enum memdelay_domain_state state;
> > > + struct memdelay_domain_cpu *mdc;
> > > + unsigned long now, delta;
> > > + unsigned long flags;
> > > +
> > > + mdc = per_cpu_ptr(md->mdcs, cpu);
> > > + spin_lock_irqsave(&mdc->lock, flags);
> >
> > Afaict this is inside scheduler locks, this cannot be a spinlock. Also,
> > do we really want to add more atomics there?
>
> I think we should be able to get away without an additional lock and
> rely on the rq lock instead. schedule, enqueue, dequeue already hold
> it, memdelay_enter/leave could be added. I need to think about what to
> do with try_to_wake_up in order to get the cpu move accounting inside
> the locked section of ttwu_queue(), but that should be doable too.
So could you start by describing what actual statistics we need? Because
as is the scheduler already does a gazillion stats and why can't re
repurpose some of those?
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 3/3] mm/sched: memdelay: memory health interface for systems and workloads Johannes Weiner <hannes@cmpxchg.org> - 2017-07-27 17:40 +0200
Re: [PATCH 3/3] mm/sched: memdelay: memory health interface for systems and workloads Johannes Weiner <hannes@cmpxchg.org> - 2017-07-27 18:00 +0200
Re: [PATCH 3/3] mm/sched: memdelay: memory health interface for systems and workloads Peter Zijlstra <peterz@infradead.org> - 2017-07-29 11:20 +0200
Re: [PATCH 3/3] mm/sched: memdelay: memory health interface for systems and workloads Johannes Weiner <hannes@cmpxchg.org> - 2017-07-30 17:30 +0200
Re: [PATCH 3/3] mm/sched: memdelay: memory health interface for systems and workloads Peter Zijlstra <peterz@infradead.org> - 2017-07-31 10:40 +0200
Re: [PATCH 3/3] mm/sched: memdelay: memory health interface for systems and workloads Johannes Weiner <hannes@cmpxchg.org> - 2017-07-31 20:50 +0200
Re: [PATCH 3/3] mm/sched: memdelay: memory health interface for systems and workloads Mike Galbraith <efault@gmx.de> - 2017-07-31 22:00 +0200
Re: [PATCH 3/3] mm/sched: memdelay: memory health interface for systems and workloads Johannes Weiner <hannes@cmpxchg.org> - 2017-07-31 22:40 +0200
Re: [PATCH 3/3] mm/sched: memdelay: memory health interface for systems and workloads Mike Galbraith <efault@gmx.de> - 2017-08-01 04:30 +0200
Re: [PATCH 3/3] mm/sched: memdelay: memory health interface for systems and workloads Peter Zijlstra <peterz@infradead.org> - 2017-08-01 10:00 +0200
Re: [PATCH 3/3] mm/sched: memdelay: memory health interface for systems and workloads Johannes Weiner <hannes@cmpxchg.org> - 2017-08-01 14:30 +0200
Re: [PATCH 3/3] mm/sched: memdelay: memory health interface for systems and workloads kbuild test robot <lkp@intel.com> - 2017-07-29 15:40 +0200
csiph-web