Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753380AbdH2L0r convert rfc822-to-8bit (ORCPT ); Tue, 29 Aug 2017 07:26:47 -0400 Received: from mx1.redhat.com ([209.132.183.28]:49162 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752900AbdH2L0o (ORCPT ); Tue, 29 Aug 2017 07:26:44 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 778097EA91 Authentication-Results: ext-mx04.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx04.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=cohuck@redhat.com Date: Tue, 29 Aug 2017 13:26:35 +0200 From: Cornelia Huck To: Radim =?UTF-8?B?S3LEjW3DocWZ?= Cc: linux-kernel@vger.kernel.org, kvm@vger.kernel.org, linux-mips@linux-mips.org, kvm-ppc@vger.kernel.org, linux-s390@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Paolo Bonzini , David Hildenbrand , Christoffer Dall , Marc Zyngier , Christian Borntraeger , James Hogan , Paul Mackerras , Alexander Graf Subject: Re: [PATCH RFC v3 1/9] KVM: s390: optimize detection of started vcpus Message-ID: <20170829132635.23941a6f.cohuck@redhat.com> In-Reply-To: <20170821203530.9266-2-rkrcmar@redhat.com> References: <20170821203530.9266-1-rkrcmar@redhat.com> <20170821203530.9266-2-rkrcmar@redhat.com> Organization: Red Hat GmbH MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Tue, 29 Aug 2017 11:26:43 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 590 Lines: 15 On Mon, 21 Aug 2017 22:35:22 +0200 Radim Krčmář wrote: > We can add a variable instead of scanning all online VCPUs to know how > many are started. We can't trivially tell which VCPU is the last one, > though. > > Suggested-by: Cornelia Huck > Signed-off-by: Radim Krčmář > --- > arch/s390/include/asm/kvm_host.h | 1 + > arch/s390/kvm/kvm-s390.c | 39 +++++++++++++++------------------------ > 2 files changed, 16 insertions(+), 24 deletions(-) Modulo the bug noticed by Christian, I think this looks good.