Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp315897imm; Wed, 17 Oct 2018 00:06:34 -0700 (PDT) X-Google-Smtp-Source: ACcGV60F+Lk2cIYJv2cz0LE9AW0DhK++bEpiOgpdu2WYxteCQMgdu3pIYVKSC7cey8MX9a8U0nfS X-Received: by 2002:a17:902:3324:: with SMTP id a33-v6mr24700653plc.208.1539759994356; Wed, 17 Oct 2018 00:06:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539759994; cv=none; d=google.com; s=arc-20160816; b=nbzrl+AVNY+VQvxl7mD3fpxlEc0qrOmkrNzE1F1XjBraSI+qAhfvDzYzvqjiSexL3j BvHGNxYi4bLeOk3GRFkMJP2dGey3cLkPrx1/nKN318dM6sEm+eSe3nZaFK07UtZkArZi xjzG2zHjlGHPi62znPuLfN+D+cOHjfFqnRTf0HUQMX9MJdu0FNgMJppVKrGG7TlRUfXU E4okPXACf7ITcb3t5ypDNEVSyOfUldvzmnlrB4EZxcCjKbRXr++9vLQTGOonhkkWF8T4 pDtxiYbzBRS4V6drLfIrGL/aTja8q3pJYM0PQhJcytb7KT9oLF6cXAlxjpwsR4IuNsOl fIdg== 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; bh=J3PY/UB08DrFVJczQkDe9ptzJQ9woM+9c3Zprk7ho04=; b=zxgMWIrfa6zy1nVvgsvDKrPpB3XFF4h46NWAD2XLdXP173c3wvMWhUtVYgx/peJHb1 nfOHlubvzQJLjUNw7r+h9SPTaeVCO0ZuTAeacBjRmcTUwt8lJYxHBOdK907JdwcPsKbP TQ9GT9GPenPxn4u2x90BW6MOuJJ4sev5eOlrSVjY/ijsKOy+qbPB3BbcUUyzswyAEzQT f/XYuagdANKff86TF8cZKI1UNT0ENjnyHzVpXfHfYefFb33okzilhMNqXdlkYi9zLluC nJZSJoHnLmzSCWd8W2yfy/66xhyMOG+rnqkE1TbXQD/HV8yPRiL57ETm5prne7UyXdO9 Ny0g== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a71-v6si16569212pge.281.2018.10.17.00.06.18; Wed, 17 Oct 2018 00:06:34 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727495AbeJQO7s (ORCPT + 99 others); Wed, 17 Oct 2018 10:59:48 -0400 Received: from mx2.suse.de ([195.135.220.15]:59376 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727162AbeJQO7s (ORCPT ); Wed, 17 Oct 2018 10:59:48 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay1.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 5547DAD25; Wed, 17 Oct 2018 07:05:32 +0000 (UTC) Date: Wed, 17 Oct 2018 09:05:31 +0200 From: Michal Hocko To: David Rientjes 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 Message-ID: <20181017070531.GC18839@dhcp22.suse.cz> References: <20181004055842.GA22173@dhcp22.suse.cz> <20181004094637.GG22173@dhcp22.suse.cz> <20181009083326.GG8528@dhcp22.suse.cz> <20181015150325.GN18839@dhcp22.suse.cz> <20181016104855.GQ18839@dhcp22.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue 16-10-18 14:24:19, David Rientjes wrote: > On Tue, 16 Oct 2018, Michal Hocko wrote: > > > > I don't understand the point of extending smaps with yet another line. > > > > Because abusing a vma flag part is just wrong. What are you going to do > > when a next bug report states that the flag is set even though no > > userspace has set it and that leads to some malfunctioning? Can you rule > > that out? Even your abuse of the flag is surprising so why others > > wouldn't be? > > > > The flag has taken on the meaning of "thp disabled for this vma", how it > is set is not the scope of the flag. If a thp is explicitly disabled from > being eligible for thp, whether by madvise, prctl, or any future > mechanism, it should use VM_NOHUGEPAGE or show_smap_vma_flags() needs to > be modified. No, this is not the meaning which is documented nh - no-huge page advise flag and as far as I know it is only you who has complained so far. > > As I've said there are two things. Exporting PR_SET_THP_DISABLE to > > userspace so that a 3rd party process can query it. I've already > > explained why that might be useful. If you really insist on having > > a per-vma field then let's do it properly now. Are you going to agree on > > that? If yes, I am willing to spend my time on that but I am not going > > to bother if this will lead to "I want my vma field abuse anyway". > > I think what you and I want is largely irrelevant :) What's important is > that there are userspace implementations that query this today so > continuing to support it as the way to determine if a vma has been thp > disabled doesn't seem problematic and guarantees that userspace doesn't > break. Do you know of any other userspace except your usecase? Is there anything fundamental that would prevent a proper API adoption for you? -- Michal Hocko SUSE Labs