Received: by 10.192.165.148 with SMTP id m20csp3380148imm; Mon, 23 Apr 2018 05:44:12 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/LAyMJjj66x8Q4AqXdmFrta3yqu19LVJC0ynk/kzFoVtzWllWTODtwlqLs4vbAJrr/yLvK X-Received: by 10.101.99.22 with SMTP id g22mr17236389pgv.410.1524487452752; Mon, 23 Apr 2018 05:44:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524487452; cv=none; d=google.com; s=arc-20160816; b=VONUmyJdfV315+Q9nHwfbd2gydPKu0XXo++Mj96COHYaN6pWjfsTh8W7TH4FjdcQu4 75x3Nzhhzm5mm4ytQMGdza4HcvTO9sbudJ0aQVUydVi4GljNMT+xnXyiJlC2hOkIxlE/ F1frsEnhg+5ItR6g74IhkaWFdvYD1nZ3pyfzaZfusdR4Y2O/x8acV5ksKFFTR+65r574 xGxKanz7xpo2AwG2/brfdQO8OYkH+dS5mknhsjELidg3odW/PyB+qrXP/aszPTG6a18f Jyy/s9MvFlN3GM7CPtdp94j8kxrL61lPJm6aSK6Yf9AGFpX8u/U2tl5baZvT7d3QQjip +8HQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:spamdiagnosticmetadata :spamdiagnosticoutput:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature:dkim-signature:arc-authentication-results; bh=Bn76lBWjgooTTnZQABXxM17ZzsKKMrjCDCKgteCak0c=; b=AT0IRuhFoOGGUePsY0qrbt+CtG9CZEAchyh+4mT0xH5KM29yfOF9GChwS0wx3rcEn/ 4nqheDsz4iT9eUEFP10lkXmglBU/f8qzd9eeKdtc2GSlMR5ZmnoowIp3ayaJ4hVgoSsw wQ04Bm9xHwhdRpuz7mFjLdgct/xD3KDGI5FsRC7mgbKlkZTEXoEkszXaAw3yWweb3cry lM1ztFk3ttuw9SMCZEE4/tylk2egePGfMjpWJNX6zSqZZQFqirav9FTcKkUoKl6V6lNM vg991jvwuQM0dTZuOEvikJgXKEWH9+ew17xy6RPRaEbAkk1mi/u54t0TwCsmNwRiAn2m +aIw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@fb.com header.s=facebook header.b=OluHcSb2; dkim=fail header.i=@fb.onmicrosoft.com header.s=selector1-fb-com header.b=i8Ijhyt7; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=fb.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a1-v6si12300595plp.567.2018.04.23.05.43.58; Mon, 23 Apr 2018 05:44:12 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@fb.com header.s=facebook header.b=OluHcSb2; dkim=fail header.i=@fb.onmicrosoft.com header.s=selector1-fb-com header.b=i8Ijhyt7; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=fb.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755171AbeDWMme (ORCPT + 99 others); Mon, 23 Apr 2018 08:42:34 -0400 Received: from mx0b-00082601.pphosted.com ([67.231.153.30]:59646 "EHLO mx0a-00082601.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1754880AbeDWMmQ (ORCPT ); Mon, 23 Apr 2018 08:42:16 -0400 Received: from pps.filterd (m0089730.ppops.net [127.0.0.1]) by m0089730.ppops.net (8.16.0.22/8.16.0.22) with SMTP id w3NCdK4i014376; Mon, 23 Apr 2018 05:42:06 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fb.com; h=date : from : to : cc : subject : message-id : references : mime-version : content-type : in-reply-to; s=facebook; bh=Bn76lBWjgooTTnZQABXxM17ZzsKKMrjCDCKgteCak0c=; b=OluHcSb2q9WQYbRZ+r1fFt9ETPbzxpJnnIN3Px+vpEjGVYeS4tOo2WJA2OwgSfz81f7+ Vt8B2pFcTr2LeRialFrBmPIq4E1XzVr5fAPYhBSZQmz8hDNgXfquKWKDj7OC2oty9i3+ ZnCdj2bMBAj3jeVP8rIm753PUygL3CVp9ss= Received: from mail.thefacebook.com ([199.201.64.23]) by m0089730.ppops.net with ESMTP id 2hhf5a02w7-2 (version=TLSv1 cipher=ECDHE-RSA-AES256-SHA bits=256 verify=NOT); Mon, 23 Apr 2018 05:42:06 -0700 Received: from NAM03-DM3-obe.outbound.protection.outlook.com (192.168.54.28) by o365-in.thefacebook.com (192.168.16.24) with Microsoft SMTP Server (TLS) id 14.3.361.1; Mon, 23 Apr 2018 05:42:05 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fb.onmicrosoft.com; s=selector1-fb-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=Bn76lBWjgooTTnZQABXxM17ZzsKKMrjCDCKgteCak0c=; b=i8Ijhyt7rc14KOc/5WBZxDLZ87aLcBk3BaPmKEU1SH3eYSFd+GpLaldifTxhpISXPlB7NHYIEgF/HuWEMBxKIHP7Fi6sBLn21C8vzacd+FNoNvHd3L0gNiftoJ5pvsRgT5qSDxIWAlqm7d/E6JKrmsXjLX8kbvJ2sMdbgfVkqQg= Received: from castle.DHCP.thefacebook.com (2620:10d:c092:200::1:b3a9) by SN2PR15MB1085.namprd15.prod.outlook.com (2603:10b6:804:22::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.696.13; Mon, 23 Apr 2018 12:42:01 +0000 Date: Mon, 23 Apr 2018 13:41:51 +0100 From: Roman Gushchin To: Johannes Weiner CC: , , , , Michal Hocko , Vladimir Davydov , Tejun Heo Subject: Re: [PATCH 2/2] mm: move the high field from struct mem_cgroup to page_counter Message-ID: <20180423124145.GA29016@castle.DHCP.thefacebook.com> References: <20180420163632.3978-1-guro@fb.com> <20180420163632.3978-2-guro@fb.com> <20180420205450.GB24563@cmpxchg.org> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <20180420205450.GB24563@cmpxchg.org> User-Agent: Mutt/1.9.2 (2017-12-15) X-Originating-IP: [2620:10d:c092:200::1:b3a9] X-ClientProxiedBy: AM4PR0701CA0003.eurprd07.prod.outlook.com (2603:10a6:200:42::13) To SN2PR15MB1085.namprd15.prod.outlook.com (2603:10b6:804:22::7) X-MS-PublicTrafficType: Email X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(7020095)(4652020)(5600026)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7153060)(7193020);SRVR:SN2PR15MB1085; X-Microsoft-Exchange-Diagnostics: 1;SN2PR15MB1085;3:gX90oGLNU9pXy9DSd9uoStIQVkbg8BoKOWmM4nvuUarmL2VhSSkPNT4NUL/fMzwF2MoDJGJMbm+JL7m8p2xJBDoiBmKpAJPLlbbPzAD3HWt+g2i1qqsMxZu4zgi4R7AX/0j+O6LUOmJvfIXSsa/+XnjPbAHJ0ecHil4YyX216Ef0d/nXOz6XTgMmY219n369nHJCjLM34/PnWCtxrP98SSNMDFKSQL4uer7/xnGFMw4YqlbIVBPQPfcoLwHo1RQ4;25:0mwH3cLc3t3Hs0D7aVUg+eGUKp7ScaHWDRP6R+7C3r0/Z+KmJfttBnVIiy7xFFjjVA+1l7rjMe81FmqEWQYtYZGf/zrKVEVbKMrtOjAsR1CrxhGowU6+PcbUo0DsI9ijR+6ZDHu+KMefJ1xAVe+6e1ODMlxpKmjdMRWC8fOvXB2LvEITUaDtii1dEq3Gj2fJgjLiyANhB7cV5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WSPRQYkeNWD2K9b/YHc2pk+DLsFx76coqJJbaz8seUTZGXYmeo70R/ARHLon8fCWz7GpyKZFRtnclujmRwkfJ1kykjZF2iIABP0+yKBW1I+G+d/0tSIjkkcSaHahGtpbGdOyoKNtgy/yIrZLTHB/6iaqAzaoOL9VWaGiAI0E1890sQ== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(10201501046)(93006095)(93001095)(3231232)(11241501184)(944501410)(52105095)(3002001)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123562045)(20161123558120)(20161123564045)(6072148)(201708071742011);SRVR:SN2PR15MB1085;BCL:0;PCL:0;RULEID:;SRVR:SN2PR15MB1085; X-Forefront-PRVS: 06515DA04B X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10019020)(376002)(39380400002)(39860400002)(366004)(346002)(396003)(6666003)(478600001)(446003)(25786009)(7696005)(54906003)(316002)(6116002)(23726003)(16526019)(476003)(16586007)(5660300001)(6506007)(8936002)(58126008)(386003)(47776003)(55016002)(86362001)(11346002)(229853002)(9686003)(33656002)(6916009)(50466002)(81166006)(39060400002)(4326008)(186003)(52396003)(46003)(76176011)(53936002)(52116002)(6246003)(8676002)(1076002)(7736002)(305945005)(2906002)(18370500001)(42262002);DIR:OUT;SFP:1102;SCL:1;SRVR:SN2PR15MB1085;H:castle.DHCP.thefacebook.com;FPR:;SPF:None;LANG:en;MLV:ovrnspm;PTR:InfoNoRecords; Received-SPF: None (protection.outlook.com: fb.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;SN2PR15MB1085;23:jdsDFBr+gyudS0fdZLTm+k/ZXoozOAvQF+xmYmWOF?= =?us-ascii?Q?+zgtmq6jK/UXMDDuTVQYryQMJmj6QvaUr9mbR0jMYIb9NSlgSBu+bxG29m28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+hM+qVWM8EfBKojdaLRi+yc=;24:Hn9FLFmKHdfBsj18vj2D2Fp3TET8HzmK+sM4RJSaVK+/mvi1liPl8OdkDpvZ05GGCUNT5UsjukVnHbSqtYlBH/P+OyK5iLTfP515QBMDnlw= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;SN2PR15MB1085;7:4USS4IvqhFKOTOZ0/c13fG+qGHZkVMVgzic6k1eyhwbnLzHoIixCpitU8OKD+FnC41qhZ+KjRycTEkWI+bJ/tPxSiXzkOcn0n2bl5oU3YbxtygGkZt/3QEKmF+lR+VmGn9rmkEdGhGdt5yL1gly3hof6Y0GErrQiVI8HEfbxp86mFPuKPRLMk/eA5OZN4WvjuEA+2mLweH0CO7aOcj6Njl2TAWiY26lAexBIx+E5kcXaZYUI6dnWqVX8rD89Ie+4;20:cB6Yk8xxIcwY+NXkxQNNEQAxRM1rLLOdRmtyUWferaTMEO1eSayNFnMbUNp0gIr+fzT++S1dbJiwQjVbPcwWXnLo9NIA9DcmZeZDNu/02ulK7gY7QqTlnFrUPUHh0QnCudrMXpiBdDZY1fxsm0+jwDmu66+v5X3rP2YvYawSXr0= X-MS-Office365-Filtering-Correlation-Id: ba2c061c-c3fd-4c8b-ebfc-08d5a9179d2c X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Apr 2018 12:42:01.5507 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: ba2c061c-c3fd-4c8b-ebfc-08d5a9179d2c X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 8ae927fe-1255-47a7-a2af-5f3a069daaa2 X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN2PR15MB1085 X-OriginatorOrg: fb.com X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2018-04-23_05:,, signatures=0 X-Proofpoint-Spam-Reason: safe X-FB-Internal: Safe Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Apr 20, 2018 at 04:54:50PM -0400, Johannes Weiner wrote: > On Fri, Apr 20, 2018 at 05:36:32PM +0100, Roman Gushchin wrote: > > We do store memory.min, memory.low and memory.max actual values > > in struct page_counter fields, while memory.high value is located > > in the struct mem_cgroup directly, which is not very consistent. > > > > This patch moves the high field from struct mem_cgroup to > > struct page_counter to simplify the code and make handling > > of all limits/boundaries clearer. > > I would prefer not doing this. > > Yes, it looks a bit neater if all these things are next to each other > in the struct, but on the other hand it separates the high variable > from high_work, and it adds an unnecessary setter function as well. > > Plus, nothing in the page_counter code actually uses the value, it > really isn't part of that abstraction layer. > Ok, not a problem. It's nice to have all 4 limits in one place, but separating high and high_work isn't good, I agree. Let's leave it as it is. Thanks!