From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755099Ab2CMIW4 (ORCPT ); Tue, 13 Mar 2012 04:22:56 -0400 Received: from mail-pz0-f46.google.com ([209.85.210.46]:58858 "EHLO mail-pz0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752265Ab2CMIWx (ORCPT ); Tue, 13 Mar 2012 04:22:53 -0400 Date: Tue, 13 Mar 2012 16:28:18 +0800 From: Zheng Liu To: Kautuk Consul Cc: minchan@kernel.org, riel@redhat.com, kosaki.motohiro@jp.fujitsu.com, Zheng Liu , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: Fwd: Control page reclaim granularity Message-ID: <20120313082818.GA5421@gmail.com> Mail-Followup-To: Kautuk Consul , minchan@kernel.org, riel@redhat.com, kosaki.motohiro@jp.fujitsu.com, Zheng Liu , linux-mm@kvack.org, linux-kernel@vger.kernel.org References: <20120313024818.GA7125@barrios> <1331620214-4893-1-git-send-email-wenqing.lz@taobao.com> <20120313064832.GA4968@gmail.com> <4F5EF563.5000700@openvz.org> <20120313080535.GA5243@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Mar 13, 2012 at 01:38:56PM +0530, Kautuk Consul wrote: > > > > I agree, but that's not my point. > > > > All I'm saying is that we probably don't want to give normal > > unprivileged usermode apps > > the capability to set the mapping to AS_UNEVICTABLE as anyone can then > > write an application > > that hogs memory without allowing the kernel to free it through memory reclaim. Yes, I think so. But it seems that there has some codes that are possible to be abused. For example, as I said previously, applications can mmap a normal data file with PROT_EXEC flag. Then this file gets a high priority to keep in memory (commit: 8cab4754). So my point is that we cannot control applications how to use these mechanisms. We just provide them and let applications to choose how to use them. :-) Regards, Zheng > > Sorry, I mean : > "... that hogs kernel unmapped page-cache memory without allowing the > kernel to free it through memory reclaim."