Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754821AbcDDIX6 (ORCPT ); Mon, 4 Apr 2016 04:23:58 -0400 Received: from mail-db3on0136.outbound.protection.outlook.com ([157.55.234.136]:58912 "EHLO emea01-db3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751018AbcDDIX4 (ORCPT ); Mon, 4 Apr 2016 04:23:56 -0400 Authentication-Results: kernel.org; dkim=none (message not signed) header.d=none;kernel.org; dmarc=none action=none header.from=virtuozzo.com; Date: Mon, 4 Apr 2016 11:23:43 +0300 From: Vladimir Davydov To: Michal Hocko CC: Andrew Morton , Linus Torvalds , Johannes Weiner , Mel Gorman , David Rientjes , Tetsuo Handa , Hillf Danton , KAMEZAWA Hiroyuki , , LKML , Michal Hocko Subject: Re: [PATCH 1/3] mm, oom: rework oom detection Message-ID: <20160404082343.GD6610@esperanza> References: <1450203586-10959-1-git-send-email-mhocko@kernel.org> <1450203586-10959-2-git-send-email-mhocko@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <1450203586-10959-2-git-send-email-mhocko@kernel.org> X-Originating-IP: [195.214.232.10] X-ClientProxiedBy: HE1PR02CA0058.eurprd02.prod.outlook.com (10.163.170.26) To VI1PR08MB0589.eurprd08.prod.outlook.com (10.163.169.19) X-MS-Office365-Filtering-Correlation-Id: 74969577-9501-4491-3445-08d35c627442 X-Microsoft-Exchange-Diagnostics: 1;VI1PR08MB0589;2:xmRjdPk3+oirf6JuueIWWbVLpUkCGVCQz+xdqbttA+UYMQSg4ET3oPkdWu/TjNEFgGjFdckY2nECsxPqQWE52L7Bd8CYJC29m8ynhyweVVP/W8tM6yZhxpJsXKm7I0q4my8toFtoyFyXTBWdFWdLaCoeR9b/AFdBtf6QU9cXem2KpfcDY1k950ne0NKiZ5dA;3:pfYRtNZO4UsQ4N4NPl9wAmAApdFrUzBEs4uXqFgQ7zqP9nQthfjVge2t4FXiq/hiw7oG2Su/XsnQs240VqZdivGVc1NAfDztt39an6T9exjZQIzWQLFrXNvbervAzq3/;25:eP1GIXoITrqDnFhtEHAQ2BQnIU0c+Gl0biXjH5/ui887JC3oLPkbAVIypuBBxs9wV/7ija/1EJwNOAE40XoZFjuFTycv/rwFow4D+ldFjKGAevakOR1sc9zXifjvMQ4Wy2UpYF13bFwdorNvv7OjfOq/0Q3R2SPKz+uAwyIZ890r3RddYZJwgzObkUdqgRM0D4X+PBdjsznjQpDfJQRJwcQTvRjOMC81Jl4A46qzEK3v8xqwAqP3h0AyqyNzSKXR+QtAUYhEjYnJX18WhZc6HumgGoNnZlq7Eb2SqyRAcuETRex0IdGoNJUZHzZhbL62koOuqDRLxw+rsLWIkkWEAvL4iZATE989HjpOLaze5M4= X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:VI1PR08MB0589; X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(6040046)(601004)(2401047)(5005006)(8121501046)(3002001)(10201501046)(6041046)(6043046);SRVR:VI1PR08MB0589;BCL:0;PCL:0;RULEID:;SRVR:VI1PR08MB0589; X-Microsoft-Exchange-Diagnostics: 1;VI1PR08MB0589;4:wC96foLiY8FnP//HNCujBpilJGw3bHNsbX9hzlUMYhlDeP6dqNoHdcxdNmawGbKUGuPHSCFNbGsmrP28GnZXEOt+oic0yjGoCHeGYb8t9p+Gh6gk3SL98s4d/2k4bAhLxhT+cHfAMKyJ5zNnE7HaWcvNmaShewjwqt62ruOQn/PsnjvHAxOO2o0Tsyg+249i8xIG/hSG00NUuDDy8aLp8UOG2OO04AUaCu3krD9zUbHCIzNT2Ov27YF6PCXf5jZLIiXvqXK+wyaWlRBDHZMYVvYSI93BPMt5AqufIRPzV8E/Tm0WGu/fyUcYAa6FS4/GvlbYl55Z5sdxPFJhTefTIUrtZVXZD9yf3heS2vAkrmDmJi9czVOKU8YueaZj5xfjJ90lgbQRzaI2nCSwYCluqrrmfoKm5j2rYqhZfXsjUnI= X-Forefront-PRVS: 0902222726 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10019020)(4630300001)(6009001)(24454002)(50986999)(76176999)(54356999)(66066001)(110136002)(92566002)(1096002)(1076002)(189998001)(77096005)(5008740100001)(33656002)(33716001)(97756001)(2950100001)(4326007)(86362001)(2906002)(23726003)(50466002)(6116002)(3846002)(80792005)(46406003)(81166005)(586003)(5004730100002)(42186005);DIR:OUT;SFP:1102;SCL:1;SRVR:VI1PR08MB0589;H:esperanza;FPR:;SPF:None;MLV:sfv;LANG:en; X-Microsoft-Exchange-Diagnostics: 1;VI1PR08MB0589;23:YZPBepQlTWUoHD0WwicHgJk2S9jovPUzyPd8m/BSkbz5kPhntQ6/wuhKfwU0nhd8/eKMQ6IcMdkTsa1PSHwi+9OGqlrtqJwjGJoxiWv5m9uWyygsG/taFJSPoWSwexmdTy7eGGMr66PXUZ+Qnivc/B7IwxLEMeiaszt6m4kr0ln2eLWZnYYwBxuI2X4bodGaVcvcJRM9Vd9RTP81kkj0pa6udTTJKt6dIqUE+RKmmMIvolXUdO1Bp+7ceG9Tw1RpvH2n5lKYFOklpriY6HyhdKAXhGVDiP4xA5dHw1JU8P7ZtdD8lQ/LoTa7pAZl/PpFMRZSAtHIMn0E+i8WcIp1iKSaU2UxGoI+XEusb2Oc2ABfwtiQ9IYwofj/SkLPN+UWpSZ3eaIOGJ4oPBc/vyDJqH3rCe0tpzd4K/aS4ZEBzNd9+p7vfaURUbnc1jzmFI76I7Axev3Z5Wte+OXImwbuuLL6l1tH/JePtKY7xsftLGZ3R5tnWd946M4M+wyIl/59iVlitHHgyS1dKSXu+FJ1Lp3bLpoy8/DogJ825cd4mZbycmlKROPa+WpkcUdSNCZWXG7JCZG2nK4xOSHdIkQP1uTaqqz+H44cCirs4DE/aNVXVoLFWTgbPk7EohL+d1bwVWY8xAI39dKGQ5ISg7x1t+e8DbSFnfHU9ISF1gsnd6sjMNb/f+bSxKQy+t4ibnVVhhdZbZeyVD3/JxVzKb2J+uZl102Y2awcZzQFLAl2CmKx0wMxQK+FEicLHPtxgYG0c5C+LRAiHVmIwVI9ucskFLe5cNstJGixHlgMNZ9jUxq49PsV5F/ZzYSeytpkxijKiL+eJeuTbv81qUjoUwh9SQ== X-Microsoft-Exchange-Diagnostics: 1;VI1PR08MB0589;5:c5uSTg8VYFsQnJLl4VfFZuSNPlAxz+gQY32pX5GRnIGmACjGMFtfpGOLorq+Zrlaq5QqGPP15mWAqwEjP5s52GYzdGM0dZ8AWigVG1Uf2zFuh8CnBia75Apk8KVy4PGis/XICrIfTTS/eDRMi9pHgA==;24:3UeNRK1YRaNkyMKwgSchKxrFAw/owiijxHWmGUvW0VSaHbmrwjsyFtIbYrHKMNnxMjU8ovD666tbsZl5HxfxqGyjnK4Z+9+ETLKbhHY0b/U=;20:ERWxI/thcOob2EzYL4/Ay1j0mw1AfHyDMneIX3U5kDIEzRQxlweKBZr8O/e6e/5njaR4ploWp8QvwX08izqGYN/cPB6G9rKYGGTpj0/LLCebD6ouOGj8bAWWuXHG8JF61pWbTPRSj+zm8774LNorGTEAJaFK9TAtNb5Sd5LpZOk= SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Apr 2016 08:23:49.7823 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR08MB0589 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 749 Lines: 28 On Tue, Dec 15, 2015 at 07:19:44PM +0100, Michal Hocko wrote: ... > @@ -2592,17 +2589,10 @@ static bool shrink_zones(struct zonelist *zonelist, struct scan_control *sc) > &nr_soft_scanned); > sc->nr_reclaimed += nr_soft_reclaimed; > sc->nr_scanned += nr_soft_scanned; > - if (nr_soft_reclaimed) > - reclaimable = true; > /* need some check for avoid more shrink_zone() */ > } > > - if (shrink_zone(zone, sc, zone_idx(zone) == classzone_idx)) > - reclaimable = true; > - > - if (global_reclaim(sc) && > - !reclaimable && zone_reclaimable(zone)) > - reclaimable = true; > + shrink_zone(zone, sc, zone_idx(zone)); Shouldn't it be shrink_zone(zone, sc, zone_idx(zone) == classzone_idx); ? > } > > /*