Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp3078812pxv; Mon, 12 Jul 2021 08:48:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwMHcqtduj/+erra1L2dDjLkFurKMogow+W5IJR7cXrIUKPnfmh3jSIdMnS/3dYPG+PzP49 X-Received: by 2002:a92:bf0b:: with SMTP id z11mr39936435ilh.60.1626104939379; Mon, 12 Jul 2021 08:48:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626104939; cv=none; d=google.com; s=arc-20160816; b=ge3rM4DDnDTOS4cC4c/hquOnYwqWynsk5QGLKDzS4tk4n3eXhAFzR358E05NKBSgIQ Yd5c3XNUbMmwrf3CAOGmXpoiK+VNVXaxzHzwCdydk9a183V3PUys1Ziwdc3iPKHppkTN hjyLy2ZRMPnDPxHm09glqANIRRTyzZS1ZEXI2fItocsy+gOh0tMfxliWz6B+mTBeseJV QAq8gtUyPTZWHAYnznqud06pMftiWGxQspywG/Ztn8n5BwBJyfo9rwps06SHeYGQHAoH KK0TiKKlWdIuX9PI00aS/JfvS8kkeIiVEFXkkhZttkTYOCIbfM1cHr52CD9LvqOUlNjb kI3A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:references:in-reply-to :subject:cc:to:from:message-id:date; bh=aH+HCR/UdAcvj8MM1qwfdPEH8xUZ5ppKZI/fRFs2WjQ=; b=VXFg1TAd1xY9t9VexBUvc7Lho8fwOyub4AAc7u/8nEjHltAs/WsFgsf5bK8aftFFqv DoJ50MAzzt/aEA7MBWagWtgoUIhNhxCNKStI8bRHhHDxIznj711SjH1obIIfUaaUQpis pUC3Wi/51gjTqILI1grFc9leJGJTUoVi9+aSIDDBX6MYKu+maANUIB9sGP+HdimNiPad HZULbNJ5av+QO3C7eCdWkzlqFb4VvhKUXuZJyaAYSbMTnGeal4arW7KORW0wIwjArRwl gqnO6Ete4czPFkN/N6LOGR7RdMF3JNlyDOjsmU45156aoQmppMz4vKcNz3Gs4DtnXgHV /5SQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s4si18408796ilv.54.2021.07.12.08.48.46; Mon, 12 Jul 2021 08:48:59 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234208AbhGLPty (ORCPT + 99 others); Mon, 12 Jul 2021 11:49:54 -0400 Received: from mail.kernel.org ([198.145.29.99]:47746 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230364AbhGLPtx (ORCPT ); Mon, 12 Jul 2021 11:49:53 -0400 Received: from disco-boy.misterjones.org (disco-boy.misterjones.org [51.254.78.96]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 41C3C61209; Mon, 12 Jul 2021 15:47:05 +0000 (UTC) Received: from sofa.misterjones.org ([185.219.108.64] helo=wait-a-minute.misterjones.org) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1m2y99-00CrXf-JR; Mon, 12 Jul 2021 16:47:03 +0100 Date: Mon, 12 Jul 2021 16:47:03 +0100 Message-ID: <875yxf356w.wl-maz@kernel.org> From: Marc Zyngier To: Sergey Senozhatsky Cc: Will Deacon , Suleiman Souhlal , Joel Fernandes , linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu, linux-kernel@vger.kernel.org, virtualization@lists.linux-foundation.org Subject: Re: [PATCHv2 3/4] arm64: do not use dummy vcpu_is_preempted() In-Reply-To: <20210709043713.887098-4-senozhatsky@chromium.org> References: <20210709043713.887098-1-senozhatsky@chromium.org> <20210709043713.887098-4-senozhatsky@chromium.org> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/27.1 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII X-SA-Exim-Connect-IP: 185.219.108.64 X-SA-Exim-Rcpt-To: senozhatsky@chromium.org, will@kernel.org, suleiman@google.com, joelaf@google.com, linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu, linux-kernel@vger.kernel.org, virtualization@lists.linux-foundation.org X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 09 Jul 2021 05:37:12 +0100, Sergey Senozhatsky wrote: > > vcpu_is_preempted() now can represent the actual state of > the VCPU, so the scheduler can make better decisions when > it picks the idle CPU to enqueue a task on. > > Signed-off-by: Sergey Senozhatsky > --- > arch/arm64/include/asm/spinlock.h | 18 ++++++++++-------- > 1 file changed, 10 insertions(+), 8 deletions(-) > > diff --git a/arch/arm64/include/asm/spinlock.h b/arch/arm64/include/asm/spinlock.h > index 0525c0b089ed..1d579497e1b8 100644 > --- a/arch/arm64/include/asm/spinlock.h > +++ b/arch/arm64/include/asm/spinlock.h > @@ -7,21 +7,23 @@ > > #include > #include > +#include > > /* See include/linux/spinlock.h */ > #define smp_mb__after_spinlock() smp_mb() > > -/* > - * Changing this will break osq_lock() thanks to the call inside > - * smp_cond_load_relaxed(). > - * > - * See: > - * https://lore.kernel.org/lkml/20200110100612.GC2827@hirez.programming.kicks-ass.net > - */ Why are you deleting this? Please explain your reasoning in the commit message. It seems to me that it still makes complete sense when CONFIG_PARAVIRT is not defined. > #define vcpu_is_preempted vcpu_is_preempted > -static inline bool vcpu_is_preempted(int cpu) > + > +#ifdef CONFIG_PARAVIRT > +static inline bool vcpu_is_preempted(unsigned int cpu) > +{ > + return paravirt_vcpu_is_preempted(cpu); > +} > +#else > +static inline bool vcpu_is_preempted(unsigned int cpu) > { > return false; > } > +#endif /* CONFIG_PARAVIRT */ > > #endif /* __ASM_SPINLOCK_H */ Thanks, M. -- Without deviation from the norm, progress is not possible.