From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A24C7C433F5 for ; Sun, 31 Oct 2021 02:32:16 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 1C9E560F0F for ; Sun, 31 Oct 2021 02:32:14 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 1C9E560F0F Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvack.org Received: by kanga.kvack.org (Postfix) id 34262940008; Sat, 30 Oct 2021 22:32:13 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 2CA6F940007; Sat, 30 Oct 2021 22:32:13 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 143D8940008; Sat, 30 Oct 2021 22:32:13 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0028.hostedemail.com [216.40.44.28]) by kanga.kvack.org (Postfix) with ESMTP id 01FD7940007 for ; Sat, 30 Oct 2021 22:32:12 -0400 (EDT) Received: from smtpin11.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 9BAC63EF1B for ; Sun, 31 Oct 2021 02:32:12 +0000 (UTC) X-FDA: 78755158104.11.2D175DF Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf19.hostedemail.com (Postfix) with ESMTP id 3C49EB0000A7 for ; Sun, 31 Oct 2021 02:32:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=YdEhdcEX2r4TtLJMXFuodi5EJcFx7uX9qTnwsGSmkFc=; b=Js+H5NBNANgCRDVhQvqX7o9WBJ tJiGk78fRMliMjwpZYRG+H4LIkaXtpMHRWVCd4hI2uYlLCswVBiUIAyocU0K3mpGwQV1u9bf68ewq NauIaae2zwunD264xCR5WaKInAQQo6+SHKgkMT0YS6bmBBVnnFe5qYpkAICpY8cBmOkUEdw3E8jC+ Ch0SIHEvPhQGaOdwSH5/1RS1YU0yfr2LGvXcU/NxZ8Yhv1xI2cXF6OPzsbcMUxWXgFkp7e/XRYzwI i1wJGufjNl9ue1IlIJAbYn2y/bBroKKQZwBy3XMf2yiAvhqV8a3eyr3Yse5Dle2mgN40nX+qxmjUa 5QMHuZBQ==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1mh0ae-002neL-Qn; Sun, 31 Oct 2021 02:29:25 +0000 Date: Sun, 31 Oct 2021 02:28:56 +0000 From: Matthew Wilcox To: Mina Almasry Cc: David Hildenbrand , Nathan Lewis , Yu Zhao , "Paul E . McKenney" , Jonathan Corbet , Andrew Morton , Peter Xu , Ivan Teterevkov , Florian Schmidt , linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org Subject: Re: [PATCH v1] mm: Add /proc/$PID/pageflags Message-ID: References: <20211028205854.830200-1-almasrymina@google.com> <2fede4d2-9d82-eac9-002b-9a7246b2c3f8@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Rspamd-Server: rspam06 X-Rspamd-Queue-Id: 3C49EB0000A7 X-Stat-Signature: cbne9sfkh5s5aq7pr6uyxbopf6jmtrfq Authentication-Results: imf19.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=Js+H5NBN; spf=none (imf19.hostedemail.com: domain of willy@infradead.org has no SPF policy when checking 90.155.50.34) smtp.mailfrom=willy@infradead.org; dmarc=none X-HE-Tag: 1635647526-239680 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Sat, Oct 30, 2021 at 03:06:31PM -0700, Mina Almasry wrote: > Not quite sufficient, no. The process may have lots of non performance > critical memory. The network service cares about specific memory > ranges and wants to know if those are backed by hugepages. Would it make sense to extend mincore() instead? We have 7 remaining bits per byte. But my question is, what information do you really want? Do you want to know if the memory range is backed by huge pages, or do you want to know if PMDs are being used to map the backing memory? What information would you want to see if, say, 64kB entries are being used on a 4kB ARM system where there's hardware support for those. Other architectures also have support for TLB entries that are intermediate between PTE and PMD sizes.