Received: by 10.192.165.148 with SMTP id m20csp696948imm; Fri, 20 Apr 2018 13:58:14 -0700 (PDT) X-Google-Smtp-Source: AIpwx49abDTe4uv96JCZSQwpnqaAhfnKFLTp22AACBSKvP4tJTbc5zqlT41FmO5LqGRTTKqlaE4h X-Received: by 2002:a17:902:3c5:: with SMTP id d63-v6mr11375238pld.163.1524257894384; Fri, 20 Apr 2018 13:58:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524257894; cv=none; d=google.com; s=arc-20160816; b=upg97scGKwue4m7DeEGgWAt4gGTToQaBgqeahbdWLio0l9WjG5GtENs92lHRNV7fEg PFuNMbAEskf0ZA7MXGC3/3uwtd1zc2sAs2sPPfZ17t7cThIWo+w3OyIdirld0w6sWqHl Pb2wPUiMvKU01U15k5myyIzm7IJ+Ml9pYbZ5/lCQn+tXw4BUPPoOq3ajeDegkR+VZe5C wQDzycBf85M2XJvjlxNHySFIXJufsNGKNptYcjXGN2DtmoTnekR/Q4bd8w8tIl8BtGtd zAdcsw7IOQmLoJ+wevvUhj0CtNS9lquv2G6y2CfNg7srn8ZU2Oa6gmoj7F7MKBLCFefZ S3Xw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=fEY29b6hQBUF2+tDn5H04jzf/O5xYpFOxubFo8tD0zw=; b=JcllQc1NtsQR/2V1f6ynk3Qg7eV2jtcU7f6SJyiNy7Uyv3tyS2Ee7Z6nvK8nEs0B4+ PZBpkKoHmrJz+P5THGPJ5DGx8peh7gDsFzCh8oOPUlicmcS4hilM7XxfgsEJ8PGeeraJ F3tIRessP8+c9b4oimcfsysiEy8Wwf6dcNp/gTTjXNg5dWD7YLij6cLWHusXUuyyQWqj CD03U6ovHhnciQqfwR9Igi8rtVaGla2BUWHqe5t5tt6w5fnnlw5DaY8QoWbF3mdn3bJS CbcDorwC8n8hmFY1Qp+tjshztbLCJzdFoARSeysO6ArPEjbMfz590ky7ueMo3Vm/lwYX e1CA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@cmpxchg.org header.s=x header.b=yinF7Uxt; 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=fail (p=NONE sp=NONE dis=NONE) header.from=cmpxchg.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y7si5217739pgv.427.2018.04.20.13.57.36; Fri, 20 Apr 2018 13:58:14 -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=fail header.i=@cmpxchg.org header.s=x header.b=yinF7Uxt; 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=fail (p=NONE sp=NONE dis=NONE) header.from=cmpxchg.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752900AbeDTUxP (ORCPT + 99 others); Fri, 20 Apr 2018 16:53:15 -0400 Received: from gum.cmpxchg.org ([85.214.110.215]:52294 "EHLO gum.cmpxchg.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752765AbeDTUxO (ORCPT ); Fri, 20 Apr 2018 16:53:14 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=cmpxchg.org ; s=x; h=In-Reply-To:Content-Type:MIME-Version:References:Message-ID:Subject: Cc:To:From:Date:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=fEY29b6hQBUF2+tDn5H04jzf/O5xYpFOxubFo8tD0zw=; b=yinF7UxtIFrVYggXl3QuBT1i2U RUiSG47VWYLtkjFdtWkbMQe+X7PCWUBtRHw5NJ2PcHYP+54t8cnS9mI/F8zUGB1NgD6Th3TRsvb6i jVx8xb+TnjCDO4LCCacuRbd6yU4vwF9tYu1gWGWbu4AMnKYNOvyA+dcVXxgufMby5eH8=; Date: Fri, 20 Apr 2018 16:54:50 -0400 From: Johannes Weiner To: Roman Gushchin Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, cgroups@vger.kernel.org, kernel-team@fb.com, 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: <20180420205450.GB24563@cmpxchg.org> References: <20180420163632.3978-1-guro@fb.com> <20180420163632.3978-2-guro@fb.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180420163632.3978-2-guro@fb.com> User-Agent: Mutt/1.9.4 (2018-02-28) 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 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.