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


Groups > linux.kernel > #1312385 > unrolled thread

Re: [PATCH 2/4] sched: Consolidate nohz CPU load update code

Started byFrederic Weisbecker <fweisbec@gmail.com>
First post2016-01-19 17:50 +0100
Last post2016-01-20 02:50 +0100
Articles 2 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [PATCH 2/4] sched: Consolidate nohz CPU load update code Frederic Weisbecker <fweisbec@gmail.com> - 2016-01-19 17:50 +0100
    Re: [PATCH 2/4] sched: Consolidate nohz CPU load update code Byungchul Park <byungchul.park@lge.com> - 2016-01-20 02:50 +0100

#1312385 — Re: [PATCH 2/4] sched: Consolidate nohz CPU load update code

FromFrederic Weisbecker <fweisbec@gmail.com>
Date2016-01-19 17:50 +0100
SubjectRe: [PATCH 2/4] sched: Consolidate nohz CPU load update code
Message-ID<qSHDJ-23d-35@gated-at.bofh.it>
On Thu, Jan 14, 2016 at 02:18:40PM +0900, Byungchul Park wrote:
> On Wed, Jan 13, 2016 at 05:01:29PM +0100, Frederic Weisbecker wrote:
> >  #ifdef CONFIG_NO_HZ_COMMON
> > +static void __update_cpu_load_nohz(struct rq *this_rq,
> > +				   unsigned long curr_jiffies,
> 
> Do we need to pass current jiffies as a function parameter?

I guess we don't, I just wasn't much sure of the possible overhead of READ_ONCE()

> 
> > +				   unsigned long load,
> > +				   int active)
> > +{
> > +	unsigned long pending_updates;
> > +
> > +	pending_updates = curr_jiffies - this_rq->last_load_update_tick;
> > +	if (pending_updates) {
> > +		this_rq->last_load_update_tick = curr_jiffies;
> > +		/*
> > +		 * In the regular NOHZ case, we were idle, this means load 0.
> > +		 * In the NOHZ_FULL case, we were non-idle, we should consider
> > +		 * its weighted load.
> > +		 */
> > +		__update_cpu_load(this_rq, load, pending_updates, active);
> > +	}
> > +}

[toc] | [next] | [standalone]


#1312790

FromByungchul Park <byungchul.park@lge.com>
Date2016-01-20 02:50 +0100
Message-ID<qSQ4m-7Np-123@gated-at.bofh.it>
In reply to#1312385
On Tue, Jan 19, 2016 at 05:49:34PM +0100, Frederic Weisbecker wrote:
> On Thu, Jan 14, 2016 at 02:18:40PM +0900, Byungchul Park wrote:
> > On Wed, Jan 13, 2016 at 05:01:29PM +0100, Frederic Weisbecker wrote:
> > >  #ifdef CONFIG_NO_HZ_COMMON
> > > +static void __update_cpu_load_nohz(struct rq *this_rq,
> > > +				   unsigned long curr_jiffies,
> > 
> > Do we need to pass current jiffies as a function parameter?
> 
> I guess we don't, I just wasn't much sure of the possible overhead of READ_ONCE()

Ah. But I think passing an additional argument can cause additional
overhead, too, e.g. additional store/load on stack. But I am not sure
which one is larger, and it depends on architecture and abi.

> 
> > 
> > > +				   unsigned long load,
> > > +				   int active)
> > > +{
> > > +	unsigned long pending_updates;
> > > +
> > > +	pending_updates = curr_jiffies - this_rq->last_load_update_tick;
> > > +	if (pending_updates) {
> > > +		this_rq->last_load_update_tick = curr_jiffies;
> > > +		/*
> > > +		 * In the regular NOHZ case, we were idle, this means load 0.
> > > +		 * In the NOHZ_FULL case, we were non-idle, we should consider
> > > +		 * its weighted load.
> > > +		 */
> > > +		__update_cpu_load(this_rq, load, pending_updates, active);
> > > +	}
> > > +}

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web