Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp4459756imm; Mon, 15 Oct 2018 15:27:29 -0700 (PDT) X-Google-Smtp-Source: ACcGV630MSG20ecPG5HUpgOJRsihj8XFjedKm+zhukBMG/GqPnqXNKxmFmKdio10xEmwzgT7mxie X-Received: by 2002:a17:902:4001:: with SMTP id b1-v6mr19035401pld.89.1539642449718; Mon, 15 Oct 2018 15:27:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539642449; cv=none; d=google.com; s=arc-20160816; b=O5uchno9TXRtKd8qdxQMqDdVeanGKNxPA4OJV3Zeefs1tTdgW6v8B4G7w9KJNuggXn oDVwUq08Jv+qhF3UgY1KLKz0V6duxWGexVczOfdtVs2/JpTggSULGZwmgRf6m2xC8SFV WLmrCHHBCKnWCAuRbF7QCIbl6wdux/7ZeNP5Xo5xi11PDQp4yc3PDh077ff5CsXSFnGQ aqaYvgSdDnXocb7aITdSOCWfHvu5Qaeefqo15sk4b6Yc0rBKRPJjlKsFZRADkyQIMpwH to4VeJaPRNtgl0Tf/cPP+rjgJ/IEcravxVTujhYZ1pwFkoC0KhUvlz/w4fLhDEpZF8nv JrCw== 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=aA+y8iLkfp0PqXNnC0ftoRa9SP9ng4HKs19zN4KHz50=; b=NMS9IeRYGrsrMfDoK9DRywQLQk125nu9f03q0nMpRYPkQHb2DCopvtvKasbRjK9B9K V7aLJGhJsPXlOKr0if9qUoq5fg+NZ6/TkeXGI4PY9g1cO62gBBj8ZR1NN16ZWJhcYRXd DTryovb2W275jCVDrEd0UCULw2qKeKBZRHrda7c74xr5ylhrSQsMGaSoTzNclVh1RlFy belxNMP0Na/Wzod+ly7PlQq+DDq5eCimbs3gQ2gQ+Nsh2lEPtuEIpQYNSwbbUAWkpZPY KOtA1zjnzErJxdW3NasmB+NXwXdUeFrLQQ2JCoZj7YghRxMEALeo4+IPlq/ZA3PMJc4b 5eRw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=tcFHr0x2; 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 k12-v6si11159465plt.115.2018.10.15.15.27.14; Mon, 15 Oct 2018 15:27:29 -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=tcFHr0x2; 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 S1727062AbeJPGM3 (ORCPT + 99 others); Tue, 16 Oct 2018 02:12:29 -0400 Received: from mail-pf1-f195.google.com ([209.85.210.195]:34454 "EHLO mail-pf1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726440AbeJPGM3 (ORCPT ); Tue, 16 Oct 2018 02:12:29 -0400 Received: by mail-pf1-f195.google.com with SMTP id f78-v6so4616664pfe.1 for ; Mon, 15 Oct 2018 15:25:16 -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=aA+y8iLkfp0PqXNnC0ftoRa9SP9ng4HKs19zN4KHz50=; b=tcFHr0x2H9I1vjAfKie2oYH5f93ZKGbhluptFrEsPoJm1K61P/wvwckDSB/67w4fyA nJwtaVm93EnJXqKI1zOYnFAPF3UwGNQAkB0b+Pl9WRcFDAK1kmCEzuY5+0y73e0G/lvQ Y892/zadSQuYy3ba4LU32Mbr2cZqDii89ULiCWAzPQUZMFHa53cgJesWYO2xwU6Nm/it sM3trvUbwugXski2I0qRbdxevWrGpGxSD2OlL/LIKK3LT+ACtmillno2RXzjsfxXG2NV ff3t4QmIpVI5WjnGb9VRTPknkSS4Bjl+/NLg8zTyameicCGudbnM7eSewy/sh16JE62q ZzZQ== 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=aA+y8iLkfp0PqXNnC0ftoRa9SP9ng4HKs19zN4KHz50=; b=TDw+zK4YVn2vglHgl1dXbjk9sWfOtnabqWZQ4tY9abJvdUwP/ox52syoRiFp4X3ewN 0TiIRJrNj+xiJP7Rj/Kj65Do99fcGfz1jwLdiTnc/HePdN4UbGKk4uIn/g1xGvqyrnKf 3RIjG2v0/ISj4tsEsC8Du+jfSED9AqcgaB+jjLRxD99OUp1qD2IRhUd0ueTDpos5KX8z wDjxurTAN6mKYKbPmDn5W13tF77ElRVigsiytrkEN8E0S5IBEu8OQ17G4LiGTqRxwzsd c76if8tXCNWqmEbwHugyOknB10VY+Bt+Z4+Q89rJWmA41lhU4YBIQX7I4aK8MVSjf9ci LktA== X-Gm-Message-State: ABuFfoiN/3W9x7kwHxtFJUb6AaB9Dahb3JZJbLhDeIx+CgjnMlhMFRjX x+S5yRL2F6FSVz64vborIuAWlQ== X-Received: by 2002:a63:790e:: with SMTP id u14-v6mr17853642pgc.111.1539642316386; Mon, 15 Oct 2018 15:25:16 -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 a11-v6sm12826812pgw.54.2018.10.15.15.25.15 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 15 Oct 2018 15:25:15 -0700 (PDT) Date: Mon, 15 Oct 2018 15:25:14 -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: <20181015150325.GN18839@dhcp22.suse.cz> Message-ID: References: <20180926060624.GA18685@dhcp22.suse.cz> <20181002112851.GP18290@dhcp22.suse.cz> <20181003073640.GF18290@dhcp22.suse.cz> <20181004055842.GA22173@dhcp22.suse.cz> <20181004094637.GG22173@dhcp22.suse.cz> <20181009083326.GG8528@dhcp22.suse.cz> <20181015150325.GN18839@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 Mon, 15 Oct 2018, Michal Hocko wrote: > > > No, because the offending commit actually changed the precedence itself: > > > PR_SET_THP_DISABLE used to be honored for future mappings and the commit > > > changed that for all current mappings. > > > > Which is the actual and the full point of the fix as described in the > > changelog. The original implementation was poor and inconsistent. > > > > > So as a result of the commit > > > itself we would have had to change the documentation and userspace can't > > > be expected to keep up with yet a fourth variable: kernel version. It > > > really needs to be simpler, just a per-mapping specifier. > > > > As I've said, if you really need a per-vma granularity then make it a > > dedicated line in the output with a clear semantic. Do not make VMA > > flags even more confusing. > > Can we settle with something please? I don't understand the point of extending smaps with yet another line. The only way for a different process to determine if a single vma from another process is thp disabled is by the "nh" flag, so it is reasonable that userspace reads this. My patch fixes that. If smaps is extended with another line per your patch, it doesn't change the fact that previous binaries are built to check for "nh" so it does not deprecate that. ("THP_Enabled" is also ambiguous since it only refers to prctl and not the default thp setting or madvise.)