This message generated a parse failure. Raw output follows here. Please use 'back' to navigate. From devnull@lkml.org Thu Apr 25 09:18:40 2024 Delivery-date: Wed, 21 Mar 2012 03:12:51 +0100 Received: from mail-qa0-f53.google.com ([209.85.216.53]:61685 "EHLO mail-qa0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751074Ab2CUCMk convert rfc822-to-8bit (ORCPT ); Tue, 20 Mar 2012 22:12:40 Received: by qadc11 with SMTP id c11so391571qad.19 for ; Tue, 20 Mar 2012 19:12:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:reply-to:references:mime-version :content-type:content-disposition:content-transfer-encoding :in-reply-to:user-agent; Received: by 10.229.135.141 with SMTP id n13mr922588qct.25.1332295959701; Tue, 20 Mar 2012 19:12:39 -0700 (PDT) Received: from localhost ([61.148.56.138]) by mx.google.com with ESMTPS id n8sm495481qan.12.2012.03.20.19.12.34 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 20 Mar 2012 19:12:38 -0700 (PDT) Date: Wed, 21 Mar 2012 10:12:29 +0800 From: Yong Zhang To: "Michael J. Wang" Cc: "mingo@elte.hu" , "peterz@infradead.org" , "linux-kernel@vger.kernel.org" , "rostedt@goodmis.org" Subject: Re: [PATCH 1/1] scheduler: minor improvement to pick_next_highest_task_rt in linux-3.3 Message-Id: <20120321021229.GB19766@zhy> Reply-To: Yong Zhang References: <2EF88150C0EF2C43A218742ED384C1BC0FC83D6B@IRVEXCHMB08.corp.ad.broadcom.com> <20120321014050.GA19766@zhy> <2EF88150C0EF2C43A218742ED384C1BC0FC84327@IRVEXCHMB08.corp.ad.broadcom.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: QUOTED-PRINTABLE In-Reply-To: <2EF88150C0EF2C43A218742ED384C1BC0FC84327@IRVEXCHMB08.corp.ad.broadcom.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-Id: X-Mailing-List: linux-kernel@vger.kernel.org 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. >=20 > Should I reformat my patch and send it again? It'll be better, and I think Peter/Ingo will happy with it. Thanks, Yong >=20 > Thanks, > Michael >=20 >=20 > -----Original Message----- > From: Yong Zhang [mailto:yong.zhang0@gmail.com]=20 > Sent: Tuesday, March 20, 2012 6:41 PM > To: Michael J. Wang > Cc: mingo@elte.hu; peterz@infradead.org; linux-kernel@vger.kernel.org= ; rostedt@goodmis.org > Subject: Re: [PATCH 1/1] scheduler: minor improvement to pick_next_hi= ghest_task_rt in linux-3.3 >=20 > On Mon, Mar 19, 2012 at 10:26:19PM +0000, Michael J. Wang wrote: > > From: Michael J Wang > >=20 > > 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. > >=20 > > Signed-off-by: Michael J Wang > >=20 > > --- > >=20 > > 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 high= est 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 tha= t 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 t= o the next rt_rq if idx is equal to next->prio. > >=20 >=20 > You should limit characters of each line to 80 if possible. >=20 > And before sending you patch, linux-source/scripts/checkpatch.pl mayb= e > give you some clues whether there is some warning/error. If there are= , > fix them. >=20 > Only for what your patch wants to show: > Reviewed-by: Yong Zhang >=20 > Thanks, > Yong >=20 > > --- 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 >=3D MAX_RT_PRIO) > > continue; > > - if (next && next->prio < idx) > > + if (next && next->prio <=3D idx) > > continue; > > list_for_each_entry(rt_se, array->queue + idx, run_list) { > > struct task_struct *p; > >=20 > >=20 > >=20 > >=20 > >=20 > >=20 > > -- > > To unsubscribe from this list: send the line "unsubscribe linux-ker= nel" in > > the body of a message to majordomo@vger.kernel.org > > More majordomo info at http://vger.kernel.org/majordomo-info.html > > Please read the FAQ at http://www.tux.org/lkml/ >=20 > --=20 > Only stand for myself >=20 > N=EF=BF=BD=EF=BF=BD=EF=BF=BD=EF=BF=BD=EF=BF=BDr=EF=BF=BD=EF=BF=BDy=EF= =BF=BD=EF=BF=BD=EF=BF=BDb=EF=BF=BDX=EF=BF=BD=EF=BF=BD=C7=A7v=EF=BF=BD^=EF= =BF=BD)=DE=BA{.n=EF=BF=BD+=EF=BF=BD=EF=BF=BD=EF=BF=BD=EF=BF=BD{=EF=BF=BD= =EF=BF=BD=EF=BF=BD=EF=BF=BDzX=EF=BF=BD=EF=BF=BD=17=EF=BF=BD=EF=BF=BD=DC= =A8}=EF=BF=BD=EF=BF=BD=EF=BF=BD=C6=A0z=EF=BF=BD&j:+v=EF=BF=BD=EF=BF=BD=EF= =BF=BD=07=EF=BF=BD=EF=BF=BD=EF=BF=BD=EF=BF=BDzZ+=EF=BF=BD=EF=BF=BD+zf=EF= =BF=BD=EF=BF=BD=EF=BF=BDh=EF=BF=BD=EF=BF=BD=EF=BF=BD~=EF=BF=BD=EF=BF=BD= =EF=BF=BD=EF=BF=BDi=EF=BF=BD=EF=BF=BD=EF=BF=BDz=EF=BF=BD=1E=EF=BF=BDw=EF= =BF=BD=EF=BF=BD=EF=BF=BD?=EF=BF=BD=EF=BF=BD=EF=BF=BD=EF=BF=BD&=EF=BF=BD= )=DF=A2=1Bf=EF=BF=BD=EF=BF=BD^j=C7=ABy=EF=BF=BDm=EF=BF=BD=EF=BF=BD@A=EF= =BF=BDa=EF=BF=BD=EF=BF=BD=7F=EF=BF=BD=0C0=EF=BF=BD=EF=BF=BDh=EF=BF=BD=0F= =EF=BF=BDi=7F --=20 Only stand for myself -- To unsubscribe from this list: send the line "unsubscribe linux-kernel"= in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/