lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 23 Feb 2011 08:13:05 +0530
From:	Balbir Singh <balbir@...ux.vnet.ibm.com>
To:	Hidetoshi Seto <seto.hidetoshi@...fujitsu.com>
Cc:	Paul Turner <pjt@...gle.com>, linux-kernel@...r.kernel.org,
	Bharata B Rao <bharata@...ux.vnet.ibm.com>,
	Dhaval Giani <dhaval@...ux.vnet.ibm.com>,
	Vaidyanathan Srinivasan <svaidy@...ux.vnet.ibm.com>,
	Gautham R Shenoy <ego@...ibm.com>,
	Srivatsa Vaddagiri <vatsa@...ibm.com>,
	Kamalesh Babulal <kamalesh@...ux.vnet.ibm.com>,
	Ingo Molnar <mingo@...e.hu>,
	Peter Zijlstra <a.p.zijlstra@...llo.nl>,
	Pavel Emelyanov <xemul@...nvz.org>,
	Herbert Poetzl <herbert@...hfloor.at>,
	Avi Kivity <avi@...hat.com>,
	Chris Friesen <cfriesen@...tel.com>
Subject: Re: [CFS Bandwidth Control v4 6/7] sched: hierarchical task
 accounting for SCHED_OTHER

* Hidetoshi Seto <seto.hidetoshi@...fujitsu.com> [2011-02-23 11:02:40]:

> (2011/02/16 12:18), Paul Turner wrote:
> > @@ -1428,6 +1464,7 @@ enqueue_task_fair(struct rq *rq, struct 
> >  		update_cfs_shares(cfs_rq);
> >  	}
> >  
> > +	account_hier_tasks(&p->se, 1);
> >  	hrtick_update(rq);
> >  }
> >  
> > @@ -1461,6 +1498,7 @@ static void dequeue_task_fair(struct rq 
> >  		update_cfs_shares(cfs_rq);
> >  	}
> >  
> > +	account_hier_tasks(&p->se, -1);
> >  	hrtick_update(rq);
> >  }
> >  
> 
> Why hrtick_update() is need to be delayed after modifying nr_running? 
> You should not impact current hrtick logic without once mentioning.
> 
> > Index: tip/kernel/sched_rt.c
> > ===================================================================
> > --- tip.orig/kernel/sched_rt.c
> > +++ tip/kernel/sched_rt.c
> > @@ -906,6 +906,8 @@ enqueue_task_rt(struct rq *rq, struct ta
> >  
> >  	if (!task_current(rq, p) && p->rt.nr_cpus_allowed > 1)
> >  		enqueue_pushable_task(rq, p);
> > +
> > +	inc_nr_running(rq);
> >  }
> >  
> >  static void dequeue_task_rt(struct rq *rq, struct task_struct *p, int flags)
> > @@ -916,6 +918,8 @@ static void dequeue_task_rt(struct rq *r
> >  	dequeue_rt_entity(rt_se);
> >  
> >  	dequeue_pushable_task(rq, p);
> > +
> > +	dec_nr_running(rq);
> >  }
> >  
> >  /*
> 
> I think similar change for sched_stoptask.c is required.
> 
> In fact I could not boot tip/master with this v4 patchset.
> It reports rcu stall warns without applying following tweak:
> 
> --- a/kernel/sched_stoptask.c
> +++ b/kernel/sched_stoptask.c
> @@ -35,11 +35,13 @@ static struct task_struct *pick_next_task_stop(struct rq *rq
>  static void
>  enqueue_task_stop(struct rq *rq, struct task_struct *p, int flags)
>  {
> +       inc_nr_running(rq);
>  }
> 
>  static void
>  dequeue_task_stop(struct rq *rq, struct task_struct *p, int flags)
>  {
> +       dec_nr_running(rq);
>  }
>

Good catch!

Acked-by: Balbir Singh <balbir@...ux.vnet.ibm.com>
 

-- 
	Three Cheers,
	Balbir
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ