From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rik van Riel Subject: Re: [RFC -v3 PATCH 2/3] sched: add yield_to function Date: Thu, 13 Jan 2011 00:08:58 -0500 Message-ID: <4D2E88EA.3050604@redhat.com> References: <20110103162637.29f23c40@annuminas.surriel.com> <20110103162918.577a9620@annuminas.surriel.com> <1294164289.2016.186.camel@laptop> <1294246647.8369.52.camel@marge.simson.net> <1294247065.2016.267.camel@laptop> <1294378146.8823.27.camel@marge.simson.net> <4D2E6B62.2000802@redhat.com> <1294889169.8089.10.camel@marge.simson.net> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: Peter Zijlstra , kvm@vger.kernel.org, linux-kernel@vger.kernel.org, Avi Kiviti , Srivatsa Vaddagiri , Chris Wright To: Mike Galbraith Return-path: Received: from mx1.redhat.com ([209.132.183.28]:6508 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750912Ab1AMFJU (ORCPT ); Thu, 13 Jan 2011 00:09:20 -0500 In-Reply-To: <1294889169.8089.10.camel@marge.simson.net> Sender: kvm-owner@vger.kernel.org List-ID: On 01/12/2011 10:26 PM, Mike Galbraith wrote: > On Wed, 2011-01-12 at 22:02 -0500, Rik van Riel wrote: > >> Cgroups only makes the matter worse - libvirt places >> each KVM guest into its own cgroup, so a VCPU will >> generally always be alone on its own per-cgroup, per-cpu >> runqueue! That can lead to pulling a VCPU onto our local >> CPU because we think we are alone, when in reality we >> share the CPU with others... > > How can that happen? If the task you're trying to accelerate isn't in > your task group, the whole attempt should be a noop. Nono, all the VCPUs from the same guest are in the same cgroup. However, with 4 VCPUs and 4 physical CPUs, chances are that they're all alone on their own per-cpu, per-cgroup cfs_rq. However, each CPU might have other runnable processes in other cfs_rq sched entities. -- All rights reversed