From patchwork Fri Feb 5 18:33:34 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Faggioli X-Patchwork-Id: 8238151 Return-Path: X-Original-To: patchwork-xen-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 314259FBF9 for ; Fri, 5 Feb 2016 18:36:19 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 488332039D for ; Fri, 5 Feb 2016 18:36:18 +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 CDD7220389 for ; Fri, 5 Feb 2016 18:36:16 +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 1aRlCO-0003l2-Is; Fri, 05 Feb 2016 18:33:40 +0000 Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1aRlCN-0003kf-Ha for xen-devel@lists.xenproject.org; Fri, 05 Feb 2016 18:33:39 +0000 Received: from [193.109.254.147] by server-5.bemta-14.messagelabs.com id 2F/82-23366-20BE4B65; Fri, 05 Feb 2016 18:33:38 +0000 X-Env-Sender: raistlin.df@gmail.com X-Msg-Ref: server-4.tower-27.messagelabs.com!1454697217!20910609!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 39474 invoked from network); 5 Feb 2016 18:33:37 -0000 Received: from mail-wm0-f67.google.com (HELO mail-wm0-f67.google.com) (74.125.82.67) by server-4.tower-27.messagelabs.com with AES128-GCM-SHA256 encrypted SMTP; 5 Feb 2016 18:33:37 -0000 Received: by mail-wm0-f67.google.com with SMTP id r129so4186642wmr.0 for ; Fri, 05 Feb 2016 10:33:37 -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=N2KEUfrdUwfdGa+2sYNlZXpfHQX/b1rmJ9MA7Km0qEw=; b=qOXdRJ1S28VCovrb2UjYb5hQU5ygFwB+qI8TkS/6pGRgbn6cJ5Wi9b64ZzyvghhGpJ K7aGdnPG2jaY/5xL5+L72CuORzZ2k5iq1dUeYU0V8hN08ry2TMGL6qbkRfR/CXCEdzWb CE0t40dHi+5w/gY5L56v/BKyEnIr9AZNLk3iF6PFwNt112o7y88B4TvaNW6yjgqm/Ept gpjnTFvzQZZC9uXOFoJBsJ4B2MoKvaiquwD0Ib/83k6cx4r+VwwTzYtX3X8bk3PhueSa ki57Crpr9LpG6DK72Snh9l6SMVhCLdgp89lvow5JXYXfOEzgfPu9B5s3xSpSpD31s64g xjbw== 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=N2KEUfrdUwfdGa+2sYNlZXpfHQX/b1rmJ9MA7Km0qEw=; b=Ajb1E33FD/5qPEwuQZo5pFGjfOOo1HRyiMHXq85w15S+IIq/SzhRxnTT6obr6Q476e j4rsoddudrONbayLDCh/j3TO6BSsGE/2w4G623saqWP511Z3bTvZ7d224Mb7lSYEy9pD Fjkx25lvRglFsoLwh3ZxGvdlag40A/+shfeLYTrbrOtambebK31TlW4haUI4QCtYWvBE OZJ+waMM5+Tub4pjh7trgBM8GYt72X9p91qBUJUzZ6uwtyfx4hyTgify3y+m+fEdPeAm AQPN6TRKnRFfj14yYNJZjPpKWLw3Nq4kIMEOHR2O9MRnwtDNcTLuh2LyR9Wud26/j8Ib XW9Q== X-Gm-Message-State: AG10YOSSPF2WIYl4aEqXDJUTDmqtdKqP1KMS4XzQntXXwexVHuxy630F5BqjFUZn7Rckzw== X-Received: by 10.28.102.68 with SMTP id a65mr18922028wmc.12.1454697217526; Fri, 05 Feb 2016 10:33:37 -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 ks5sm14571018wjb.13.2016.02.05.10.33.36 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 05 Feb 2016 10:33:36 -0800 (PST) From: Dario Faggioli To: xen-devel@lists.xenproject.org Date: Fri, 05 Feb 2016 19:33:34 +0100 Message-ID: <20160205183334.4543.50511.stgit@Solace.station> In-Reply-To: <20160205183137.4543.56523.stgit@Solace.station> References: <20160205183137.4543.56523.stgit@Solace.station> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 Cc: George Dunlap Subject: [Xen-devel] [PATCH 01/14] 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 because of which 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 --- Cc: George Dunlap --- 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