From patchwork Fri Jun 17 23:11:45 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Faggioli X-Patchwork-Id: 9185133 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 26D18601C0 for ; Fri, 17 Jun 2016 23:13:35 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 140FC200E7 for ; Fri, 17 Jun 2016 23:13:35 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0613227F07; Fri, 17 Jun 2016 23:13:35 +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=-4.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,T_DKIM_INVALID autolearn=ham version=3.3.1 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.wl.linuxfoundation.org (Postfix) with ESMTPS id A954E200E7 for ; Fri, 17 Jun 2016 23:13:34 +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 1bE2vW-00037n-SC; Fri, 17 Jun 2016 23:11:50 +0000 Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bE2vV-000376-F1 for xen-devel@lists.xenproject.org; Fri, 17 Jun 2016 23:11:49 +0000 Received: from [85.158.139.211] by server-4.bemta-5.messagelabs.com id D6/9F-11823-4B384675; Fri, 17 Jun 2016 23:11:48 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrPIsWRWlGSWpSXmKPExsXiVRvkqLulOSX c4FsLk8X3LZOZHBg9Dn+4whLAGMWamZeUX5HAmvFr5Semgsm8FedmN7M1MH7j6mLk4hASmM4o sWDpJ1YQh0VgDavE1hmvGEEcCYFLrBK/m++xdDFyAjkxEkuvPGSDsCskvs14wApiCwmoSNzcv ooJYtRiJokl29eCJYQF9CSOHP3BDmH7SCyZOJcZxGYTMJB4s2MvWI2IgJLEvVWTwZqZBRoYJS Y83sUEkmARUJV4fKoFrJlXwFvi0qyDYM2cAr4Sq6/sYoPY7CNx8dwjMFtUQE5i5eUWVoh6QYm TM58AXc0BNFRTYv0ufZAws4C8xPa3c5gnMIrMQlI1C6FqFpKqBYzMqxjVi1OLylKLdM31kooy 0zNKchMzc3QNDUz1clOLixPTU3MSk4r1kvNzNzECI4ABCHYwHpvsfIhRkoNJSZT3SmVKuBBfU n5KZUZicUZ8UWlOavEhRg0ODoEJZ+dOZ5JiycvPS1WS4N3QBFQnWJSanlqRlpkDjFGYUgkOHi UR3p0gad7igsTc4sx0iNQpRl2OLVPvrWUSApshJc6rCVIkAFKUUZoHNwKWLi4xykoJ8zICHSj EU5BalJtZgir/ilGcg1FJmHcmyBSezLwSuE2vgI5gAjpCc14yyBEliQgpqQZGg/lGX/IChf8d KVt2on7KgVsl7Jz6cx/vu7/k2d9Tk29Ln38ePKEzuF374KHeT6FznNyehSS8fa/VXmmw0qZ2y oeJu+zMNY91/vNuYt7BbqbLvXe5aphbX/6Fe7XWl69fbD80t+6r7B4ZyySuCL/UMyrnVs82/B xpxvbvts+v8DJ971ML2L/pKbEUZyQaajEXFScCAN6bCNUSAwAA X-Env-Sender: raistlin.df@gmail.com X-Msg-Ref: server-5.tower-206.messagelabs.com!1466205107!45494661!1 X-Originating-IP: [74.125.82.65] X-SpamReason: No, hits=0.0 required=7.0 tests= X-StarScan-Received: X-StarScan-Version: 8.46; banners=-,-,- X-VirusChecked: Checked Received: (qmail 57403 invoked from network); 17 Jun 2016 23:11:48 -0000 Received: from mail-wm0-f65.google.com (HELO mail-wm0-f65.google.com) (74.125.82.65) by server-5.tower-206.messagelabs.com with AES128-GCM-SHA256 encrypted SMTP; 17 Jun 2016 23:11:48 -0000 Received: by mail-wm0-f65.google.com with SMTP id 187so1090017wmz.1 for ; Fri, 17 Jun 2016 16:11:47 -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=mgZAJzMAbfOIB505oR9FTgPtP+l016Y0YH8VjVEiASg=; b=pFy+Iu8x3/BoOe9rFsyUS6dOjw1yFm18Rtwk3VvvOIl1MXzoVVHO2ey5ATlfCSm4Tz 39mPt6GbUdea3KVfuMhLX0ymygZS7J8mL0CzQ9W1r7ny7ILqiOPRoGQCez9dzs7tNj98 BJCV7vQ6X35bQCKTH37rtepaVbX3ntpvH3dqdMiPa/RCjUSsZiwsl1c7rG9Jj3zB/4Zw 62xFbo+vB0vUbYI4ppY+zSGx2fbicyB6VSmIbqTRZTtgeJ7eQZwVMNnfXFz1OyLiJQxc hhNCCJznrQp+UMu17MUVDmQ8Rrile9zbD1K6wnshb+LtzpYYvCxJRXCvMS8AsJ75iFyX tI6Q== 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=mgZAJzMAbfOIB505oR9FTgPtP+l016Y0YH8VjVEiASg=; b=iwHide3b8sFYOzrAXkLrLgiRLUcI7/bHtazy7ZgTMEqFy3OTa6eIbF8B9XoLQhtgGq Nbcc33atpVIOx+dJXak/3xozciqB+ShntgRekyoTS4iMBKR/ZcL4kDJIwaWn+Xi8JHaF +4E6DOlMuMvHA8BuuvXys2aIO0S8Dj/839cTtJVqKbcg7jZILuGfB7/bY2vNibP80ews QRxM2r03oEuxCHdvROm5o/XGXQjyGuzvCFpiRscmls/Njta5EPN4IBiAHKOut6UG+Th6 RfeeCC9JWXXXYlobk0UN4WFkz22XlKiLnnQvbOTx8RKH3Sv2lbUOEGbbJkm3egW1UAtb q72A== X-Gm-Message-State: ALyK8tLdRpKbq15Eqcge947l2srJRU5oIVkXBuEu+zXgP3xxi7TmlpjFGiy6IAEjGqUJyQ== X-Received: by 10.28.46.141 with SMTP id u135mr668204wmu.74.1466205107576; Fri, 17 Jun 2016 16:11:47 -0700 (PDT) Received: from Solace.fritz.box (net-93-65-149-191.cust.vodafonedsl.it. [93.65.149.191]) by smtp.gmail.com with ESMTPSA id vu10sm41340983wjb.27.2016.06.17.16.11.46 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 17 Jun 2016 16:11:47 -0700 (PDT) From: Dario Faggioli To: xen-devel@lists.xenproject.org Date: Sat, 18 Jun 2016 01:11:45 +0200 Message-ID: <146620510554.29766.4276980651226118049.stgit@Solace.fritz.box> In-Reply-To: <146620492155.29766.10321123657058307698.stgit@Solace.fritz.box> References: <146620492155.29766.10321123657058307698.stgit@Solace.fritz.box> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 Cc: Anshul Makkar , George Dunlap , David Vrabel Subject: [Xen-devel] [PATCH 04/19] xen: credit2: kill useless helper function choose_cpu 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-Virus-Scanned: ClamAV using ClamSMTP In fact, it has the same signature of csched2_cpu_pick, which also is its uniqe caller. Signed-off-by: Dario Faggioli Reviewed-by: George Dunlap --- Cc: George Dunlap Cc: Anshul Makkar Cc: David Vrabel --- xen/common/sched_credit2.c | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/xen/common/sched_credit2.c b/xen/common/sched_credit2.c index 5881583..ef199e3 100644 --- a/xen/common/sched_credit2.c +++ b/xen/common/sched_credit2.c @@ -321,7 +321,7 @@ struct csched2_dom { /* * When a hard affinity change occurs, we may not be able to check some * (any!) of the other runqueues, when looking for the best new processor - * for svc (as trylock-s in choose_cpu() can fail). If that happens, we + * for svc (as trylock-s in csched2_cpu_pick() can fail). If that happens, we * pick, in order of decreasing preference: * - svc's current pcpu; * - another pcpu from svc's current runq; @@ -1116,7 +1116,7 @@ csched2_context_saved(const struct scheduler *ops, struct vcpu *vc) #define MAX_LOAD (1ULL<<60); static int -choose_cpu(const struct scheduler *ops, struct vcpu *vc) +csched2_cpu_pick(const struct scheduler *ops, struct vcpu *vc) { struct csched2_private *prv = CSCHED2_PRIV(ops); int i, min_rqi = -1, new_cpu; @@ -1490,16 +1490,6 @@ out: return; } -static int -csched2_cpu_pick(const struct scheduler *ops, struct vcpu *vc) -{ - int new_cpu; - - new_cpu = choose_cpu(ops, vc); - - return new_cpu; -} - static void csched2_vcpu_migrate( const struct scheduler *ops, struct vcpu *vc, unsigned int new_cpu)