Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934384AbcKVXim (ORCPT ); Tue, 22 Nov 2016 18:38:42 -0500 Received: from mx0b-00082601.pphosted.com ([67.231.153.30]:45784 "EHLO mx0a-00082601.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S933981AbcKVXik (ORCPT ); Tue, 22 Nov 2016 18:38:40 -0500 Date: Tue, 22 Nov 2016 15:38:24 -0800 From: Shaohua Li To: Tejun Heo CC: , , , , Subject: Re: [PATCH V4 05/15] blk-throttle: add downgrade logic Message-ID: <20161122233824.GD14628@shli-mbp.local> References: <20161122212121.GC17534@htj.duckdns.org> <20161122214200.GE17534@htj.duckdns.org> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <20161122214200.GE17534@htj.duckdns.org> User-Agent: Mutt/1.6.1 (2016-04-27) X-Originating-IP: [2620:10d:c090:200::a:890d] X-ClientProxiedBy: BY2PR06CA0072.namprd06.prod.outlook.com (10.166.106.168) To BN6PR15MB1635.namprd15.prod.outlook.com (10.175.131.9) X-Microsoft-Exchange-Diagnostics: 1;BN6PR15MB1635;2:Re5DxX75csfkpsGOFywDc+TQnzSk9ecttpb2Ke1HmaiCe3ejUDJ/C9VGwoFCTZuPeqg318meToU3wB+QKbFaQfR8bvcACHd/3fcANmUcX00XPyVxxphrrfObHCVVNc+9iCSDSNPvhlQ/KgM1/Dig3jXw+fjW7wEkv5wBVsiR/ZI=;3:Ox0RBTH57+fiDGZ2PZ3J3cVXwTIwS4o4OKFSWjNyfK2CZJppHyQPA5OdM4xRIJCccn2Or0moDJpR4wa+OfmIQ8COAdlvhjP9ECfJNwRLuVJFyJ3XfqhMvG8xoPW5OuHMenZo1roY9Zp1NxXLLq8ni0bLYPjTCU1kM3GsYuzyPrU=;25:pMOJ4j2DoJO8yboowQrWh7/UMEkhfN4H03GTJrUq5SMEW3SqRiNrgtFv52KM/h7/o9vVQz8UD4pmY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hF0XDQd5 X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(6040307)(6060326)(6045199)(601004)(2401047)(5005006)(8121501046)(3002001)(10201501046)(6061324)(6041248);SRVR:BN6PR15MB1635;BCL:0;PCL:0;RULEID:;SRVR:BN6PR15MB1635; X-Microsoft-Exchange-Diagnostics: 1;BN6PR15MB1635;4:vuorGflU8xIBl8Sc/3QCELCuH4pZGh8gqYOEBOeMxv6OyzPhBSHgBUj3G9DAoC7LDMioQe2yKu0fY9JyzhgFUwo3sucN7l562LBo57L6vLhaILQBr2q7dRPR/JIQ4wEml9XPuKg0QRtKnmr5erIhdTr4Yj1kLkd4hfOC79Xb6atmIUKlkO9vEPjAYyj+l9OJu5QSwfYsw+jdej6cBx/ji1EO/45jh89olXSklKEw2BJRYKS4/9NtieMbzfwtppLG9jVe6vRtatIs00uqbKhy65zNMpjxzsVRJxluS9f2iVHErfHa3RhghCkLvNGhuyHnS2vUBF/DmJz/GMZxpAgdYxohiLImPOznv6gnBT3xedKPBCePZp5dXXEx93P7V7vt6uOztB6BKk5WhhQX/966BtEDeszhx6aDIvS31EBHPx3MF4IwVp/2aHXeO6MkId9ryD61NkeHcCjuZJ83UltUICoZ3ViUm9uxrDOFA2N8vG0= X-Forefront-PRVS: 0134AD334F X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10019020)(4630300001)(6009001)(7916002)(199003)(189002)(24454002)(6116002)(229853002)(68736007)(86362001)(4001350100001)(33656002)(97736004)(105586002)(38730400001)(106356001)(42186005)(98436002)(23726003)(54356999)(97756001)(1076002)(76176999)(50986999)(77096005)(7846002)(7736002)(101416001)(5660300001)(9686002)(305945005)(2906002)(4326007)(50466002)(6666003)(2950100002)(110136003)(46406003)(6916009)(189998001)(47776003)(93886004)(81156014)(8676002)(83506001)(92566002)(81166006)(18370500001);DIR:OUT;SFP:1102;SCL:1;SRVR:BN6PR15MB1635;H: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M3A==;24:SLnpOvDGxogmunCUnA5+kNxO+Q2gd5S8XYoB/aPL5nVLAaIOdGrbc0dx/oh1VSFL4AGn+1TLC7xTXR57dycmQqXN6Up3C/gVRFACBJW3JV0= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;BN6PR15MB1635;7:xaYVDyd9kg54YNUgEg+NIRVrK7KcVr2lQhQ+Z9hwRcygYTKl3PKUgErw3phlUBTocNruRYq4xG7Vbayw54LFt/uwsauz5gOQENPp5uMCNe1OnPlxiYQ5QaZCPpNZ+p5kLl1PBIXsJFZN6I7Ok43yUu0DmgjlEeN2OMmLLFvTYBeyWpCInB03OF7E1OVGS69/N/TjUwdpUU0sJU33BdKsD+p7XTCRZSdL3sXNqZz7a3FoCb2WM5IPnh7wz5uxWCZ8YQWERJ690QaS/S7XqcWYZvAiPzsphq8wehIv5JoJUPV3GCtRTYQXZHQCfxKPhciLcNKY2TVKOq0cFNsasremg5Eh+vVrO/U6PUXxZgxmHjM=;20:+i8XsqZGpwM6m+P2rfcnvpXhOno57Yuy9GvRfYqx7+2rKbtdtqPNABtw9fqAf61wXMEt12G3CgK/NWflUY6jzqYnturIf9NhmpMcZ6Ganknt9oA/FMVUtbp0qno3oAsQ24az9DWXUyHN6kkyNI5uakIGrgJleOZh8FePMD1z3eA= X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Nov 2016 23:38:31.2899 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR15MB1635 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_13:,, signatures=0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1332 Lines: 29 On Tue, Nov 22, 2016 at 04:42:00PM -0500, Tejun Heo wrote: > Hello, > > On Tue, Nov 22, 2016 at 04:21:21PM -0500, Tejun Heo wrote: > > 1. A cgroup and its high and max limits don't have much to do with > > other cgroups and their limits. I don't get how the choice between > > high and max limits can be a td-wide state. > > Ah, okay, this combines with idle cgroup detection to determine > whether the cgroups should be allowed to exceed high limits. It makes > more sense to me now. In that case, for the high/max limit range > issues, the enforced high/max limits can simply follow what's implied > by the configuration. e.g. if high=100 max=80, just behave as if both > high and max are 80. > > > 2. Comparing parent's and child's limits and saying that either can be > > ignored because one is higher than the other isn't correct. A > > parent's limit doesn't apply to each child separately. It has to > > be aggregated. e.g. you can ignore a parent's setting if the sum > > of all children's limits is smaller than the parent's but then > > again there could still be a lower limit higher up the tree, so > > they would still have to be examined. > > This part still seems weird tho. What am I misunderstanding? You are right, the checks are unncessary. I'll delete them. Thanks, Shaohua