Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp501588imu; Tue, 20 Nov 2018 02:37:22 -0800 (PST) X-Google-Smtp-Source: AFSGD/VkmIJiLbO1nkmFX1G6CUAb+Y6rQPJwyOycwQKJQMVnPh9ROtJiU3MXpnZLekyY96GCnHWM X-Received: by 2002:a65:520a:: with SMTP id o10mr1476965pgp.276.1542710242404; Tue, 20 Nov 2018 02:37:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542710242; cv=none; d=google.com; s=arc-20160816; b=YFAAk5ndZbaWgpKlo5Cn9xLkRhV3p54yQidiZIiKr1xH03D65wzDOCKfR2xxo4gzZp nKOyeY6ahI5JJJkcqgWqAGstqHu1Mr6j9xDeOX+Hh//zjJjMcgt9ZUkgS9Kq/hxwBv7g eg53obO9wCmXizWKUPXZkvWidGwfO48J94l4cdeZlJeKpRY3icCN6qB8MyBnErYm+bzD pxJaolI4s6tkHzasoPMmAk7XrFBB8/UCHH5rwR9zioARNf3T0QGguMz1MvoMxKk7h4J1 NCNYCC00iRrXVawxMeBmFwc0MGBOcCPfjaqNsdoc+DUymVv76myAefoMt8VN0cSYNV36 RShg== 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 :message-id:date:subject:cc:to:from; bh=cZ6VZMIljRfGjZ5SmAgXfmbGgE7sRwEooFqEb0nTS0I=; b=oQQB/U5QC0ICZRaEnzPe6hia3G1dt4bFWgow/seRFUx35gBKqL5kmzv93gIDQ3yHtu hoJ6j1jjIq84q1DS7SiyXAcx6v7klSN0bFUE9HimEsFZ9ZnjWfK/7RyNrG7V+Lhj2d5g daFrHgvO0ukv46wTYoUjcaUnI77GvP3Ra3Ev1JGYT4gI5Xo3QrswRojWcdPd3hih7Tza j3ATSn3UcITJUijCclwyDDznkDQRXFkAFz+Tnk0lMt5kykjS/6P/4q4NC89nGkmsSP5o 6IbDhaARPmIhJaFzECjzXW0Cydnaw6OF/T6RWd+M8rBzwykLKQ/wZ/CjxtirNQDDVg9w vTyQ== 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 u3-v6si8723830pls.137.2018.11.20.02.37.07; Tue, 20 Nov 2018 02:37:22 -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; 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 S1728509AbeKTVD6 (ORCPT + 99 others); Tue, 20 Nov 2018 16:03:58 -0500 Received: from mail-ed1-f66.google.com ([209.85.208.66]:38409 "EHLO mail-ed1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726569AbeKTVD6 (ORCPT ); Tue, 20 Nov 2018 16:03:58 -0500 Received: by mail-ed1-f66.google.com with SMTP id h50so1463608ede.5; Tue, 20 Nov 2018 02:35:30 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=cZ6VZMIljRfGjZ5SmAgXfmbGgE7sRwEooFqEb0nTS0I=; b=jvqbFZiPQ41R1sX0aaDQ4MujZ1JyJ5c1hRNS/1nW7OnfT3j1nauKTvV/+q8zFgwrVK 9mutI6e7IOq05akYIzeHndBzggbungc9OBtjSOa++0YwQWhOoNvwwTLPcGUe2bG2xUMB /FHk3B1W5KgoZ9gCgVeYipjhlYmxpcK/I37oYGZv6sR/KgDBtYTCfF39i4xriycnSqPZ yK+ldslXC5vyhRAebvP+oqcr0k1SPcuFIFKteN7Ig9pAjuXRfOX9kllOdFSI0j42lRP6 AIZOAoAVokq3an3pHDOQA/Cs1XtCQ0osCHhgLplfuOzaeoszRi/sHQssjWha5fUyjWpF 3tEw== X-Gm-Message-State: AA+aEWZGilvT4UAjblMpMqVbDjwwqBgOcEsMLjeAuxc2FVA0GNGeUpF/ icetRbJEoc9dfrvUY3Bd/Q2n5LtU X-Received: by 2002:a50:a7c1:: with SMTP id i59-v6mr1797998edc.37.1542710129568; Tue, 20 Nov 2018 02:35:29 -0800 (PST) Received: from tiehlicka.suse.cz (prg-ext-pat.suse.com. [213.151.95.130]) by smtp.gmail.com with ESMTPSA id a15-v6sm5967233ejj.5.2018.11.20.02.35.28 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 20 Nov 2018 02:35:28 -0800 (PST) From: Michal Hocko To: linux-api@vger.kernel.org Cc: Andrew Morton , Alexey Dobriyan , , LKML , Dan Williams , David Rientjes , Jan Kara , Michal Hocko Subject: [RFC PATCH 0/3] THP eligibility reporting via proc Date: Tue, 20 Nov 2018 11:35:12 +0100 Message-Id: <20181120103515.25280-1-mhocko@kernel.org> X-Mailer: git-send-email 2.19.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, this series of three patches aims at making THP eligibility reporting much more robust and long term sustainable. The trigger for the change is a regression report [1] and the long follow up discussion. In short the specific application didn't have good API to query whether a particular mapping can be backed by THP so it has used VMA flags to workaround that. These flags represent a deep internal state of VMAs and as such they should be used by userspace with a great deal of caution. A similar has happened for [2] when users complained that VM_MIXEDMAP is no longer set on DAX mappings. Again a lack of a proper API led to an abuse. The first patch in the series tries to emphasise that that the semantic of flags might change and any application consuming those should be really careful. The remaining two patches provide a more suitable interface to address [1] and provide a consistent API to query the THP status both for each VMA and process wide as well. [1] http://lkml.kernel.org/r/http://lkml.kernel.org/r/alpine.DEB.2.21.1809241054050.224429@chino.kir.corp.google.com [2] http://lkml.kernel.org/r/20181002100531.GC4135@quack2.suse.cz