From mboxrd@z Thu Jan 1 00:00:00 1970 From: George Dunlap Subject: Re: [PATCH 03 of 11 v3] xen: sched_credit: when picking, make sure we get an idle one, if any Date: Thu, 7 Feb 2013 17:50:17 +0000 Message-ID: <5113E959.5070608@eu.citrix.com> References: <45d2f5dc459ce84ca7ee.1359716473@Solace> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <45d2f5dc459ce84ca7ee.1359716473@Solace> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Dario Faggioli Cc: Marcus Granado , Dan Magenheimer , Ian Campbell , Anil Madhavapeddy , Andrew Cooper , Juergen Gross , Ian Jackson , "xen-devel@lists.xen.org" , Jan Beulich , Daniel De Graaf , Matt Wilson List-Id: xen-devel@lists.xenproject.org On 01/02/13 11:01, Dario Faggioli wrote: > The pcpu picking algorithm treats two threads of a SMT core the same. > More specifically, if one is idle and the other one is busy, they both > will be assigned a weight of 1. Therefore, when picking begins, if the > first target pcpu is the busy thread (and if there are no other idle > pcpu than its sibling), that will never change. > > This change fixes this by ensuring that, before entering the core of > the picking algorithm, the target pcpu is an idle one (if there is an > idle pcpu at all, of course). > > Signed-off-by: Dario Faggioli Acked-by: George Dunlap