From patchwork Fri Jul 26 06:25:45 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Faggioli X-Patchwork-Id: 11060357 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id E2105746 for ; Fri, 26 Jul 2019 06:27:17 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D0DE1205A9 for ; Fri, 26 Jul 2019 06:27:17 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C52CC28A4F; Fri, 26 Jul 2019 06:27:17 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 4C1FF205A9 for ; Fri, 26 Jul 2019 06:27:17 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hqtfr-00038C-1A; Fri, 26 Jul 2019 06:25:51 +0000 Received: from us1-rack-dfw2.inumbo.com ([104.130.134.6]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hqtfp-000387-Bp for xen-devel@lists.xenproject.org; Fri, 26 Jul 2019 06:25:49 +0000 X-Inumbo-ID: 34237fc6-af6e-11e9-8980-bc764e045a96 Received: from mx1.suse.de (unknown [195.135.220.15]) by us1-rack-dfw2.inumbo.com (Halon) with ESMTPS id 34237fc6-af6e-11e9-8980-bc764e045a96; Fri, 26 Jul 2019 06:25:47 +0000 (UTC) X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 3B4BEAD31; Fri, 26 Jul 2019 06:25:46 +0000 (UTC) From: Dario Faggioli To: xen-devel@lists.xenproject.org Date: Fri, 26 Jul 2019 08:25:45 +0200 Message-ID: <156412188377.2385.12588508835559819141.stgit@Palanthas> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 Subject: [Xen-devel] [PATCH v2 0/4] xen: sched: support vcpu hotplug/hotunplug in the 'null scheduler' X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: George Dunlap , Stefano Stabellini , Roger Pau Monne Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" X-Virus-Scanned: ClamAV using ClamSMTP Hello, Here it is v2 of my series, about fixing vcpu off- and on-lining in the null scheduler, recently reviewed by George. v1 posting is here: https://lists.xenproject.org/archives/html/xen-devel/2018-08/msg02182.html Message-Id: <153515586506.7407.8908626058440527641.stgit@Palanthas.fritz.box> Basically, it turned out, while discussing this patch: https://lists.xenproject.org/archives/html/xen-devel/2018-01/msg00249.html that the 'null scheduler' does not really support vcpu hotplug/hotunplug. In fact, under some circumnstances, it is possible that the vcpus which are actually offline, get assigned to a pcpu, while one or more online vcpus, may be left in the wait list, and stay there forever. One of these circumnstances was, for instance, when the 'null scheduler' was used within the PV-SHIM, but the problem is more general, and this series fixes it. I think I've addressed Goerge's comments. The most notable change is the merge of what in v1 were patch 2 and patch 3. The resulting patch (i.e., patch 2 of this series) is the only one missing an Ack to go in. The series is also available in git: git://xenbits.xen.org/people/dariof/xen.git rel/sched/null-fix-vcpu-hotplug-v2 Thanks and Regards, Dario --- Dario Faggioli (4): xen: sched: refector code around vcpu_deassign() in null scheduler xen: sched: deal with vCPUs being or becoming online or offline xen: sched: reassign vCPUs to pCPUs, when they come back online xen: sched: refactor the ASSERTs around vcpu_deassing() xen/common/sched_null.c | 210 ++++++++++++++++++++++++++++++++++------------- 1 file changed, 152 insertions(+), 58 deletions(-) -- Dario Faggioli, Ph.D http://about.me/dario.faggioli Virtualization Software Engineer SUSE Labs, SUSE https://www.suse.com/ ------------------------------------------------------------------- <> (Raistlin Majere)