From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933749AbbBIR2a (ORCPT ); Mon, 9 Feb 2015 12:28:30 -0500 Received: from mx1.redhat.com ([209.132.183.28]:40862 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932308AbbBIR23 (ORCPT ); Mon, 9 Feb 2015 12:28:29 -0500 Date: Mon, 9 Feb 2015 18:28:19 +0100 From: Radim =?utf-8?B?S3LEjW3DocWZ?= To: Paolo Bonzini Cc: linux-kernel@vger.kernel.org, kvm@vger.kernel.org, riel@redhat.com, mtosatti@redhat.com, jan.kiszka@siemens.com, dmatlack@google.com Subject: Re: [PATCH] kvm: add halt_poll_ns module parameter Message-ID: <20150209172818.GB1804@potion.brq.redhat.com> References: <1423226937-11169-1-git-send-email-pbonzini@redhat.com> <20150209152111.GB1693@potion.brq.redhat.com> <54D8DBFE.1070508@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <54D8DBFE.1070508@redhat.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 2015-02-09 17:10+0100, Paolo Bonzini: > On 09/02/2015 16:21, Radim Krčmář wrote: > > 2015-02-06 13:48+0100, Paolo Bonzini: > >> +TRACE_EVENT(kvm_vcpu_wakeup, > >> + TP_PROTO(__u64 ns, bool waited), > > > > (__u64 is preferred here?) > > Preferred to what? To 'u64'. (The header file shouldn't be reachable from user-space.) > >> + } while (single_task_running() && ktime_before(cur, stop)); > > > > After reading a bunch of code, I'm still not sure ... > > - need_resched() can't be true when single_task_running()? > > (I think it could happen -- balancing comes into mind.) > > Single_task_running is per-CPU; for a task to relinquish control to > another task, you first need to have multiple tasks running. In other > words, I think it cannot. Ok, thanks. (I thought that need_resched has more general meaning and couldn't confirm that balancing/CPU-offlining/... just evicts the task without waiting for its schedule().)