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]
Message-ID: <20120321021229.GB19766@zhy>
Date:	Wed, 21 Mar 2012 10:12:29 +0800
From:	Yong Zhang <yong.zhang0@...il.com>
To:	"Michael J. Wang" <mjwang@...adcom.com>
Cc:	"mingo@...e.hu" <mingo@...e.hu>,
	"peterz@...radead.org" <peterz@...radead.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"rostedt@...dmis.org" <rostedt@...dmis.org>
Subject: Re: [PATCH 1/1] scheduler: minor improvement to
 pick_next_highest_task_rt in linux-3.3

On Wed, Mar 21, 2012 at 01:56:47AM +0000, Michael J. Wang wrote:
> Ah, I see.  Forgot about the length of my comment line.
> 
> Should I reformat my patch and send it again?

It'll be better, and I think Peter/Ingo will happy with it.

Thanks,
Yong

> 
> Thanks,
> Michael
> 
> 
> -----Original Message-----
> From: Yong Zhang [mailto:yong.zhang0@...il.com] 
> Sent: Tuesday, March 20, 2012 6:41 PM
> To: Michael J. Wang
> Cc: mingo@...e.hu; peterz@...radead.org; linux-kernel@...r.kernel.org; rostedt@...dmis.org
> Subject: Re: [PATCH 1/1] scheduler: minor improvement to pick_next_highest_task_rt in linux-3.3
> 
> On Mon, Mar 19, 2012 at 10:26:19PM +0000, Michael J. Wang wrote:
> > From: Michael J Wang <mjwang@...adcom.com>
> > 
> > Avoid extra work by continuing on to the next rt_rq if the highest prio task in current rt_rq is the same priority as our candidate task.
> > 
> > Signed-off-by: Michael J Wang <mjwang@...adcom.com>
> > 
> > ---
> > 
> > More detailed explanation:  if next is not NULL, then we have found a candidate task, and its priority is next->prio.  Now we are looking for an even higher priority task in the other rt_rq's.  idx is the highest priority in the current candidate rt_rq.  In the current 3.3 code, if idx is equal to next->prio, we would start scanning the tasks in that rt_rq and replace the current candidate task with a task from that rt_rq.  But the new task would only have a priority that is equal to our previous candidate task, so we have not advanced our goal of finding a higher prio task.  So we should avoid the extra work by continuing on to the next rt_rq if idx is equal to next->prio.
> > 
> 
> You should limit characters of each line to 80 if possible.
> 
> And before sending you patch, linux-source/scripts/checkpatch.pl maybe
> give you some clues whether there is some warning/error. If there are,
> fix them.
> 
> Only for what your patch wants to show:
> Reviewed-by: Yong Zhang <yong.zhang0@...il.com>
> 
> Thanks,
> Yong
> 
> > --- linux-3.3/kernel/sched/rt.c.orig	2012-03-18 16:15:34.000000000 -0700
> > +++ linux-3.3/kernel/sched/rt.c	2012-03-19 14:52:54.585391702 -0700
> > @@ -1403,7 +1403,7 @@ static struct task_struct *pick_next_hig
> >  next_idx:
> >  		if (idx >= MAX_RT_PRIO)
> >  			continue;
> > -		if (next && next->prio < idx)
> > +		if (next && next->prio <= idx)
> >  			continue;
> >  		list_for_each_entry(rt_se, array->queue + idx, run_list) {
> >  			struct task_struct *p;
> > 
> > 
> > 
> > 
> > 
> > 
> > --
> > 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/
> 
> -- 
> Only stand for myself
> 
> N�����r��y���b�X��ǧv�^�)޺{.n�+����{����zX��.��ܨ}���Ơz�&j:+v���.����zZ+��+zf���h���~����i���z�.�w���?����&�)ߢ.f��^jǫy�m��@A�a���.0��h�.�i

-- 
Only stand for myself
--
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