Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3317423imu; Mon, 19 Nov 2018 14:06:36 -0800 (PST) X-Google-Smtp-Source: AJdET5f5ueLBR/PWdCcv7vt1ivzFtf45a6MVd6bZG91ibt+pnpE0fTneWF+IvLtWeLx9CKYF2cz3 X-Received: by 2002:a62:6547:: with SMTP id z68-v6mr24218473pfb.169.1542665196034; Mon, 19 Nov 2018 14:06:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542665195; cv=none; d=google.com; s=arc-20160816; b=0F0TX9pKLmMGzZyhnbdct70OFmqinBdyCnFIKMm/KFlh+A5YRl1bwhyKgMeLXnsVDs dgAs7YU6zbvhQuh1eefu3J9DVm5gZtANb4Gu9DHd17utW8o/OtORtdLG52nSuKmIWJ6C zwFuqhWHHAI5b9BG/E5xqJd1ncVn/rY4MJE7HDDltnohhyveK4MvSP0Co50GKjXfG2T3 758OXHtH+pP2hweDWRZiX6Cu0wLIUzUBpPu/rsQvTHZKRQ8ac/ax3TzUN54zf6JqvUcS kSu/u1TbAHCkH6FmynHi8U5RCwcAKXHFcZGs+iA3xIXJDWVL52PeRN7YyeXDCSBDN8U3 5GMw== 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=L0ZlTV3enHxCpq4llUtEhjs+hZ9waqlhfC58LgbVFkg=; b=pawwtcynjXYzaEUUZKbxySZCHHU/juYF5aTQTuy5YirCZiwQ+N9f2Fx5Q2wU48XaCa s81Uz759T1mI6/HE0R732H8pEh3JZcAUPhrZRov1tDR29CgAvYg0TcnTjjqiRfDjtFvk AtzXK/vTmF5rGhNiwXS0+HW35EH421AyMRv634CfaAL+oOwBYbJ2s42kiQ9PoLJx8tFP La+tXQRG/rbdCgbBlRbAdQTdblIrAVDFrsOH4spYjW9yka81m7jOJcwnssgwxXG0xBF4 sMsU/LPB5wpJWrgYTf73mrOLNSbQRN6PbquwdRuUSFqkqxi3WSaXRFj6Cng662340+++ Lpgg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=oaSQYNQE; 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 y6si3901889plr.186.2018.11.19.14.06.17; Mon, 19 Nov 2018 14:06:35 -0800 (PST) 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=oaSQYNQE; 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 S1731315AbeKTIbU (ORCPT + 99 others); Tue, 20 Nov 2018 03:31:20 -0500 Received: from mail-pf1-f195.google.com ([209.85.210.195]:33804 "EHLO mail-pf1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730469AbeKTIbU (ORCPT ); Tue, 20 Nov 2018 03:31:20 -0500 Received: by mail-pf1-f195.google.com with SMTP id h3so8955854pfg.1 for ; Mon, 19 Nov 2018 14:05:37 -0800 (PST) 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=L0ZlTV3enHxCpq4llUtEhjs+hZ9waqlhfC58LgbVFkg=; b=oaSQYNQELdQ7xxWt5PSi3UmGcPSBE25FONuWrsGV7DFSzUfzw9xO6jbaPDnn6XfoGU wgONSXLeqZlWyxdOpbT6YFTeDqhXrd01DUa4TKIk1WLMhtxmLfOuht7vgLF8dCv6CfTQ A0/KZx16FzBfUEBSZ/fOOxcPMsdolAKM28NghaTUZlzpaQLp5Lmg7NO8FN61RwNmOueJ jXofbHYe5jnHcQAxgEr7EsE3Oc0uRHFSZywcp4+EegAL0P0LnxJPz282oYcMUncqIHvF lfeaET0y2cwD/GcyvI4hCU/+E6rkbYy5IOCsEFKI3YEw8AgrL1oODNHxChuacVF0sY7n dlkA== 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=L0ZlTV3enHxCpq4llUtEhjs+hZ9waqlhfC58LgbVFkg=; b=sdFsb1WpA4GrO+S+B5vQAMdrvf1C5RbqNRx22bVMz0pB+mrJv7k9RCjPgYeuHyww0g iWSPzY/iyZdqo+i4ihTt/zZnKza1eRWsGME3TqP2qqaaMPW+exwYDcr+MSjlI1JrDjSJ NINuHelZhTs6T3RpCO9Yya0Ix/m3v92smqI5XvZvgyL/KS9yFUKi9BZ+OJbwajMCjadX 1lZ5rBHALsQdyeVnsUhIwiewdwZTKjrnBTdpMuYEpXQfqsp1493tnJNjPvfjhlXwJ+bo FoLA+X+IXxhRP4WYNoHul/rJsS6TbYqv38E1/h++pCwLxNIhMM3F9cyeygrl4NJDMW/R V0/w== X-Gm-Message-State: AGRZ1gJsRYpN/lir75ps3dFAxBgN/Mlvz9GvMZc4MLSt/eK/UKVhICaS MPtB4QSLk09vfcv+YW3AQAUEEYFSV4s= X-Received: by 2002:a63:2d82:: with SMTP id t124mr21604293pgt.260.1542665136395; Mon, 19 Nov 2018 14:05:36 -0800 (PST) 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 f22-v6sm43154636pfn.177.2018.11.19.14.05.35 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 19 Nov 2018 14:05:35 -0800 (PST) Date: Mon, 19 Nov 2018 14:05:34 -0800 (PST) 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: <20181115090242.GH23831@dhcp22.suse.cz> Message-ID: References: <20181009083326.GG8528@dhcp22.suse.cz> <20181015150325.GN18839@dhcp22.suse.cz> <20181016104855.GQ18839@dhcp22.suse.cz> <20181017070531.GC18839@dhcp22.suse.cz> <20181018070031.GW18839@dhcp22.suse.cz> <20181114132306.GX23419@dhcp22.suse.cz> <20181115090242.GH23831@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 Thu, 15 Nov 2018, Michal Hocko wrote: > > The userspace had a single way to determine if thp had been disabled for a > > specific vma and that was broken with your commit. We have since fixed > > it. Modifying our software stack to start looking for some field > > somewhere else will not help anybody else that this has affected or will > > affect. I'm interested in not breaking userspace, not trying a wait and > > see approach to see if anybody else complains once we start looking for > > some other field. The risk outweighs the reward, it already broke us, and > > I'd prefer not to even open the possibility of breaking anybody else. > > I very much agree on "do not break userspace" part but this is kind of > gray area. VMA flags are a deep internal implementation detail and > nobody should really depend on it for anything important. The original > motivation for introducing it was CRIU where it is kind of > understandable. I would argue they should find a different way but it is > just too late for them. > > For this particular case there was no other bug report except for yours > and if it is possible to fix it on your end then I would really love to > make the a sensible user interface to query the status. If we are going > to change the semantic of the exported flag again then we risk yet > another breakage. > > Therefore I am asking whether changing your particular usecase to a new > interface is possible because that would allow to have a longerm > sensible user interface rather than another kludge which still doesn't > cover all the usecases (e.g. there is no way to reliably query the > madvise status after your patch). > Providing another interface is great, I have no objection other than emitting another line for every vma on the system for smaps is probably overkill for something as rare as PR_SET_THP_DISABLE. That said, I think the current handling of the "nh" flag being emitted in smaps is logical and ensures no further userspace breakage. If that is to be removed, I consider it an unnecessary risk. That would raised in code review.