Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752786AbbLNJIf (ORCPT ); Mon, 14 Dec 2015 04:08:35 -0500 Received: from mail-lf0-f42.google.com ([209.85.215.42]:36516 "EHLO mail-lf0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752612AbbLNJIb (ORCPT ); Mon, 14 Dec 2015 04:08:31 -0500 Date: Mon, 14 Dec 2015 12:08:27 +0300 From: Cyrill Gorcunov To: Konstantin Khlebnikov Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, Linus Torvalds Subject: Re: [PATCH RFC] mm: rework virtual memory accounting Message-ID: <20151214090827.GA14045@uranus> References: <145008075795.15926.4661774822205839673.stgit@zurg> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <145008075795.15926.4661774822205839673.stgit@zurg> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1359 Lines: 31 On Mon, Dec 14, 2015 at 11:12:38AM +0300, Konstantin Khlebnikov wrote: > Here several rated changes bundled together: > * keep vma counting if CONFIG_PROC_FS=n, will be used for limits > * replace mm->shared_vm with better defined mm->data_vm > * account anonymous executable areas as executable > * account file-backed growsdown/up areas as stack > * drop struct file* argument from vm_stat_account > * enforce RLIMIT_DATA for size of data areas > > This way code looks cleaner: now code/stack/data > classification depends only on vm_flags state: > > VM_EXEC & ~VM_WRITE -> code (VmExe + VmLib in proc) > VM_GROWSUP | VM_GROWSDOWN -> stack (VmStk) > VM_WRITE & ~VM_SHARED & !stack -> data (VmData) > > The rest (VmSize - VmData - VmStk - VmExe - VmLib) could be called "shared", > but that might be strange beasts like readonly-private or VM_IO areas. > > RLIMIT_AS limits whole address space "VmSize" > RLIMIT_STACK limits stack "VmStk" (but each vma individually) > RLIMIT_DATA now limits "VmData" > > Signed-off-by: Konstantin Khlebnikov Looks OK to me. Lets wait for Linus' opinion. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/