From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM01-BN3-obe.outbound.protection.outlook.com (mail-bn3nam01on0076.outbound.protection.outlook.com [104.47.33.76]) by dpdk.org (Postfix) with ESMTP id 27FE41B2FC for ; Wed, 4 Oct 2017 18:05:06 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=CAVIUMNETWORKS.onmicrosoft.com; s=selector1-cavium-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=xh2PeuKkHqnqjrwpRzOOk5gGILSdoO6AYW+uSi3T9cc=; b=OvTxwvUJ6WrnxBJSl7T8aBl8HVsXc7dKhddHI897P0M5YSTDUpSGSseIVFOsWrh/ECdKzWu7ve+8xzEXlytVTR6lr/r4OYGMotsKrUsj5IxvdQG/Dr09xg+GgcpW61ODDkCopFsvhJUTFr29tTpW31ZmImaSHU+QwiFa8rDeCec= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Santosh.Shukla@cavium.com; Received: from [192.168.0.105] (103.76.56.167) by BN6PR07MB3090.namprd07.prod.outlook.com (10.172.105.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.77.7; Wed, 4 Oct 2017 16:05:03 +0000 To: David Hunt , dev@dpdk.org References: <1507108515-186477-1-git-send-email-david.hunt@intel.com> <1507130720-48891-1-git-send-email-david.hunt@intel.com> <1507130720-48891-5-git-send-email-david.hunt@intel.com> Cc: konstantin.ananyev@intel.com, jingjing.wu@intel.com, Nemanja Marjanovic , Rory Sexton From: santosh Message-ID: <75c0cd23-7b05-ca49-5fa5-c8a229f2e0ee@caviumnetworks.com> Date: Wed, 4 Oct 2017 21:34:50 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1 MIME-Version: 1.0 In-Reply-To: <1507130720-48891-5-git-send-email-david.hunt@intel.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-Originating-IP: [103.76.56.167] X-ClientProxiedBy: SG2PR06CA0133.apcprd06.prod.outlook.com (10.175.208.139) To BN6PR07MB3090.namprd07.prod.outlook.com (10.172.105.8) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 85d2c948-f108-4691-3ebc-08d50b41addb X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(2017030254152)(2017052603199)(201703131423075)(201703031133081)(201702281549075); SRVR:BN6PR07MB3090; X-Microsoft-Exchange-Diagnostics: 1; BN6PR07MB3090; 3:k5XTdZAZ/zHW8VyMoKHlRfByYYHySFv+1Y9h1RI7vco4n1yycQJ/SxpdLGjozomU+9mrtM6x6VqaBJT1PqHsv+atpb7eDW36e00wdAqI2FoWc88+gz5OgD+0HA0xZIXz/D9A/D1ffpXb1R1+ICW4QvosNBjPJUqnLteRnQdn6fT2rsbi5FEfUFTCjJ2RMhi/HcFfXkYPZEUo6orRT7v9Oe2ew14I6aL2ETTOYoZyjY7/DZY7Nq1pEW34DNdQxkZ7; 25:zeaaaZDQOi/52Jek8T+KJwJcFKvkkvWD9r723zGYhOGfgu0ZI52n0RvOxttGWQ2sVLWKKsMOS1Bczj8oyfTyN28N0GsIz559Hlywstap3D2XUrCKx9g7jIhABTCDxRG3lAqyeKk95vvvfj36dNihpWJrv5euBAWXx1SWqFI4dhhdlEUhJhqsDAxCf2HNF6nuRi4mJq8C5zBdKfw+SEDxkKvvchSiM3TqTirjNEuKPnsqGBIg2CWOfT8vWMwoIx8s3NcAD1IKgYTmwMuatmyjq8kgmdgA6c0lXDc5NGEkF6cRoOEEiO4Uh8CERApmXuTz6rXX6VN42H/2MjwKamQhRg==; 31:LYGctue1IWPJdvmcSB0I8TKWaXupD7Z6hv90reWLex+6m2n5h4h7d2fM+SQbmg/O9UGVFgDPbZoh08Ov279WvDZAqzfuzOUxk98UtlDtUhF7GoNjBqkcSpuO0dSLXV6kuUCto5k5+rG7kS3Up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d+QdELN8c= X-Exchange-Antispam-Report-Test: UriScan:(228905959029699); X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(2401047)(5005006)(8121501046)(3002001)(10201501046)(100000703101)(100105400095)(93006095)(6041248)(20161123555025)(20161123564025)(20161123558100)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123560025)(20161123562025)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:BN6PR07MB3090; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:BN6PR07MB3090; X-Forefront-PRVS: 0450A714CB X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6009001)(6049001)(376002)(346002)(24454002)(199003)(189002)(377454003)(50466002)(83506001)(7736002)(6116002)(33646002)(6666003)(53936002)(3846002)(81166006)(81156014)(8936002)(31696002)(86152003)(64126003)(5660300001)(65826007)(2950100002)(189998001)(2906002)(8676002)(42882006)(16576012)(68736007)(54906003)(316002)(58126008)(305945005)(23746002)(230700001)(117156002)(76176999)(54356999)(97736004)(229853002)(50986999)(65956001)(72206003)(6486002)(77096006)(478600001)(6246003)(90366009)(101416001)(65806001)(47776003)(36756003)(106356001)(66066001)(25786009)(105586002)(31686004)(4326008)(16526018); DIR:OUT; SFP:1101; SCL:1; SRVR:BN6PR07MB3090; H:[192.168.0.105]; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; Received-SPF: None (protection.outlook.com: cavium.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?Windows-1252?Q?1; BN6PR07MB3090; 23:rQZsSBVKRoYl4N4H0mNrXuPZi0Cdy2a9RrN4G?= =?Windows-1252?Q?U+F0FkqCkZ03SSK9RtjF7T9lkPGe7G/sufY1NJYM18dTf5PEUuiHaJRx?= =?Windows-1252?Q?Fkup3QOKWy0R09ZyI+cCjZzHETSjEYrfIGiDP30PUBS8b3bjF5ZsxucQ?= =?Windows-1252?Q?wQTm6mXfNsmgYqNBM5pQK2veIFavpgfAXI0XR2N5SzWZ0EcE/75ecHSi?= =?Windows-1252?Q?Y5zHolKWHkVfBicIKMcstFkTaP/JQ5CMNwK+BLRDK3MHItqHcZnEsW4+?= =?Windows-1252?Q?mnE33MrejOb7J0BvhpgO5VqM1O37VijMeWXSfj4lLKThmnthizbjrFBn?= =?Windows-1252?Q?07GtgR5kOFJj7lZVfouVUFJp2FfckyG43ZfsqvbeVHTsSNkr2q3DQ4KT?= =?Windows-1252?Q?b9F9xcxtosJQ+RCwKMVSsbxks2v6Iu6kdiGn3cXF0fgQGK9a2FJh/IR2?= =?Windows-1252?Q?J2CnCjIqQCnph++kPqxHtXHf14gtITk+fUZdnz7JMlzdlPceyRE9+CHh?= =?Windows-1252?Q?T0vUm1MQiz0goQKsAZ7/rDVU72At/i1kphauIPaopVkOJrojoASHKqiP?= =?Windows-1252?Q?iYmDxhE1YR1ya7bTluvU1aIooRXapX5iNJa8C4FTfncCYx+7sj8tWwNk?= =?Windows-1252?Q?nkgHcKlobjitcE1ux73pM8YQ+8FRoCY4AVCwNPCnURKSnIeMHvv/ysJK?= =?Windows-1252?Q?dKKuIjbSpjNDTaQqbXd3FepHE/TNFRQ7kqoguFU+8ltVHFeYUNnaH4DL?= =?Windows-1252?Q?8dpuJ4JA8HQL5MKmI+AQeE9q17GzVYYVhQZJud0mBS3ZvTUu2O+vl+DD?= =?Windows-1252?Q?DBtMNlv9T/JtwKk6JESTUJ4RUBn6kcvjyyjR+slli/7VQwJva6p9FAkh?= =?Windows-1252?Q?tuNweBKGRyeNFy3rSjPskWPzsXntO/UysTi/VsyJmT/8ANDNrcMKBAx6?= =?Windows-1252?Q?4bi7tgIPvMkVguUeTmkWDRiaD9zdMDWsHCu1QroFa4oXXNh67Bs4u/ij?= =?Windows-1252?Q?biGPE4YtZntXX9eZqGm80JMMyyCgY1vXTf4VkR/Q902pQ0Hm7OVMMx1X?= =?Windows-1252?Q?GEVxcHmFxi/VgRSlE7VkP1pqOFPC76DM/vzpEUt55OGWS6/+JH7GzmDZ?= =?Windows-1252?Q?hPuirNcAU9cRc4OA478QRJwDMFxQup5wAlY2a8mJvTrgpkNDHzHPijwU?= =?Windows-1252?Q?UMkEVaqJ9U8uDaL+/dqShKUSuBmc91uwo4EMZQmcZp6vHLD24CTAp82W?= =?Windows-1252?Q?HgIOSpng+UJq/21dkoJsATXTUEWiU9E04KWbJw4C81vwa4740vNOwtMC?= =?Windows-1252?Q?qFso9LdAmF0ILfP2lXuzrKqr+mCov08h6PiyfHAeSZqverY2nucttqgr?= =?Windows-1252?Q?ti04+SF092XwcI/KMLghyPC7hUG5EAgeUXuKZAJEL4LeE2ohc3xNru+o?= =?Windows-1252?Q?zywpFOsnEnvjPmheIJQF/a0fA24XZ/MHdEjR3ZI2i4X16CJW3466gpPH?= =?Windows-1252?Q?PzlNt4INUk5oDFX+dwrklP05kAO?= X-Microsoft-Exchange-Diagnostics: 1; BN6PR07MB3090; 6:WqPJNYs9AOu4g2eFdlxkk9tvNHSla8Et3IGHx/jZpNVRQR2CkEiclJwrS2nr2qCXRjuuhEduFmT7eTU/rYqyie244BVM1LXnsaTcrd4AD7GjVHjuwnVTbBLSXoZKOB+2Rsnn7jLXXRt0SM6ScGBYWRzkSdjutUiSmXr8nnu1m031d/VDD/ohRrSwZjqqsSGO03PJzobG33KGwHqTPHO7HKqt7v7vTIXJSscfVWx6hrYJEfzlEpdHIMcyi3sT79ST5X0tXDjvcOnfy1lloKBUn8iyrzgt3btJ+Jwh5b7NIOI9EPeOJH4prgZU2FuwIWa4bSKoSGWT+qYkoRzkLKkx8w==; 5:Zy5qX4qXhXGxJhKhokqWcOtEPru+pdybIX77BatQvuT29Hgr1kOe2DQeIkU3kE2WUKhHZHjGLBRjA2RnxnFyWtOdWtvWjmulFvK4upTRKTvLdABI5CrLEyJg31nCORkIqCJkaoqP/VcIOaA5DbAxLA==; 24:AgfaA3kYzXG/FhdcwXp035k9WDD7vDdyukTeychI0eVG8K2ekkVDWHwPr8x68sSUn6keBJiehorI00slvayLwIPmPQi+jIMncTGKEpqD1EE=; 7:urTArm8qrPt/BnbkYtezRi2nEIZddzVfC2Sm2iFSOcRSSU1wUu0uzzN4x4kuzX75nb+IiQYyvMwTF4D3m8aKdU2BW+075tRniOrI4QFy8LrF6b4wV3Hdt2XrkVBnA/RymWPJbqx0Y32qer+reerm8jPe0ZD/xNlMI7D3sO1+BKJLJoxljV/7Y5cR6R+pyU+kbV+Quk57Gtkh2+q8qbr5TDPSjurreg0ZHVwSoEHejJI= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Oct 2017 16:05:03.6962 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR07MB3090 Subject: Re: [dpdk-dev] [PATCH v5 4/9] examples/vm_power_mgr: add scale to medium freq fn X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Oct 2017 16:05:07 -0000 Hi David, On Wednesday 04 October 2017 08:55 PM, David Hunt wrote: > Signed-off-by: Nemanja Marjanovic > Signed-off-by: Rory Sexton > Signed-off-by: David Hunt > --- > examples/vm_power_manager/power_manager.c | 15 +++++++++++++++ > examples/vm_power_manager/power_manager.h | 13 +++++++++++++ > 2 files changed, 28 insertions(+) > > diff --git a/examples/vm_power_manager/power_manager.c b/examples/vm_power_manager/power_manager.c > index 80705f9..c021c1d 100644 > --- a/examples/vm_power_manager/power_manager.c > +++ b/examples/vm_power_manager/power_manager.c > @@ -286,3 +286,18 @@ power_manager_disable_turbo_core(unsigned int core_num) > POWER_SCALE_CORE(disable_turbo, core_num, ret); > return ret; > } > + > +int > +power_manager_scale_core_med(unsigned int core_num) > +{ > + int ret = 0; > + > + if (core_num >= POWER_MGR_MAX_CPUS) > + return -1; > + if (!(global_enabled_cpus & (1ULL << core_num))) > + return -1; > + rte_spinlock_lock(&global_core_freq_info[core_num].power_sl); > + ret = rte_power_set_freq(core_num, 5); nits: what is 5? also should be enum or macro. Thanks.