From nobody Sat Apr 27 02:57:24 2024 Delivered-To: importer@patchew.org Received-SPF: none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; spf=none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org ARC-Seal: i=1; a=rsa-sha256; t=1573198794; cv=none; d=zoho.com; s=zohoarc; b=FbO2s0zBRxehYfmdJbP9uS3hvgp+tySo4YjdEzRM/lAHlKrb2C7P7KDW2XdMYnYnH/d2YZq8+5uVMkvonsKwkv1zBtojWhP9PLZkgCDGviNWxCn7DJrHHlZxTB0VCRUkkASb7Qnm6ULdXt1DMAX8eQyMYiyuB0pTB0v58TdWPJY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1573198794; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=uoarTFTJXN7QEyeFlOj7FyOebNRnSH9wqzgljIsZ2eE=; b=LK52rI1lx6appss7rlxbtUcWhxa3jB3hHqRcj3fLSr3kzjQ1UV4EVLdhE1V5u8SOpEraP0mTNAQUCfUeOS0xV9r4ncSuuTRemZ528b5wIyWsCQM/87sFusU9DdEUIApWkP+LMpMIuFhmo79BFDzYwMXPzNE4X1rUcm5z4Gmjh8w= ARC-Authentication-Results: i=1; mx.zoho.com; spf=none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1573198794001231.57722544562046; Thu, 7 Nov 2019 23:39:54 -0800 (PST) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1iSyqy-0005g4-1H; Fri, 08 Nov 2019 07:38:44 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1iSyqw-0005fz-DS for xen-devel@lists.xenproject.org; Fri, 08 Nov 2019 07:38:42 +0000 Received: from mx1.suse.de (unknown [195.135.220.15]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id c8375b6c-01fa-11ea-984a-bc764e2007e4; Fri, 08 Nov 2019 07:38:40 +0000 (UTC) Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 6B88FB452; Fri, 8 Nov 2019 07:38:39 +0000 (UTC) X-Inumbo-ID: c8375b6c-01fa-11ea-984a-bc764e2007e4 X-Virus-Scanned: by amavisd-new at test-mx.suse.de From: Juergen Gross To: xen-devel@lists.xenproject.org Date: Fri, 8 Nov 2019 08:38:37 +0100 Message-Id: <20191108073837.5797-1-jgross@suse.com> X-Mailer: git-send-email 2.16.4 Subject: [Xen-devel] [PATCH] xen/sched: remove wrong assertions in csched2_free_pdata() 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: Juergen Gross , George Dunlap , Dario Faggioli MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" The assertions in csched2_free_pdata() are wrong as in case it is called by schedule_cpu_add() after a failure of sched_alloc_udata() the init pdata function won't have been called. So just remove the (wrong) comment and ASSERT() statements. While at it remove the wrong comment in csched2_deinit_pdata(), too. Signed-off-by: Juergen Gross --- xen/common/sched_credit2.c | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/xen/common/sched_credit2.c b/xen/common/sched_credit2.c index af58ee161d..a995ff838f 100644 --- a/xen/common/sched_credit2.c +++ b/xen/common/sched_credit2.c @@ -3914,10 +3914,6 @@ csched2_deinit_pdata(const struct scheduler *ops, vo= id *pcpu, int cpu) =20 write_lock_irqsave(&prv->lock, flags); =20 - /* - * alloc_pdata is not implemented, so pcpu must be NULL. On the other - * hand, init_pdata must have been called for this pCPU. - */ /* * Scheduler specific data for this pCPU must still be there and and be * valid. In fact, if we are here: @@ -3969,18 +3965,6 @@ csched2_deinit_pdata(const struct scheduler *ops, vo= id *pcpu, int cpu) static void csched2_free_pdata(const struct scheduler *ops, void *pcpu, int cpu) { - struct csched2_pcpu *spc =3D pcpu; - - /* - * pcpu either points to a valid struct csched2_pcpu, or is NULL (if - * CPU bringup failed, and we're beeing called from CPU_UP_CANCELLED). - * xfree() does not really mind, but we want to be sure that either - * init_pdata has never been called, or deinit_pdata has been called - * already. - */ - ASSERT(!pcpu || spc->runq_id =3D=3D -1); - ASSERT(!cpumask_test_cpu(cpu, &csched2_priv(ops)->initialized)); - xfree(pcpu); } =20 --=20 2.16.4 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel