From patchwork Fri Mar 18 19:05: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: 8623321 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 AC43FC0553 for ; Fri, 18 Mar 2016 19:07:38 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id D981020204 for ; Fri, 18 Mar 2016 19:07:37 +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 EFFBA20123 for ; Fri, 18 Mar 2016 19:07:36 +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 1agzi3-0000T8-3n; Fri, 18 Mar 2016 19:05:19 +0000 Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1agzi1-0000S5-NR for xen-devel@lists.xenproject.org; Fri, 18 Mar 2016 19:05:17 +0000 Received: from [85.158.137.68] by server-8.bemta-3.messagelabs.com id 29/95-04050-D615CE65; Fri, 18 Mar 2016 19:05:17 +0000 X-Env-Sender: raistlin.df@gmail.com X-Msg-Ref: server-10.tower-31.messagelabs.com!1458327916!30126363!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: 8.11; banners=-,-,- X-VirusChecked: Checked Received: (qmail 13655 invoked from network); 18 Mar 2016 19:05:16 -0000 Received: from mail-wm0-f67.google.com (HELO mail-wm0-f67.google.com) (74.125.82.67) by server-10.tower-31.messagelabs.com with AES128-GCM-SHA256 encrypted SMTP; 18 Mar 2016 19:05:16 -0000 Received: by mail-wm0-f67.google.com with SMTP id x188so8149428wmg.0 for ; Fri, 18 Mar 2016 12:05:16 -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=6QyK0K8+ydw5Kil6vRGeqf8VjgYQNyIfZ0rel01Tru4=; b=KdZVlyCeGrMV9NO/etuOZrFBE9ZoOFk5cWGPb4uQ6lxJmWBt9cnm/c2/YxKz31ik70 a4GgZgVOiX3XOTfXZ4f0goZEcrVZJu2R8Ygi18vfQtkHRrs3irzkqkt9kjig2KZN87yc GsVjouJ2CARj1Mtz9kHcX1hx+B/J0rhD08plxEvlO22Q0OXQXoEHEJy8YL4kPSyr1T3D rMTNJLIPxXSsl5FuBaJS1RIV6Y3cTD7Nkg806YLzlnMoryhS1G5upnz+JuWgpyw7YPUW ZSCZ3duoEmzXrEFbkbWht986BMh4qe791ZkqwU52ExL+seB1MJ4clvAZ14rur5Fe6w60 zGGg== 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=6QyK0K8+ydw5Kil6vRGeqf8VjgYQNyIfZ0rel01Tru4=; b=feoXKy3bZ30HB5TWFPxqpJNvO2IZ/5Ansnk4AE2XbWzc5w+JOuQLC3OUzX9u+Q8mcw LKRdkuNuB/sth16yT7tJU8uafrjyXk3upsJQZSgOUP3QT3qe3Vz9U9QUDAZfh3JPRE/A bSir83sqzjfGzIGwhQlOYnTIwPFWUWCowuwRl+oUZiexGOulczVSip57bb4AZ2+vKv3K 3PFHd7WokYNQrd4Q2+WTDPd7o5DcjUKgzffRrX9tceziwGogjRd3XlylAYVf1G69kBfu FlHE6SH/RkvVt2dvfevBjUM/PODEYUtDW0qh1KRvQAtDLLZvFh98TPJNKhUAJjAZqiXD gusw== X-Gm-Message-State: AD7BkJJiFQNsITsfXzghESHhx0oFaFRoTR4YqPOOJv9WVXdc4WtWOExZMWm6Cf/c8oie1A== X-Received: by 10.194.5.36 with SMTP id p4mr17850331wjp.167.1458327916209; Fri, 18 Mar 2016 12:05:16 -0700 (PDT) Received: from Solace.station (net-2-35-170-8.cust.vodafonedsl.it. [2.35.170.8]) by smtp.gmail.com with ESMTPSA id l135sm566310wmb.13.2016.03.18.12.05.14 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 18 Mar 2016 12:05:15 -0700 (PDT) From: Dario Faggioli To: xen-devel@lists.xenproject.org Date: Fri, 18 Mar 2016 20:05:13 +0100 Message-ID: <20160318190513.8117.45583.stgit@Solace.station> In-Reply-To: <20160318185524.8117.74837.stgit@Solace.station> References: <20160318185524.8117.74837.stgit@Solace.station> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 Cc: George Dunlap , Juergen Gross , Jan Beulich , Uma Sharma Subject: [Xen-devel] [PATCH 10/16] xen: sched: improve credit2 bootparams' scope, placement and signedness 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 From: Uma Sharma and, while we are adjusting signedness of opt_load_window_shift, make also prv->load_window_shift unsigned, as approapriate. Signed-off-by: Uma Sharma Signed-off-by: Dario Faggioli Reviewed-by: Juergen Gross Acked-by: George Dunlap --- Cc: George Dunlap Cc: Juergen Gross Cc: Jan Beulich --- Patch has changed, so I'm not sticking any tag v1 received (namely, Juergen's Reviewed-by:). --- Changes from v1: * improve signedness as well, as requested during review. --- xen/common/sched_credit2.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/xen/common/sched_credit2.c b/xen/common/sched_credit2.c index 64fb028..2fd4175 100644 --- a/xen/common/sched_credit2.c +++ b/xen/common/sched_credit2.c @@ -162,7 +162,7 @@ #define CSFLAG_runq_migrate_request (1<<__CSFLAG_runq_migrate_request) -int opt_migrate_resist=500; +static unsigned int __read_mostly opt_migrate_resist = 500; integer_param("sched_credit2_migrate_resist", opt_migrate_resist); /* @@ -185,12 +185,12 @@ integer_param("sched_credit2_migrate_resist", opt_migrate_resist); * to a load of 1. */ #define LOADAVG_GRANULARITY_SHIFT (10) -int opt_load_window_shift=18; +static unsigned int __read_mostly opt_load_window_shift = 18; #define LOADAVG_WINDOW_SHIFT_MIN 4 integer_param("credit2_load_window_shift", opt_load_window_shift); -int opt_underload_balance_tolerance=0; +static int __read_mostly opt_underload_balance_tolerance = 0; integer_param("credit2_balance_under", opt_underload_balance_tolerance); -int opt_overload_balance_tolerance=-3; +static int __read_mostly opt_overload_balance_tolerance = -3; integer_param("credit2_balance_over", opt_overload_balance_tolerance); /* @@ -227,7 +227,7 @@ struct csched2_private { cpumask_t active_queues; /* Queues which may have active cpus */ struct csched2_runqueue_data rqd[NR_CPUS]; - int load_window_shift; + unsigned int load_window_shift; }; /*