Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935284AbcKVXLl (ORCPT ); Tue, 22 Nov 2016 18:11:41 -0500 Received: from mx0b-00082601.pphosted.com ([67.231.153.30]:33681 "EHLO mx0a-00082601.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S933900AbcKVXLh (ORCPT ); Tue, 22 Nov 2016 18:11:37 -0500 Date: Tue, 22 Nov 2016 15:11:21 -0800 From: Shaohua Li To: Tejun Heo CC: , , , , Subject: Re: [PATCH V4 03/15] blk-throttle: configure bps/iops limit for cgroup in high limit Message-ID: <20161122231120.GB14628@shli-mbp.local> References: <7a4f1b1b0f67bb02d0caadae808c1a89413c202d.1479161136.git.shli@fb.com> <20161122201643.GB17534@htj.duckdns.org> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <20161122201643.GB17534@htj.duckdns.org> User-Agent: Mutt/1.6.1 (2016-04-27) X-Originating-IP: [2620:10d:c090:200::a:890d] X-ClientProxiedBy: BY2PR06CA0073.namprd06.prod.outlook.com (10.166.106.169) To CY4PR15MB1639.namprd15.prod.outlook.com (10.175.120.23) X-Microsoft-Exchange-Diagnostics: 1;CY4PR15MB1639;2:FSjXc0RcnSwd/2GhjWO1s4OAEMfMKID11ZoCkHOi5H4RU0yznBnT7uD/zI1bHnIfdxkvqckFIqLhFd/hY3tPs9GVuL1CC6YShwk9F18vihnWteTSaMKHMIIH75SN6qEYIsn7SmLjdhsw10AwRjlPml8MqvLsct9VmQGjxSPSsL0=;3:bSOThXbPjIz4QFlVwg+p8JWxGM0Kc7l5kthl1HcYiAVgStrgJTgOQmmvowhNCy9z3hHCYHD2Ch7VgSucOGBAyl9+gjYuevd+LPzG4vnUEoefyngyjhpklJYYaH3r7KS0DxNrSiqID/Jn+rkD9nKOXeVjV0aFEP7hxz64ymlBo4E=;25:olx7cMCoCMD6VOlZ2iwkRRuGkypkjsrOkpYJA83uj7qc70kCm7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VheY+/8wTrcR9jm27f1CfaTmK X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(6060326)(6040307)(6045199)(601004)(2401047)(5005006)(8121501046)(10201501046)(3002001)(6041248)(6061324)(6042181);SRVR:CY4PR15MB1639;BCL:0;PCL:0;RULEID:;SRVR:CY4PR15MB1639; X-Microsoft-Exchange-Diagnostics: 1;CY4PR15MB1639;4:+GS3BlYk1G0FpTumLqv/X2G+EKZ6p02IzSF2r6sOoHVWgz+aSt7Uwv5wIt8y4nok6Jd6lZyP0jmaqvyjyNjeZWMaaChAnwU0nL/wREho9kINmSzjxHmZDGitMrqEmY2MFLugDb8HWJQGSt0z4h8/N59jDR3dkKd9OJxbdhqgIE/Y7tLCquCBhVm/7YK3nOjESbPBDtPyNJ76GRBKWX2RfiVc1hQs5k23dg6Q9MZYLoEyvkfnvxO+maB6NDGaARHzwKnWT+tE50hogTyjLhg5RyOFsJFFb+fd1eMeGHgj/N07FK7sBUCkRdnTE5E5s+VM0pRcnKx5Z4QamHxBDPdxHf9f+KWr3l2+BJAyNSmJiVH6XkhStt9vgx3nd5ReFIPLHgARu1/iZuHvPGiv88sOVbOBhkedkjnglLzluu11fYV2YlpB/fSvIhdl7bupTwVOO2ecTzxg6X3qLp3sIBH85Wt59LCPHIpxkym1o4XNAJaUKGHAcAVctfARYn+nI/kg X-Forefront-PRVS: 0134AD334F X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10019020)(4630300001)(6009001)(7916002)(199003)(24454002)(189002)(110136003)(81166006)(2950100002)(81156014)(5660300001)(92566002)(6916009)(38730400001)(7846002)(8676002)(6666003)(9686002)(7736002)(305945005)(47776003)(77096005)(83506001)(97756001)(42186005)(33656002)(106356001)(229853002)(50466002)(98436002)(105586002)(86362001)(54356999)(101416001)(2906002)(68736007)(4326007)(4001350100001)(6116002)(76176999)(23726003)(1076002)(189998001)(46406003)(50986999)(97736004)(18370500001);DIR:OUT;SFP:1102;SCL:1;SRVR:CY4PR15MB1639;H:shli-mbp.local;FPR:;SPF:None;PTR:InfoNoRecords;A:1;MX:1;LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;CY4PR15MB1639;23:SgXD5IrsHXpHfgUkt8/fFpmFfLrNbFG33O3aImhIY?= =?us-ascii?Q?DHZ4nkFt7idEUtkFoLZZJxIzheOsBLK+JSifHCkJZPH1YBvetzE4hiH/CF2X?= =?us-ascii?Q?xxJO+mStmlQGDcKz8Q6QdODPUXdbTL7XQ7h7lPZMhRQHFklEYJGmMwPRd7G6?= =?us-ascii?Q?OrmYBBxNmdIZWByYuhG+XgTuchQFJxJRi9cUPYLskYKX//2BJ3vwo4tKVCOB?= =?us-ascii?Q?oqSjfpjO76ijvQF6iR/ofwKKk1bIIPJHbt+syN39iu/yzlR+YW8aZk1F6Qf4?= =?us-ascii?Q?j0cwoIA9hmGclgXOcyHwYntLNhiGNngnTJFVoBkthFH/EnBzc4reUCRaEoby?= =?us-ascii?Q?x1U3ghBGGkjeP2uq2E7d3X/x/0kgszxmsBa9G1S9BGYCNG40xukC5iV3CAQ7?= =?us-ascii?Q?/Wj4PcoEw/2Mipx+BR+T32hd9Nj2wzXFbaqAmaLVYAQ1egTmUQnILyWNYwO9?= =?us-ascii?Q?rUJyfiXr7Y4zmrJzzftlabTvbVePDBmqGm21pzaQ/K9F/7WNQASPyS4hUvYs?= =?us-ascii?Q?vB6FW096EWwGAx8j1D2amFaJIgm4GLNcieA7t9fkxkXexic3CRgzUJGfW3nD?= =?us-ascii?Q?MzS8GPM4HgIm9IV5NjvJHGRUyOZgD8EBP+CWv3yjHMDfKXVNN+a9heC55B5k?= =?us-ascii?Q?avxPcRNRxAgq1B9MqUnZ8vAWzR7DbZu6HHfop8+bXiCLZQmiVEbrdNSUDw5g?= =?us-ascii?Q?CvxBKft3a38ZB0mpe52WHeJXukwTA9kUu1j0oe9E0cXAhvuWpwml6h2axlwC?= =?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sN7xROOWYMqic58D9B2eypHscHmf9A==;24:DEFw9h9JLjZ5F4duGzECd406FwhIMTEsR1IXJ/anh5FHIRvbm4uk8dkCpw5gQ035kSPqHaSH9dBmJrBenVGj5pD+qEdJj0NZobx+Rg3BVpY= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;CY4PR15MB1639;7:X7WVT2xbjqmeUk42Jb8b7A0RMVAN71HYIxtM7tZbIDWPEmsLdvzHzS8Ch8/7EzTaasxUKZMjdRb93+/R8XxcRznOhn3wfBR9meVKwsE3iziTh+px0qlUiSWovcws6JXD5AncmATZSvfjYBGD85CISWHClYhR84fQrNX5UClQK4navpXPs0Mjt1OFstNh32S7wXInmH4cPsvCYaiM1LHv50AjhJxYv0cfwUNgrleOPXckSK8WByyHImMs0sbhdb8DCfCB/WdrIn248+t4VVI4Ch3TjA2e5mi3avZE/QsZI+RF4D4jj8MIw3P9HkHT549nmvcCv6GwvVL/K5GmSn7bVxVWWINpjPEwQzxbx1/1c7k=;20:FH1VkmdsusBWpZBnfXi/aKFiUhF+TbjPxsZoOYjbGJC6GbbGY1a2Dnb8B0nUszRXunX5vSy3PQxT0UNA7tmDSTCV9KKkY/YeB7peDosoSf+InkgiKSatk+azeAQixTpvUBgcZq5N3bEuVydLzrzFIBBlKQycjT5plRTWfSa/A/Y= X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Nov 2016 23:11:27.0086 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR15MB1639 X-OriginatorOrg: fb.com X-Proofpoint-Spam-Reason: safe X-FB-Internal: Safe X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2016-11-22_11:,, signatures=0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 892 Lines: 19 On Tue, Nov 22, 2016 at 03:16:43PM -0500, Tejun Heo wrote: > On Mon, Nov 14, 2016 at 02:22:10PM -0800, Shaohua Li wrote: > > each queue will have a state machine. Initially queue is in LIMIT_HIGH > > state, which means all cgroups will be throttled according to their high > > limit. After all cgroups with high limit cross the limit, the queue state > > gets upgraded to LIMIT_MAX state. > > cgroups without high limit will use max limit for their high limit. > > Haven't looked at the actual mechanism yet so please correct me if I'm > getting it wrong but at least the above explanation reads incorrect. > Shouldn't max limits applied regardless of whether other cgroups are > above high or not? That's true. Since the max limit is higher than high limit (the interface patch 2 has the check), if cgroup is throttled according to high limit, max limit is respected too. Thanks, Shaohua