From patchwork Tue Feb 16 18:11:13 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Faggioli X-Patchwork-Id: 8330471 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 D6E59C02AA for ; Tue, 16 Feb 2016 18:14:05 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id EB52820295 for ; Tue, 16 Feb 2016 18:14:04 +0000 (UTC) Received: from lists.xen.org (lists.xenproject.org [50.57.142.19]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 5F3FC202B8 for ; Tue, 16 Feb 2016 18:14:03 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xen.org) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1aVk5m-0003Fw-VH; Tue, 16 Feb 2016 18:11:18 +0000 Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1aVk5m-0003Fp-5s for xen-devel@lists.xenproject.org; Tue, 16 Feb 2016 18:11:18 +0000 Received: from [193.109.254.147] by server-12.bemta-14.messagelabs.com id 4D/A0-09834-54663C65; Tue, 16 Feb 2016 18:11:17 +0000 X-Env-Sender: raistlin.df@gmail.com X-Msg-Ref: server-9.tower-27.messagelabs.com!1455646276!24259802!1 X-Originating-IP: [74.125.82.67] X-SpamReason: No, hits=0.2 required=7.0 tests=RCVD_ILLEGAL_IP X-StarScan-Received: X-StarScan-Version: 7.35.1; banners=-,-,- X-VirusChecked: Checked Received: (qmail 20217 invoked from network); 16 Feb 2016 18:11:16 -0000 Received: from mail-wm0-f67.google.com (HELO mail-wm0-f67.google.com) (74.125.82.67) by server-9.tower-27.messagelabs.com with AES128-GCM-SHA256 encrypted SMTP; 16 Feb 2016 18:11:16 -0000 Received: by mail-wm0-f67.google.com with SMTP id g62so21902454wme.2 for ; Tue, 16 Feb 2016 10:11:16 -0800 (PST) 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-type:content-transfer-encoding; bh=tUxeeL0Qp1mQcdwEgM8nQ0W4eS/fnXDweJYbRPVHEwE=; b=wN0GRvnFyEGyUSmkj9TTjEf9yX9aXFBU77CRKMFrEo/gNAgBWwqqHuxmbhpxxg8Mk9 L++NRsJk+xXmJdhZbykhcm2TCyxiDF4U/2kA7e9Pl9XgMx/i8585NkPX+kZlDQJVPH2F f4jH3NqRxOmU8KTiYDNvggiYCm4jJIpvcKCMgWW4O1pR3ky0cjcrn86+XPWb1yJtZiSN BECREyg8fkpfpZIo93+bQNBTl3ndezcmslce39bq9CreplgQdzJiavp2OfU4TaEBmiNF 9MhkvTYsv92l52EwuXPNKQLZN06vYnvswLYpTqzFyB4lWei3Q/+WCA2v0as5rFKXfC0s Kwgw== 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-type :content-transfer-encoding; bh=tUxeeL0Qp1mQcdwEgM8nQ0W4eS/fnXDweJYbRPVHEwE=; b=LMoiB3ccNkwEb18DVwzBD5POqrdiwGhfl/spaCxl8DUvUwScnm7kYEK6elQ1nZMI3o JKenDf0nCxh0B6cSpYTB6ra1cA8if/4EvYPWxlvRz1BMnuD6RIK0jtpuIQwa/UrWsh+J jNqs22ThqN/jqUB5zxrzXo1fZpPE5sGk3Xf/fSyTrd0EGdLvu7cgMEPb64roskULMhmx 9Kcg/iGJZwoTBWQAewwfvzvGXNcPuQNfY9qwjpjlSxaVLdb5CVj4NRVBWnZpIYUCHVmA 9FtMZnS3Vw4Ud1w1VAUBMSMUKmBhOx+UFXseoGPxSUGYIgeUpIXWJcgsimUx4+9IbaRh CH1g== X-Gm-Message-State: AG10YOQpCcnXD+mQm0+fH3MTn6OvWj7UA/MEnNbT9sJXzbLFaSc1J2rBXVM1OkDvDsMUgQ== X-Received: by 10.194.52.8 with SMTP id p8mr23175921wjo.62.1455646275984; Tue, 16 Feb 2016 10:11:15 -0800 (PST) Received: from Solace.station (net-2-35-170-8.cust.vodafonedsl.it. [2.35.170.8]) by smtp.gmail.com with ESMTPSA id v66sm21565602wmb.18.2016.02.16.10.11.14 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 16 Feb 2016 10:11:15 -0800 (PST) From: Dario Faggioli To: xen-devel@lists.xenproject.org Date: Tue, 16 Feb 2016 19:11:13 +0100 Message-ID: <20160216181113.27876.23980.stgit@Solace.station> In-Reply-To: <20160216180550.27876.22680.stgit@Solace.station> References: <20160216180550.27876.22680.stgit@Solace.station> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 Cc: George Dunlap Subject: [Xen-devel] [PATCH v2 01/16] xen: sched: __runq_tickle takes a useless cpu parameter X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org 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 as it is always acts on v->processor of the vcpu that we are tickling. Getting rid of it makes the code easier to understand and better looking. While there, remove a spurious blank line. Signed-off-by: Dario Faggioli Reviewed-by: Konrad Rzeszutek Wilk Acked-by: George Dunlap --- Cc: George Dunlap --- Changes from v1: * fix wording inside the changelog, as suggested during review. --- xen/common/sched_credit.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/xen/common/sched_credit.c b/xen/common/sched_credit.c index 671bbee..5279b92 100644 --- a/xen/common/sched_credit.c +++ b/xen/common/sched_credit.c @@ -360,9 +360,9 @@ boolean_param("tickle_one_idle_cpu", opt_tickle_one_idle); DEFINE_PER_CPU(unsigned int, last_tickle_cpu); -static inline void -__runq_tickle(unsigned int cpu, struct csched_vcpu *new) +static inline void __runq_tickle(struct csched_vcpu *new) { + unsigned int cpu = new->vcpu->processor; struct csched_vcpu * const cur = CSCHED_VCPU(curr_on_cpu(cpu)); struct csched_private *prv = CSCHED_PRIV(per_cpu(scheduler, cpu)); cpumask_t mask, idle_mask, *online; @@ -375,7 +375,6 @@ __runq_tickle(unsigned int cpu, struct csched_vcpu *new) cpumask_and(&idle_mask, prv->idlers, online); idlers_empty = cpumask_empty(&idle_mask); - /* * If the pcpu is idle, or there are no idlers and the new * vcpu is a higher priority than the old vcpu, run it here. @@ -980,11 +979,10 @@ static void csched_vcpu_wake(const struct scheduler *ops, struct vcpu *vc) { struct csched_vcpu * const svc = CSCHED_VCPU(vc); - const unsigned int cpu = vc->processor; BUG_ON( is_idle_vcpu(vc) ); - if ( unlikely(curr_on_cpu(cpu) == vc) ) + if ( unlikely(curr_on_cpu(vc->processor) == vc) ) { SCHED_STAT_CRANK(vcpu_wake_running); return; @@ -1028,7 +1026,7 @@ csched_vcpu_wake(const struct scheduler *ops, struct vcpu *vc) /* Put the VCPU on the runq and tickle CPUs */ __runq_insert(svc); - __runq_tickle(cpu, svc); + __runq_tickle(svc); } static void