Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp2244847pxa; Mon, 17 Aug 2020 05:07:12 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz/rwTGzZjUR5opfuRYUsso5itH9FhHc3ryKFDuHJYTRqoFgtx2+fUKrr0BdJYfaWSVtHBS X-Received: by 2002:a17:906:a153:: with SMTP id bu19mr14469573ejb.142.1597666031757; Mon, 17 Aug 2020 05:07:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597666031; cv=none; d=google.com; s=arc-20160816; b=mCvibp+KPnycYFEpPrgM5/gkPdiVI8q7SbyKgGpG6RaqHbt5KvFbb3c8ldFfhUtY8Q 91uAQe6hX7FQAn1PE0/Bp9+ee0YkVhqhC6BF9Q2cecAWvzep7wyl967chN+Cj0PeRNEq W/asAqcszpDRgKXs88F/1z+3aZbgUJOwr9aJTdt7tQlnwRjucCtNToOI8dwFuTRc6Vzj Bmn6ZeuxFCXrkdscmKbWQsRT4k2Ia3m1Xm+rp66+gQR+SqbqpOnssCf2IRKyfagHWC+V daA11F/M5I1gIYOT0gI0vuM3D4F/iFTdPyer6SOZEiksAjIwaTsQ6m5wu2IYme5TiwHw mVfg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :message-id:from:cc:references:to:subject; bh=xNAMzHPjPE1n/R/msybb3kt9xkdZtycWH4B6rt0unqE=; b=gwo34vK29reOkBw5K6yKHLhp+TMzr0xTuAPJicZdZg1qSr6ED+PidmPdZuGT3fpLPb S9JG4xjRXEE9cy0W3rfDnGaghXgkeaJ4QFiPWSNRNlTsQbg6SKVqDFOyHUHrU9KDHBso gCbklmcJBVRHomwCCcjPC0erA6MY2CFhpTdAtaAiF4gYVOzYeI4vP08wVJJicafqRO6r xI9WHMNllK5ASDsi3ENIR7uFS+LagHvANHmwegxESGJQ6GgxHAo04inWOhaf8+hmZ2ya 5r5ETG/rD/meaCBoSXjChEHVAu+nrR0f6ulyskajqXhFvLbPrMdx8bLZ5mJ3WN2e6tYR CRmg== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p12si11042007edi.348.2020.08.17.05.06.47; Mon, 17 Aug 2020 05:07:11 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726585AbgHQMD3 (ORCPT + 99 others); Mon, 17 Aug 2020 08:03:29 -0400 Received: from szxga02-in.huawei.com ([45.249.212.188]:3064 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726135AbgHQMDZ (ORCPT ); Mon, 17 Aug 2020 08:03:25 -0400 Received: from dggeme755-chm.china.huawei.com (unknown [172.30.72.55]) by Forcepoint Email with ESMTP id ADE95C4E4428103920DA; Mon, 17 Aug 2020 20:03:21 +0800 (CST) Received: from [10.174.186.8] (10.174.186.8) by dggeme755-chm.china.huawei.com (10.3.19.101) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1913.5; Mon, 17 Aug 2020 20:03:21 +0800 Subject: Re: [RFC][PATCH 0/4] arm64:kvm: teach guest sched that VCPUs can be preempted To: Sergey Senozhatsky , "will@kernel.org" , "maz@kernel.org" References: <20200721041742.197354-1-sergey.senozhatsky@gmail.com> <20200817020310.GA1210848@jagdpanzerIV.localdomain> CC: , "linux-kernel@vger.kernel.org" , , "kvmarm@lists.cs.columbia.edu" , "linux-arm-kernel@lists.infradead.org" , "Wanghaibin (D)" , From: yezengruan Message-ID: Date: Mon, 17 Aug 2020 20:03:09 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:68.0) Gecko/20100101 Thunderbird/68.3.0 MIME-Version: 1.0 In-Reply-To: <20200817020310.GA1210848@jagdpanzerIV.localdomain> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Language: en-US X-Originating-IP: [10.174.186.8] X-ClientProxiedBy: dggeme707-chm.china.huawei.com (10.1.199.103) To dggeme755-chm.china.huawei.com (10.3.19.101) X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2020/8/17 10:03, Sergey Senozhatsky wrote: > On (20/07/21 13:17), Sergey Senozhatsky wrote: >> Hello, >> >> RFC >> >> We noticed that in a number of cases when we wake_up_process() >> on arm64 guest we end up enqueuing that task on a preempted VCPU. The culprit >> appears to be the fact that arm64 guests are not aware of VCPU preemption >> as such, so when sched picks up an idle VCPU it always assumes that VCPU >> is available: >> >> wake_up_process() >> try_to_wake_up() >> select_task_rq_fair() >> available_idle_cpu() >> vcpu_is_preempted() // return false; >> >> Which is, obviously, not the case. >> >> This RFC patch set adds a simple vcpu_is_preempted() implementation so >> that scheduler can make better decisions when it search for the idle >> (v)CPU. > Hi, > > A gentle ping. > > -ss > _______________________________________________ > kvmarm mailing list > kvmarm@lists.cs.columbia.edu > https://lists.cs.columbia.edu/mailman/listinfo/kvmarm > . Hi Sergey, I have a set of patches similar to yours. https://lore.kernel.org/lkml/20191226135833.1052-1-yezengruan@huawei.com/