From patchwork Tue May 3 21:46:35 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Faggioli X-Patchwork-Id: 9008621 Return-Path: X-Original-To: patchwork-xen-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id E8C7BBF29F for ; Tue, 3 May 2016 21:49:03 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 274F920373 for ; Tue, 3 May 2016 21:49:03 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 411822026F for ; Tue, 3 May 2016 21:49:02 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1axi9Q-0005MK-E1; Tue, 03 May 2016 21:46:40 +0000 Received: from mail6.bemta6.messagelabs.com ([85.158.143.247]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1axi9O-0005Lw-Kl for xen-devel@lists.xenproject.org; Tue, 03 May 2016 21:46:38 +0000 Received: from [85.158.143.35] by server-3.bemta-6.messagelabs.com id C4/48-07120-E3C19275; Tue, 03 May 2016 21:46:38 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrEIsWRWlGSWpSXmKPExsXiVRvkomsroxl u8P+5ocX3LZOZHBg9Dn+4whLAGMWamZeUX5HAmvGjq4+pYBVnxaH2D8wNjK/Zuxi5OIQEZjBK 7H48gwnEYRFYwyrR/eo6mCMhcIlV4unkA8xdjJxATozEg6MtbBB2pcTfcxNYQWwhARWJm9tXM UGMWsAksXnnPLAGYQE9iSNHf7BD2KkSCy8eZQGx2QQMJN7s2AvWLCKgJHFv1WQmEJtZwFvi47 5GsAUsAqoSK89+B6vnFfCR2PK/CWwOJ5B9s+Mx1GJviTUtx8DqRQXkJFZebmGFqBeUODnzCVA vB9BMTYn1u/QhxstLbH87h3kCo8gsJFWzEKpmIalawMi8ilG9OLWoLLVI11gvqSgzPaMkNzEz R9fQwEwvN7W4ODE9NScxqVgvOT93EyMw/BmAYAdjxz+nQ4ySHExKoryeEprhQnxJ+SmVGYnFG fFFpTmpxYcYZTg4lCR4t0oB5QSLUtNTK9Iyc4CRCJOW4OBREuG9AZLmLS5IzC3OTIdInWLU5d gy9d5aJiGWvPy8VClx3pkgRQIgRRmleXAjYEnhEqOslDAvI9BRQjwFqUW5mSWo8q8YxTkYlYR 5/4JM4cnMK4Hb9AroCCagI7LXq4IcUZKIkJJqYHR+X1Kmt3jH44OGE8/MW2fteGVf6hN/pp+i bpl/l5xaO1t8Q835MlkTy70n60U/HknYuThwwZyCRPc9tasn2am8izqbOctZd2uaP//2W2Erp lk1TTE6Lciw8aVQ0+OgWfnfnLtvnMjhMaqRO/lC3etcQE39jmkFYj0sqQdcz7z2XBBWfjgq6b QSS3FGoqEWc1FxIgBiTraPBQMAAA== X-Env-Sender: raistlin.df@gmail.com X-Msg-Ref: server-3.tower-21.messagelabs.com!1462311997!11925803!1 X-Originating-IP: [74.125.82.68] X-SpamReason: No, hits=0.0 required=7.0 tests=SUBJECT_RANDOMQ X-StarScan-Received: X-StarScan-Version: 8.34; banners=-,-,- X-VirusChecked: Checked Received: (qmail 48522 invoked from network); 3 May 2016 21:46:37 -0000 Received: from mail-wm0-f68.google.com (HELO mail-wm0-f68.google.com) (74.125.82.68) by server-3.tower-21.messagelabs.com with AES128-GCM-SHA256 encrypted SMTP; 3 May 2016 21:46:37 -0000 Received: by mail-wm0-f68.google.com with SMTP id n129so6255622wmn.1 for ; Tue, 03 May 2016 14:46:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:subject:from:to:cc:date:message-id:in-reply-to:references :user-agent:mime-version:content-transfer-encoding; bh=52VCZHjk6d/7g2U8KwDY3oeNEmGt9s/Mz2DzYkjGzTk=; b=MBdkKaYXhCIfWEMqLfzq7yd30NR5Gq22RvPecKbtR+rp3T9x+dKe5sO4fVDq5hjXsL 1JHbE1WbnqybjrCBwKArHF5gNTvmCNWOIff69G33G1tSs+FHu5u8WGjFPFGlGTr9Hi8h HByXk6vdPa4V0Mcng/FCdTbSMKpUHmhyA/5LiQFP8qvcend//3QyCSeA8OxkvK6T79fl pee1lePTvQbVscP0TG+Sy4elqXy2MQffH9QkHmjRm4pzNtXOuqy4UiHlduz5UQYMkglv Z05JA8GhVaXl3Vwa6Ng+yBgIHBvSm3jb0+eQyH95MB2m5cKZef0OtJX1gjXnIXSbuRlC tAwQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:subject:from:to:cc:date:message-id :in-reply-to:references:user-agent:mime-version :content-transfer-encoding; bh=52VCZHjk6d/7g2U8KwDY3oeNEmGt9s/Mz2DzYkjGzTk=; b=ZhM1fTU3/2DWvniS09PnPJHtdaAMQcuLUcC5QZaRwgrZACWpVJ4NERAkr6E8Gj1KtI qgu9pDLkf6Goz7Syd0RPH9XtEqYUeB5n39iYEkKgSSM6UWp9mUzmIWNklkam0KVBN7R6 i42gzqbwHgOyM8nvhoMek5tg9XTtsvVb60ZHkVJHQsh3BLhm2d76QBmHBCBuAXd94hgG PMRuPyhZGlCW7Me+mXWRpHEsuo2UidpX30BpM0Ynm/+T5l9uFAbpbOLNJ4I7DA3dmiP5 aOQrKSPd2ngOwc4ZEtp1mhD4av6hgaUaOiUEPXpxs7+a+DhOWWv4FMtlSf+f/+BSvVeq ZEcg== X-Gm-Message-State: AOPr4FXwgnVWaP69HdQKvDRGQUC5KFizwVj7ljIy5Tx1LVM7DyzMRpB9wIr2ilvJLg3sqA== X-Received: by 10.28.113.67 with SMTP id m64mr28063260wmc.58.1462311997533; Tue, 03 May 2016 14:46:37 -0700 (PDT) Received: from Solace.fritz.box (net-93-65-132-113.cust.vodafonedsl.it. [93.65.132.113]) by smtp.gmail.com with ESMTPSA id lf9sm472529wjc.44.2016.05.03.14.46.36 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 03 May 2016 14:46:36 -0700 (PDT) From: Dario Faggioli To: xen-devel@lists.xenproject.org Date: Tue, 03 May 2016 23:46:35 +0200 Message-ID: <146231199550.25631.15153219462074625034.stgit@Solace.fritz.box> In-Reply-To: <146231184906.25631.6550047090421454264.stgit@Solace.fritz.box> References: <146231184906.25631.6550047090421454264.stgit@Solace.fritz.box> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 Cc: Wei Liu , George Dunlap Subject: [Xen-devel] [PATCH for 4.7 1/4] xen: sched: avoid spuriously re-enabling IRQs in csched2_switch_sched() X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" X-Spam-Status: No, score=-4.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP In fact, interrupts are already disabled when calling the hook from schedule_cpu_switch(), and hence using anything different than just spin_lock() is wrong (and ASSERT()-s in debug builds) or unnecessary. Signed-off-by: Dario Faggioli Reviewed-by: Jan Beulich --- Cc: George Dunlap Cc: Wei Liu --- xen/common/sched_credit2.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xen/common/sched_credit2.c b/xen/common/sched_credit2.c index 46b9279..50c1b9d 100644 --- a/xen/common/sched_credit2.c +++ b/xen/common/sched_credit2.c @@ -2232,7 +2232,7 @@ csched2_switch_sched(struct scheduler *new_ops, unsigned int cpu, * And owning exactly that one (the lock of the old scheduler of this * cpu) is what is necessary to prevent races. */ - spin_lock_irq(&prv->lock); + spin_lock(&prv->lock); idle_vcpu[cpu]->sched_priv = vdata; @@ -2257,7 +2257,7 @@ csched2_switch_sched(struct scheduler *new_ops, unsigned int cpu, smp_mb(); per_cpu(schedule_data, cpu).schedule_lock = &prv->rqd[rqi].lock; - spin_unlock_irq(&prv->lock); + spin_unlock(&prv->lock); } static void