Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp4844687ybb; Tue, 24 Mar 2020 06:25:33 -0700 (PDT) X-Google-Smtp-Source: ADFU+vvpD2jRs93d23bY6WRwk+wxhX96H1C88dzE0CEnS0r44VAsdzDC9IfsqYZEpCCheg4r3xRs X-Received: by 2002:a9d:6e12:: with SMTP id e18mr1028188otr.10.1585056332856; Tue, 24 Mar 2020 06:25:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585056332; cv=none; d=google.com; s=arc-20160816; b=Ru1bEDdDnCOfTZdixA7jEEpy4w+U+mJ04UUtK16Ox6MgbensPOlUcZmqxLOv56BqqG 5woZCESw/Ax0wNZjj5I2Ewx3A3shH8OYTclxqRhYHjDmOOH8fVkCbx8cxPHnoMOFNPGh AtT+sY0RBXaElrX1g6ftVHSUJhwhJyVdVx9WsKQD9+AzQwP4bK+158bmjlhAhxsm18/Q pUh994FxwW4G/3xQfwJiyq8jvQQt3K3DWoFWVQPh1QqyDSfz3pC1K/LO/+9FAEEMYfVX VIrfNlnA6Xq2qthCOGrRxCbLc+O+BpJ3J+7SmfF5z4vd2TJfm7M+hWWOj7mmpQ6ump/o kiCw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=16WGU3cNB1gezVOdWiJDOY/jwLM7wxW+VZ4bxA/PHPk=; b=OcGYZsafWqaIpbKlvUAbt4TWT7qUdtcr4im/AnOuc+YrupA8wRkfh/Aq7IXFSenBqI reT4ghSuk9/yCFUO/4M+yTFbOb7FwHrKuY6+zdc+UFvXTIiPiLCv+ASqWmkcXO6dDzwX wPKMOS7ECI/NAnSlhPwonA4KqBBlZRjdL+HWUMLEWyWTZdQTsKYt0SvysjPcW9lVeg9X RHxTXbfguy1YUtQ7KiLCBBDgtvWk0V++tzK04e0ok8lVA4sDu0Ojkf3QNVvpwcdOrZ2e Q1UD2sbCEC2Bf0TSJ2uOaFRORF68sHJldhS9cdiBYdypcRjg40dE4qtUKWdXXY6qxvvj HGuw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chrisdown.name header.s=google header.b=bWlSVSaA; 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=chrisdown.name Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u10si9153521otj.235.2020.03.24.06.25.19; Tue, 24 Mar 2020 06:25:32 -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=@chrisdown.name header.s=google header.b=bWlSVSaA; 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=chrisdown.name Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729499AbgCXNX6 (ORCPT + 99 others); Tue, 24 Mar 2020 09:23:58 -0400 Received: from mail-wm1-f68.google.com ([209.85.128.68]:37461 "EHLO mail-wm1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729468AbgCXNXx (ORCPT ); Tue, 24 Mar 2020 09:23:53 -0400 Received: by mail-wm1-f68.google.com with SMTP id d1so3449097wmb.2 for ; Tue, 24 Mar 2020 06:23:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chrisdown.name; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=16WGU3cNB1gezVOdWiJDOY/jwLM7wxW+VZ4bxA/PHPk=; b=bWlSVSaAkOrITpOQwvrWt1U9KbT9mbpxsTyfS70Bdu05BJ1bpQu2yaT81q91QdmG8m b2iC6Eyj1qy/xakWe9eSTS+HImwFRVl0AESSqhQrw9NqXo0VwH0qp2T3zTae9TqhsZf/ n/Lgm424ZcP3W7ZZ2bRqCxOKpCo5Nk/adFez4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=16WGU3cNB1gezVOdWiJDOY/jwLM7wxW+VZ4bxA/PHPk=; b=h5IUmrm9yUvf2Z5JcSGn5HBcTe2m9inEUZvQgJg17TJnLT6ZBFN1YukUzMr0ugOJPl kFphUqRG9g4dUCGW/1FSE5QEe9Wu0diWaKON9QYnPuCeG5igd+jW4Zc72WlhyLcDsi6V WTAjTtJrwmBCy8bGXSjDrpvT6MpIyQeoUfowKyK05m4bhg1Q99kOQb6jKdE+ZYo5yHJJ IYSxOcHdcz2oHqyd1lg95x8jOJPeVRAzkMAGkVeEGkk8ByQviH7jpRBfhKPR65XsIxOA sNccfd6ECE3DbpbMiIU3zm1WTYUEhkAQTLlURXVlA82h84a3NnWGnfHfQFBdCT5kIMMI u4jA== X-Gm-Message-State: ANhLgQ1BA6C8G36mlAyJ+rh65fta/FtV2Of9ZoMif2JXcWEhWTRW8aJB nXQzIDHZS7Q3AOqfFnYWM0DMSg== X-Received: by 2002:a05:600c:280b:: with SMTP id m11mr5309390wmb.99.1585056231630; Tue, 24 Mar 2020 06:23:51 -0700 (PDT) Received: from localhost ([2620:10d:c092:180::1:8734]) by smtp.gmail.com with ESMTPSA id w7sm29792149wrr.60.2020.03.24.06.23.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 24 Mar 2020 06:23:51 -0700 (PDT) Date: Tue, 24 Mar 2020 13:23:50 +0000 From: Chris Down To: Hui Zhu Cc: hannes@cmpxchg.org, mhocko@kernel.org, vdavydov.dev@gmail.com, akpm@linux-foundation.org, hughd@google.com, yang.shi@linux.alibaba.com, kirill@shutemov.name, dan.j.williams@intel.com, aneesh.kumar@linux.ibm.com, sean.j.christopherson@intel.com, thellstrom@vmware.com, guro@fb.com, shakeelb@google.com, tj@kernel.org, tglx@linutronix.de, linux-kernel@vger.kernel.org, cgroups@vger.kernel.org, linux-mm@kvack.org, Hui Zhu Subject: Re: [PATCH] mm, memcg: Add memory.transparent_hugepage_disabled Message-ID: <20200324132350.GA7528@chrisdown.name> References: <1585045916-27339-1-git-send-email-teawater@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <1585045916-27339-1-git-send-email-teawater@gmail.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hui Zhu writes: >/sys/kernel/mm/transparent_hugepage/enabled is the only interface to >control if the application can use THP in system level. >Sometime, we would not want an application use THP even if >transparent_hugepage/enabled is set to "always" or "madvise" because >thp may need more cpu and memory resources in some cases. > >This commit add a new interface memory.transparent_hugepage_disabled >in memcg. >When it set to 1, the application inside the cgroup cannot use THP >except dax. I'm against this patch even in the abstract -- this adds an extremely niche use case to a general interface, and there are plenty of ways to already indicate THP preference. Perhaps there is some new interface desirable for your use case, but adding a new global file to memcg certainly isn't it.