Received: by 2002:a05:6a10:d5a5:0:0:0:0 with SMTP id gn37csp4588354pxb; Tue, 5 Oct 2021 06:21:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwa3/rWqm0/t6NIfWe6TPvsi+bWzBoXARWbQ6zWPxMkR45quOxgh0AoIgbzUP0Du6tTWZXj X-Received: by 2002:a17:90b:a17:: with SMTP id gg23mr3766813pjb.18.1633440107812; Tue, 05 Oct 2021 06:21:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633440107; cv=none; d=google.com; s=arc-20160816; b=t/SmD9ltz0lxrBHoGTqWQWsPS+h/BuxMRGQWMslTshtYo0t1uQA5Q957CvqrjipS3b 6dKuPBpUJiHtI5Cvs7Y632/zuVOVYJ/wc61QvyqXGmgHbu9e7eVM1q8oxGe2vQQAVvdl KyCAhZCMLpNT1rSG5PFLyEBc9XOyOvG0BGDK9arEQsLp/DcFAEJPYim15eMSxsDOcxsz uf6B3YTOzalmLAT11C29XPCkpXu4dTAC79kNxTYsnxVcf3jHEhC18znZB+lT5yG+fvMd VSQephP4bh/I9CK//YTS2g+7rliqWcq0JPRH8fRKu+EBzlM0lSsxG8m14eSFI3koN1Rn 9kLQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:subject :from:references:cc:to:content-language:user-agent:mime-version:date :message-id:dkim-signature; bh=JQ1BWJQcsv1HtLKYQ2w1VudWTh4ZhYtEll/PsefK1qk=; b=eKphA6R1DHp9cfoMYz1sS1JNvUi32Z/DMl20mRbwSe8kXWNUlKOFhHlSpYZK4hLNg+ mfYI1bPmZVO5ftEgO7+LBjaZHy0mJ4UQa3hjhFuUmFe/untFX0bNteuGSgl7RFZu8CPp QroiYliVFxVXtGhgF1mS2oGv6nTW5YGvyFeKGbOE55Zf7tpKAd7LW+BV2bZEKhZL05NN lUo4znEhkubCDSf5pIbefss7ei4GQvXeVwkRrXhbn4zfG5uFuXdUgNWqoxy9+rIKJOkV yesJWUU9hsXVFnQ0c0KkWTLDpEVq2UlYchnJkWsSrXbQLcACTyFMvnZ/1Fm84jhNFHC5 jcQA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=TVLAqvxG; 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=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id k64si20940146pgd.171.2021.10.05.06.21.32; Tue, 05 Oct 2021 06:21:47 -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; dkim=pass header.i=@ibm.com header.s=pp1 header.b=TVLAqvxG; 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=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234875AbhJENWH (ORCPT + 99 others); Tue, 5 Oct 2021 09:22:07 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:14466 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S233910AbhJENWG (ORCPT ); Tue, 5 Oct 2021 09:22:06 -0400 Received: from pps.filterd (m0098419.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 195D9GI1009167; Tue, 5 Oct 2021 09:20:15 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=message-id : date : mime-version : to : cc : references : from : subject : in-reply-to : content-type : content-transfer-encoding; s=pp1; bh=JQ1BWJQcsv1HtLKYQ2w1VudWTh4ZhYtEll/PsefK1qk=; b=TVLAqvxGxQWkaZNVCnatO0YaDAm66Nec9PVmcKPZCduxpmBAAnTsl+kdNlCKHJebC2tb G8n8TzynRZX/yY361SrDB2tMiecWMLl9MRcLnhlCEq2jvL8z8C0Jmwl1xzgBMf9tDgzp dEIba2pKxvaWpolGRr8W9dnkr6tmHKVMqvKsXgiDKhwTHkcQfPagHMwVwm+FkooibhIn WLIcNXxWnjhcltbtZ6ReTNCM1LB4Kd98zfEhJmATFQhTTDh4YBOdt0/T/wfyolkmzkUz nfQ9yh8F+bSS4VFTEbf3ma6zwXILCalNw2B55lr4lLjpP9sBFvW/hIXYd2QoWiNjhg9+ vQ== Received: from pps.reinject (localhost [127.0.0.1]) by mx0b-001b2d01.pphosted.com with ESMTP id 3bgpbshuuh-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 05 Oct 2021 09:20:15 -0400 Received: from m0098419.ppops.net (m0098419.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.43/8.16.0.43) with SMTP id 195D9QQH009554; Tue, 5 Oct 2021 09:20:14 -0400 Received: from ppma02fra.de.ibm.com (47.49.7a9f.ip4.static.sl-reverse.com [159.122.73.71]) by mx0b-001b2d01.pphosted.com with ESMTP id 3bgpbshuu2-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 05 Oct 2021 09:20:14 -0400 Received: from pps.filterd (ppma02fra.de.ibm.com [127.0.0.1]) by ppma02fra.de.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 195DCc1n018080; Tue, 5 Oct 2021 13:20:13 GMT Received: from b06cxnps4074.portsmouth.uk.ibm.com (d06relay11.portsmouth.uk.ibm.com [9.149.109.196]) by ppma02fra.de.ibm.com with ESMTP id 3bef29rhev-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 05 Oct 2021 13:20:12 +0000 Received: from d06av23.portsmouth.uk.ibm.com (d06av23.portsmouth.uk.ibm.com [9.149.105.59]) by b06cxnps4074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 195DK6gR64684464 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 5 Oct 2021 13:20:06 GMT Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 959ECA4055; Tue, 5 Oct 2021 13:20:06 +0000 (GMT) Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 1EC4BA405E; Tue, 5 Oct 2021 13:20:06 +0000 (GMT) Received: from [9.145.45.132] (unknown [9.145.45.132]) by d06av23.portsmouth.uk.ibm.com (Postfix) with ESMTP; Tue, 5 Oct 2021 13:20:06 +0000 (GMT) Message-ID: <20f6c2a0-5b27-479a-b4b9-14629bf97693@linux.ibm.com> Date: Tue, 5 Oct 2021 15:20:05 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.1.0 Content-Language: en-US To: Claudio Imbrenda , kvm@vger.kernel.org Cc: cohuck@redhat.com, borntraeger@de.ibm.com, thuth@redhat.com, pasic@linux.ibm.com, david@redhat.com, linux-s390@vger.kernel.org, linux-kernel@vger.kernel.org, Ulrich.Weigand@de.ibm.com References: <20210920132502.36111-1-imbrenda@linux.ibm.com> <20210920132502.36111-4-imbrenda@linux.ibm.com> From: Janosch Frank Subject: Re: [PATCH v5 03/14] KVM: s390: pv: avoid stalls for kvm_s390_pv_init_vm In-Reply-To: <20210920132502.36111-4-imbrenda@linux.ibm.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-TM-AS-GCONF: 00 X-Proofpoint-GUID: Ve01gRvWIZvi7kJ00EmUC64SIj9HUPcZ X-Proofpoint-ORIG-GUID: nxSVCChr0awLj1E4UkEH_W3xLqWFeXnV X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.182.1,Aquarius:18.0.790,Hydra:6.0.391,FMLib:17.0.607.475 definitions=2021-10-05_01,2021-10-04_01,2020-04-07_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 lowpriorityscore=0 mlxlogscore=999 suspectscore=0 malwarescore=0 spamscore=0 impostorscore=0 phishscore=0 bulkscore=0 clxscore=1015 mlxscore=0 priorityscore=1501 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2109230001 definitions=main-2110050078 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 9/20/21 15:24, Claudio Imbrenda wrote: > When the system is heavily overcommitted, kvm_s390_pv_init_vm might > generate stall notifications. > > Fix this by using uv_call_sched instead of just uv_call. This is ok because > we are not holding spinlocks. > > Signed-off-by: Claudio Imbrenda > Fixes: 214d9bbcd3a672 ("s390/mm: provide memory management functions for protected KVM guests") > Reviewed-by: Christian Borntraeger Reviewed-by: Janosch Frank Oops :) > --- > arch/s390/kvm/pv.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/arch/s390/kvm/pv.c b/arch/s390/kvm/pv.c > index 0a854115100b..00d272d134c2 100644 > --- a/arch/s390/kvm/pv.c > +++ b/arch/s390/kvm/pv.c > @@ -195,7 +195,7 @@ int kvm_s390_pv_init_vm(struct kvm *kvm, u16 *rc, u16 *rrc) > uvcb.conf_base_stor_origin = (u64)kvm->arch.pv.stor_base; > uvcb.conf_virt_stor_origin = (u64)kvm->arch.pv.stor_var; > > - cc = uv_call(0, (u64)&uvcb); > + cc = uv_call_sched(0, (u64)&uvcb); > *rc = uvcb.header.rc; > *rrc = uvcb.header.rrc; > KVM_UV_EVENT(kvm, 3, "PROTVIRT CREATE VM: handle %llx len %llx rc %x rrc %x", >