Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp16650imm; Tue, 25 Sep 2018 15:04:46 -0700 (PDT) X-Google-Smtp-Source: ACcGV624wv9DPoBZ3OdKTBG2I04U2PANaFy3eFQxMgPSK6/QtLlZm1Cxl4RBalphLun22dxF5Q8z X-Received: by 2002:a17:902:50e3:: with SMTP id c32-v6mr3084570plj.194.1537913086556; Tue, 25 Sep 2018 15:04:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537913086; cv=none; d=google.com; s=arc-20160816; b=hYlxNL+IhU78gxdZ4wG8MJa/CLCDTk9BPQDi2eb1134rKrwPD3kieAZjbHWRlPcykB AslH6xcC8hfFN1+7wdk7aAyvVfVqmjaf+Y42tvx4jbf+sh5WPlXyTD1/fwcezaLrv/5R 8lmA6P+vazumpJ5LIKcEi35MMvIuWWskTYB5PcKlCAschnZxRUbRSPdPF7v50PTDko1P +GcGnu0ed167HXQ6UhbC5whFz5mnUuqeyesanDOfne5c/NnBJucLAevTzITK44tKGOuq J/SA7CkYFQE9GLixM56gbOXSD92YeSZm/4VkhJ4TBnirGEBf1cWxQGgK6n7qjdVeuYYq BDwA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date; bh=o8vBD5Btw77s1pgkKjHiz99Ctx3fNw8H7WMSwx59gwY=; b=RJvwLlMJqVbL3MkyabVPy7APCiJw7O0bS5Ar1pbSKcxQ1+5IST37uvA0wmKITQCDgy Stwd3kAZXmw3wvQI+JKiCwjB3oWTtiMAawS2KCbUyK2nt+LVTDHcV384pUjJi6SqejCV INEobLKgFfo/BkFZVPpKbQgeK3Fw5nxdxNMgMrW/+SM635JMBjm/YCg+InK7/Uq36mJ8 wnpogR1GhndK/YA72B7Mx4WMDQ21GvF/GQBvFVixBXk8Sq2QynTD0UZr/+q4LjRSUGzY kDB7hXV3/c8OA1poXkhdP9qyMRxnEbE44wk+hfjyRtVCo1tEYIotDXxdi9NhSo1gnyav 5eOA== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 63-v6si3101234pfg.67.2018.09.25.15.04.29; Tue, 25 Sep 2018 15:04:46 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726171AbeIZENr (ORCPT + 99 others); Wed, 26 Sep 2018 00:13:47 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:47596 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725732AbeIZENr (ORCPT ); Wed, 26 Sep 2018 00:13:47 -0400 Received: from akpm3.svl.corp.google.com (unknown [104.133.8.65]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id EAFD0E8A; Tue, 25 Sep 2018 22:04:07 +0000 (UTC) Date: Tue, 25 Sep 2018 15:04:06 -0700 From: Andrew Morton To: David Rientjes Cc: Michal Hocko , Vlastimil Babka , Alexey Dobriyan , "Kirill A. Shutemov" , linux-kernel@vger.kernel.org, linux-mm@kvack.org, linux-api@vger.kernel.org Subject: Re: [patch v2] mm, thp: always specify ineligible vmas as nh in smaps Message-Id: <20180925150406.872aab9f4f945193e5915d69@linux-foundation.org> In-Reply-To: References: <20180924195603.GJ18685@dhcp22.suse.cz> <20180924200258.GK18685@dhcp22.suse.cz> <0aa3eb55-82c0-eba3-b12c-2ba22e052a8e@suse.cz> <20180925202959.GY18685@dhcp22.suse.cz> X-Mailer: Sylpheed 3.6.0 (GTK+ 2.24.31; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 25 Sep 2018 14:45:19 -0700 (PDT) David Rientjes wrote: > > > It is also used in > > > automated testing to ensure that vmas get disabled for thp appropriately > > > and we used "nh" since that is how PR_SET_THP_DISABLE previously enforced > > > this, and those tests now break. > > > > This sounds like a bit of an abuse to me. It shows how an internal > > implementation detail leaks out to the userspace which is something we > > should try to avoid. > > > > Well, it's already how this has worked for years before commit > 1860033237d4 broke it. Changing the implementation in the kernel is fine > as long as you don't break userspace who relies on what is exported to it > and is the only way to determine if MADV_NOHUGEPAGE is preventing it from > being backed by hugepages. 1860033237d4 was over a year ago so perhaps we don't need to be too worried about restoring the old interface. In which case we have an opportunity to make improvements such as that suggested by Michal?