Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp265675imm; Wed, 3 Oct 2018 15:51:42 -0700 (PDT) X-Google-Smtp-Source: ACcGV616bgkbu3X3I4bqI4TyzBTSfaoHTy8xvQcKRQjA0CjfePeLatZCaik+cgC5jpoMArYNKHMt X-Received: by 2002:a62:9e52:: with SMTP id s79-v6mr3879555pfd.110.1538607102906; Wed, 03 Oct 2018 15:51:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538607102; cv=none; d=google.com; s=arc-20160816; b=QslLQDHLs2deb8zi9Y7k+WowKWhFitwxKZha40PUQ40gORKXWN2KUvbEz+jj87nVZx dvCFbmDnt9M8rGZ6mZfM27QGiYk+N1e7YLzsVoFB5vMw+WNqk+ZGX5uDmxDVdd8XW/Nv z7ealUjbY9ir8AOu4f2cp3ToJJnmkR0MLX+R4qbK6X3xlhEThC7hwEL8jU0Vigx+Lr2Z +bff34gpTSI3s6yr1dsHV5De3PaRtC9+pRhlyI1O7/l1cf850gi0KaO3MXya4Of11n4A 9sSklex7SuYrpbDkOI5g5nlFX6bkD6eXkybbppZ+8BBck0+pxSCO8+DeNhYEvENavnVm Qj6w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date:dkim-signature; bh=UZglTBizvX/yOVqXcm55tcIE03q1zO1FIn6z28ZwCtg=; b=H6cb9FMZlVfzbMLjWv9HH8YF+Mye65NpA8H59uyVrdJ19aF/0f+R2g/gK1aj9pvMB1 l0IdpLa8erYLJCK+dI53YG5F772F9+4zfKsOGx+Wyw8EwoENYYeM9I2U2RMYNc8e6QHq zefQdwSHwGSA9RH5Cnv1pypP8T3XCfBeXs4KgL1LvfeoDPWQQTjp/pUZ4RPlN9UjzxXt IQUToEtJ+XGYWSrY6uSMyygA+TFTZ67P6H/j9E6805H+gXbwb8/QcgcmFQ2xxOuQl5la ydgbFxJUpsk7DyI7D2Q83UT4td8vLNbCVnYPxmTUvCOZutThsmQGFwQA8S8Sjt0YiHmb 289g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=M3u3fqdw; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 202-v6si2773763pgb.63.2018.10.03.15.51.14; Wed, 03 Oct 2018 15:51:42 -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=@google.com header.s=20161025 header.b=M3u3fqdw; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727009AbeJDFlb (ORCPT + 99 others); Thu, 4 Oct 2018 01:41:31 -0400 Received: from mail-pg1-f193.google.com ([209.85.215.193]:38164 "EHLO mail-pg1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725723AbeJDFlb (ORCPT ); Thu, 4 Oct 2018 01:41:31 -0400 Received: by mail-pg1-f193.google.com with SMTP id r77-v6so2212049pgr.5 for ; Wed, 03 Oct 2018 15:51:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:from:to:cc:subject:in-reply-to:message-id:references :user-agent:mime-version; bh=UZglTBizvX/yOVqXcm55tcIE03q1zO1FIn6z28ZwCtg=; b=M3u3fqdw3xeAYGJOrQQy0sx5+iU2Q2EUZ34j7uf88s8J9EgX4V0+aNSamuXGcMBv6p mMDGtnRrO+hoYUV+rzNEXuJ9D7xcvah5aoc4KvWbUDdOLVd9VADe/txvzVl+w3/4I25w II12wFYMrxgmnMZl3Nya4liX2xyaV8SbB4UMT5WNw7o1HcLl1txvVx7DMOCV0O4vmR4f QuMNuke4d1WnA3NwcLrOfzrUaggoS6+D9a+rVgScIwiWh1ZOm7DlzFi8X91kUd8ftbhY ZiEkCR5AbCcwb4wbQb7E+rdM688uTBIJ1B1XG+mTxQG2jjsuJ4VF9f0Cmkb9EDl142/i LNrg== 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:in-reply-to:message-id :references:user-agent:mime-version; bh=UZglTBizvX/yOVqXcm55tcIE03q1zO1FIn6z28ZwCtg=; b=dpwSsW2th+MIgg5/qEXVXty7avrMbjULITcprQCmCN9g+F0SGPxT4nIC9C9PxzdLDN ykkz9KKvJgWDwpFfvUziSOKljtJKuENGw0zeRSAlQVbbU6h5qS9sk/ReadZkCeKUKzGc 64RFS3ixjUCbgOw2YXvKnzl9DAXX/PCcncOgNjA/Ihk7WUOc8QzWM8+AKmNAPQU452aE CSNbmi0+zHHy/8nTORPVQOiA6KbyPY37E49vJGGYNt1s+AA5UIUYiMm1CEcHBVboDgmH Q9Rsv/etsD3fLAc+Xa35j/aMik0m8UYIWEMvpKujNSltjaZ+/mYSwlgxZksfjmX24CHH jDVw== X-Gm-Message-State: ABuFfoikAGctptZi9aK3ONXAoB53+am4CIyJsS+4p4kuyaDssqywuXH8 Rn1Nj+jrwgyAPWfTiGFsp5GbZQ== X-Received: by 2002:a62:1316:: with SMTP id b22-v6mr3791278pfj.37.1538607066723; Wed, 03 Oct 2018 15:51:06 -0700 (PDT) Received: from [2620:15c:17:3:3a5:23a7:5e32:4598] ([2620:15c:17:3:3a5:23a7:5e32:4598]) by smtp.gmail.com with ESMTPSA id e64-v6sm4602704pfe.55.2018.10.03.15.51.05 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 03 Oct 2018 15:51:05 -0700 (PDT) Date: Wed, 3 Oct 2018 15:51:05 -0700 (PDT) From: David Rientjes X-X-Sender: rientjes@chino.kir.corp.google.com To: Michal Hocko cc: Andrew Morton , Vlastimil Babka , Alexey Dobriyan , "Kirill A. Shutemov" , linux-kernel@vger.kernel.org, linux-mm@kvack.org, linux-api@vger.kernel.org Subject: Re: [RFC PATCH] mm, proc: report PR_SET_THP_DISABLE in proc In-Reply-To: <20181003073640.GF18290@dhcp22.suse.cz> Message-ID: References: <20180924195603.GJ18685@dhcp22.suse.cz> <20180924200258.GK18685@dhcp22.suse.cz> <0aa3eb55-82c0-eba3-b12c-2ba22e052a8e@suse.cz> <20180925202959.GY18685@dhcp22.suse.cz> <20180925150406.872aab9f4f945193e5915d69@linux-foundation.org> <20180926060624.GA18685@dhcp22.suse.cz> <20181002112851.GP18290@dhcp22.suse.cz> <20181003073640.GF18290@dhcp22.suse.cz> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 3 Oct 2018, Michal Hocko wrote: > > > So how about this? (not tested yet but it should be pretty > > > straightforward) > > > > Umm, prctl(PR_GET_THP_DISABLE)? > > /me confused. I thought you want to query for the flag on a > _different_ process. Why would we want to check three locations (system wide setting, prctl setting, madvise setting) to determine if a heap can be backed by thp? If the nh flag being exported to VmFlag is to be extended beyond what my patch did, I suggest (1) it does it for the system wide setting as well and/or (2) calling a helper function to determine if the vma could be backed by thp in the first place regardless of any setting to determine if nh/hg is important. The last thing I suggest is done is adding a third place to check.