Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp2400873yba; Thu, 25 Apr 2019 16:05:48 -0700 (PDT) X-Google-Smtp-Source: APXvYqw0ZRMUp1vDS/NCWji97DuWAOkbIMIUcH/+r+L8mjxzoux6QnwGY3i71cCs7sTlqHUnq+7G X-Received: by 2002:a63:4548:: with SMTP id u8mr39783726pgk.435.1556233548385; Thu, 25 Apr 2019 16:05:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556233548; cv=none; d=google.com; s=arc-20160816; b=KX0xRaDwwQt5KbUlQH1Q5HfowpqR58PoZp6mKVyygt/rDMAoOPR6iSDUh/tT2SfveH 0Is83qdgnRl3I/ZCrH3Lsd59N1p4xZwxY9zycmyYsbq/CU1WLG1xWjGclhJee6RMxTuj okU9gO0pWoIthkd4NV5ykEhFLgRio8ixNl48jhGjwyq20Pd24I3UU7xvjmU05WJol7e6 SlsvQwBTYHVr14q0CX/mozJYQbLomjU7qilWv7C/EaAJsRjj1ZoD3LHHAPZIbkZI5BQe PvlURWmpQceqzI5MIp6x88l5yKXjhwv9ZFTs0WIFv6UBHUMB+Wcw6yAtvCW9ES4i8HXc WOwQ== 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 :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=Rv3fvvpY24szjWj9SFxINQPZGo0USdkDiFSXpULuIuE=; b=S5O0+5Gi+dAApnAx0Ny1iek0O+CvHba2D54+5ZQdrhIRMPmOXf+r4eK4lF/4SaLhNm BUJ7Og3JH/uQyUIqwicu0L9SD5PUFNV86v41D+gqaK3Ws31y0TLgET86d6p8urJpy4MJ HqQchYC1M0NXT+ILk1ckL0WXKzME4i6wng2cr3lmJdX8DqrrdmVtuZuHlc9Z2GjKEYMS RS2xMANPEmQRxY7C6KJbLtNs+KTeTbrplmWiyzgr7oKUASgDXQHliA850fHkScX6cbHr MO1ujAr4ThMH+7PzbsH5TVWfzhSQAn4GhYOKdc+ByirirX6ibhnZzVo1KDxRy7PyH5d3 ZHaA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Ails9T8C; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 24si23651893pfi.21.2019.04.25.16.05.33; Thu, 25 Apr 2019 16:05:48 -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=@kernel.org header.s=default header.b=Ails9T8C; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731037AbfDYWGy (ORCPT + 99 others); Thu, 25 Apr 2019 18:06:54 -0400 Received: from mail.kernel.org ([198.145.29.99]:57628 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725937AbfDYWGy (ORCPT ); Thu, 25 Apr 2019 18:06:54 -0400 Received: from akpm3.svl.corp.google.com (unknown [104.133.8.65]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 710C0206C1; Thu, 25 Apr 2019 22:06:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1556230013; bh=pTQtAHspL95zxJddIdjsMFYFi1GDq9/62hbgXWVMqjo=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=Ails9T8CojwAO9sK1f6aZbChd79rBPu0v09MKfCS9kWfNKaWDQ6o88pvABoz9fOMH hWb5NpD001XQfJi9etUcPuR731QdXDRgtb3iNU0xkiPRhDKhF6aHP+4OBDWLzj492G Yjlt0G9O9yVngR2HUsyXFyvABHSc/E82jEWNEXhc= Date: Thu, 25 Apr 2019 15:06:52 -0700 From: Andrew Morton To: Joel Savitz Cc: linux-kernel@vger.kernel.org, Alexey Dobriyan , Vlastimil Babka , "Aneesh Kumar K.V" , Michael Ellerman , Ram Pai , Andrea Arcangeli , Huang Ying , Sandeep Patil , Rafael Aquini , linux-fsdevel@vger.kernel.org Subject: Re: [PATCH] fs/proc: add VmTaskSize field to /proc/$$/status Message-Id: <20190425150652.627fb21a40c18e1c32ed2125@linux-foundation.org> In-Reply-To: <1556225867-458-1-git-send-email-jsavitz@redhat.com> References: <1556225867-458-1-git-send-email-jsavitz@redhat.com> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.31; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 25 Apr 2019 16:57:47 -0400 Joel Savitz wrote: > Currently, there is no fast mechanism to get the virtual memory size of > the current process from userspace. This information is available to the > user through several means, one being a linear search of the entire address > space. This is the method used by a component of the libhugetlb kernel > test, and using the mechanism proposed in this patch, the time complexity > of that test would be upgraded to constant time from linear time. This is > especially relevant on 64-bit architechtures where a linear search of > the address space could take an absurd amount of time. Using this > mechanism, the modification to the test component would be portable > across all architechtures. Please include all details on the observed performance improvements. > fs/proc/task_mmu.c | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) Please update Documentation/filesystems/proc.txt.