From mboxrd@z Thu Jan 1 00:00:00 1970 From: Balbir Singh Subject: Re: [-mm PATCH] Memory controller improve user interface Date: Thu, 30 Aug 2007 04:14:15 +0530 Message-ID: <46D5F6BF.2080607@linux.vnet.ibm.com> References: <20070829111030.9987.8104.sendpatchset@balbir-laptop> <1188413148.28903.113.camel@localhost> <46D5ED5C.9030405@linux.vnet.ibm.com> <1188425894.28903.140.camel@localhost> <46D5F2BB.8010203@linux.vnet.ibm.com> <1188427000.28903.148.camel@localhost> Reply-To: balbir-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1188427000.28903.148.camel@localhost> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: containers-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org Errors-To: containers-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org To: Dave Hansen Cc: Linux Kernel Mailing List , Linux MM Mailing List , David Rientjes , Linux Containers , Andrew Morton , Paul Menage List-Id: containers.vger.kernel.org Dave Hansen wrote: > On Thu, 2007-08-30 at 03:57 +0530, Balbir Singh wrote: >> True, mmap() is a good example of such an interface for developers, I >> am not sure about system admins though. >> >> To quote Andrew >> >> Reporting tools could run getpagesize() and do the arithmetic, but we >> generally try to avoid exposing PAGE_SIZE, HZ, etc to userspace in this >> manner. >> > > Well, rounding to PAGE_SIZE exposes PAGE_SIZE as well, just in a > non-intuitive fashion. :) > Agreed, but the user might choose to ignore it altogether. > If we're going to modify what the user specifies, we should probably at > least mandate that writes are only a "suggestion" and users must read > back the value to ensure what actually got committed. > Agreed, excellent suggestion! > If we're going to round in any direction, shouldn't we round up? If a > user specifies 4097 bytes and uses two pages, we don't want to complain > when they hit that second page. > Absolutely, I used rounding to mean round up, truncation for rounding down. -- Warm Regards, Balbir Singh Linux Technology Center IBM, ISTL From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1760767AbXH2Wpc (ORCPT ); Wed, 29 Aug 2007 18:45:32 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1755301AbXH2WpW (ORCPT ); Wed, 29 Aug 2007 18:45:22 -0400 Received: from E23SMTP06.au.ibm.com ([202.81.18.175]:52846 "EHLO e23smtp06.au.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754946AbXH2WpV (ORCPT ); Wed, 29 Aug 2007 18:45:21 -0400 Message-ID: <46D5F6BF.2080607@linux.vnet.ibm.com> Date: Thu, 30 Aug 2007 04:14:15 +0530 From: Balbir Singh Reply-To: balbir@linux.vnet.ibm.com Organization: IBM User-Agent: Thunderbird 1.5.0.12 (X11/20070604) MIME-Version: 1.0 To: Dave Hansen CC: Andrew Morton , Linux Kernel Mailing List , Linux MM Mailing List , David Rientjes , Linux Containers , Paul Menage Subject: Re: [-mm PATCH] Memory controller improve user interface References: <20070829111030.9987.8104.sendpatchset@balbir-laptop> <1188413148.28903.113.camel@localhost> <46D5ED5C.9030405@linux.vnet.ibm.com> <1188425894.28903.140.camel@localhost> <46D5F2BB.8010203@linux.vnet.ibm.com> <1188427000.28903.148.camel@localhost> In-Reply-To: <1188427000.28903.148.camel@localhost> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Dave Hansen wrote: > On Thu, 2007-08-30 at 03:57 +0530, Balbir Singh wrote: >> True, mmap() is a good example of such an interface for developers, I >> am not sure about system admins though. >> >> To quote Andrew >> >> Reporting tools could run getpagesize() and do the arithmetic, but we >> generally try to avoid exposing PAGE_SIZE, HZ, etc to userspace in this >> manner. >> > > Well, rounding to PAGE_SIZE exposes PAGE_SIZE as well, just in a > non-intuitive fashion. :) > Agreed, but the user might choose to ignore it altogether. > If we're going to modify what the user specifies, we should probably at > least mandate that writes are only a "suggestion" and users must read > back the value to ensure what actually got committed. > Agreed, excellent suggestion! > If we're going to round in any direction, shouldn't we round up? If a > user specifies 4097 bytes and uses two pages, we don't want to complain > when they hit that second page. > Absolutely, I used rounding to mean round up, truncation for rounding down. -- Warm Regards, Balbir Singh Linux Technology Center IBM, ISTL From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from sd0109e.au.ibm.com (d23rh905.au.ibm.com [202.81.18.225]) by e23smtp04.au.ibm.com (8.13.1/8.13.1) with ESMTP id l7TMiJhi021644 for ; Thu, 30 Aug 2007 08:44:19 +1000 Received: from d23av01.au.ibm.com (d23av01.au.ibm.com [9.190.250.242]) by sd0109e.au.ibm.com (8.13.8/8.13.8/NCO v8.5) with ESMTP id l7TMlqGC203364 for ; Thu, 30 Aug 2007 08:47:52 +1000 Received: from d23av01.au.ibm.com (loopback [127.0.0.1]) by d23av01.au.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id l7TMiIta028973 for ; Thu, 30 Aug 2007 08:44:18 +1000 Message-ID: <46D5F6BF.2080607@linux.vnet.ibm.com> Date: Thu, 30 Aug 2007 04:14:15 +0530 From: Balbir Singh Reply-To: balbir@linux.vnet.ibm.com MIME-Version: 1.0 Subject: Re: [-mm PATCH] Memory controller improve user interface References: <20070829111030.9987.8104.sendpatchset@balbir-laptop> <1188413148.28903.113.camel@localhost> <46D5ED5C.9030405@linux.vnet.ibm.com> <1188425894.28903.140.camel@localhost> <46D5F2BB.8010203@linux.vnet.ibm.com> <1188427000.28903.148.camel@localhost> In-Reply-To: <1188427000.28903.148.camel@localhost> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Sender: owner-linux-mm@kvack.org Return-Path: To: Dave Hansen Cc: Andrew Morton , Linux Kernel Mailing List , Linux MM Mailing List , David Rientjes , Linux Containers , Paul Menage List-ID: Dave Hansen wrote: > On Thu, 2007-08-30 at 03:57 +0530, Balbir Singh wrote: >> True, mmap() is a good example of such an interface for developers, I >> am not sure about system admins though. >> >> To quote Andrew >> >> Reporting tools could run getpagesize() and do the arithmetic, but we >> generally try to avoid exposing PAGE_SIZE, HZ, etc to userspace in this >> manner. >> > > Well, rounding to PAGE_SIZE exposes PAGE_SIZE as well, just in a > non-intuitive fashion. :) > Agreed, but the user might choose to ignore it altogether. > If we're going to modify what the user specifies, we should probably at > least mandate that writes are only a "suggestion" and users must read > back the value to ensure what actually got committed. > Agreed, excellent suggestion! > If we're going to round in any direction, shouldn't we round up? If a > user specifies 4097 bytes and uses two pages, we don't want to complain > when they hit that second page. > Absolutely, I used rounding to mean round up, truncation for rounding down. -- Warm Regards, Balbir Singh Linux Technology Center IBM, ISTL -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org