Re: [PATCH] mm: don't account shared file pages in user_reserve_pages

2015-01-29 Thread Andrew Shewmaker
othed by commit c9b1d0981fcc > ("mm: limit growth of 3% hardcoded other user reserve"), > which limits the impact of this check with 128Mb (tunable via sysctl), > but it can still be a problem on small machines. > > Signed-off-by: Roman Gushchin > Cc: Andrew Morto

Re: [PATCH] mm: fix arithmetic overflow in __vm_enough_memory()

2015-01-29 Thread Andrew Shewmaker
user_reserve_kbytes is required. > > Fix this issue by switching to signed arithmetic here. > > Signed-off-by: Roman Gushchin > Cc: Andrew Morton > Cc: Andrew Shewmaker > Cc: Rik van Riel > Cc: Konstantin Khlebnikov > Cc: sta...@vger.kernel.org > --- > mm/mma

[PATCH net] Update old iproute2 and Xen Remus links

2014-12-03 Thread Andrew Shewmaker
Signed-off-by: Andrew Shewmaker --- Documentation/Changes | 2 +- net/sched/Kconfig | 7 --- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Documentation/Changes b/Documentation/Changes index 1de131b..74bdda9 100644 --- a/Documentation/Changes +++ b/Documentation/Changes

Re: [mmotm:master 81/499] WARNING: mm/built-in.o(.text+0x1acc1): Section mismatch in reference from the function reserve_mem_notifier() to the function .meminit.text:init_user_reserve()

2013-04-10 Thread Andrew Shewmaker
On Wed, Apr 10, 2013 at 12:11 AM, kbuild test robot wrote: > tree: git://git.cmpxchg.org/linux-mmotm.git master > head: 47ca352cea8ba679f803387d208c739131ecb38a > commit: 992357a07ee0697a1997c2960c3f88d02b2f2753 [81/499] mm: reinititalise > user and admin reserves if memory is added or remove

Re: [PATCH v8 3/3] mm: reinititalise user and admin reserves if memory is added or removed

2013-04-10 Thread Andrew Shewmaker
On Mon, Apr 08, 2013 at 01:37:12PM -0700, Andrew Morton wrote: > On Mon, 8 Apr 2013 15:07:38 -0400 Andrew Shewmaker wrote: > > > This patch alters the admin and user reserves of the previous patches > > in this series when memory is added or removed. > > > > If me

Re: [PATCH v8 3/3] mm: reinititalise user and admin reserves if memory is added or removed

2013-04-10 Thread Andrew Shewmaker
On Tue, Apr 9, 2013 at 4:19 PM, Andrew Morton wrote: > On Mon, 8 Apr 2013 17:00:40 -0400 Andrew Shewmaker wrote: > >> Should I add the memory notifier code to mm/nommu.c too? >> I'm guessing that if a system doesn't have an mmu that it also >> won't be hot

Re: [PATCH v8 3/3] mm: reinititalise user and admin reserves if memory is added or removed

2013-04-09 Thread Andrew Shewmaker
On Tue, Apr 9, 2013 at 6:05 PM, Simon Jeons wrote: > Hi Andrew, > > On 04/10/2013 07:56 AM, Andrew Shewmaker wrote: >> >> On Tue, Apr 9, 2013 at 4:19 PM, Andrew Morton >> wrote: >>> >>> On Mon, 8 Apr 2013 17:00:40 -0400 Andrew Shewmaker >>>

[PATCH v9 3/3] mm: reinititalise user and admin reserves if memory is added or removed

2013-04-09 Thread Andrew Shewmaker
s the same as the reserve initialization code. I tested hot addition and removal by triggering it via sysfs. The reserves shrunk when they were set high and memory was removed. They were reset higher when memory was added again. Signed-off-by: Andrew Shewmaker --- Please see first patch in serie

[PATCH v9 2/3] mm: replace hardcoded 3% with admin_reserve_pages knob

2013-04-09 Thread Andrew Shewmaker
ted to a need to modify reserves when memory is hot-added or hot-removed Signed-off-by: Andrew Shewmaker --- Documentation/sysctl/vm.txt | 30 ++ include/linux/mm.h | 1 + kernel/sysctl.c | 7 +++ mm/mmap.c | 30 +

[PATCH v9 1/3] mm: limit growth of 3% hardcoded other user reserve

2013-04-09 Thread Andrew Shewmaker
38MB yes neverno 4* 4998/5424 no 230MB yes 338MB yes * more memtesters were launched, able to allocate approximately another 100MB Future Work - Test larger memory systems. - Test an embedded image. - Test other architectures. - Time malloc microbenchmarks.

Re: [PATCH v8 3/3] mm: reinititalise user and admin reserves if memory is added or removed

2013-04-09 Thread Andrew Shewmaker
On Tue, Apr 9, 2013 at 4:19 PM, Andrew Morton wrote: > On Mon, 8 Apr 2013 17:00:40 -0400 Andrew Shewmaker wrote: > >> Should I add the memory notifier code to mm/nommu.c too? >> I'm guessing that if a system doesn't have an mmu that it also >> won't be hot

Re: [PATCH v8 3/3] mm: reinititalise user and admin reserves if memory is added or removed

2013-04-09 Thread Andrew Shewmaker
On Mon, Apr 08, 2013 at 01:37:12PM -0700, Andrew Morton wrote: > On Mon, 8 Apr 2013 15:07:38 -0400 Andrew Shewmaker wrote: > > > This patch alters the admin and user reserves of the previous patches > > in this series when memory is added or removed. > > > > If me

[PATCH v8 3/3] mm: reinititalise user and admin reserves if memory is added or removed

2013-04-08 Thread Andrew Shewmaker
This patch alters the admin and user reserves of the previous patches in this series when memory is added or removed. If memory is added and the reserves have been eliminated or increased above the default max, then we'll trust the admin. If memory is removed and there isn't enough free memory,

[PATCH v8 2/3] mm: replace hardcoded 3% with admin_reserve_pages knob

2013-04-08 Thread Andrew Shewmaker
Add an admin_reserve_kbytes knob to allow admins to change the hardcoded memory reserve to something other than 3%, which may be multiple gigabytes on large memory systems. Only about 8MB is necessary to enable recovery in the default mode, and only a few hundred MB are required even when overcommi

[PATCH v8 1/3] mm: limit growth of 3% hardcoded other user reserve

2013-04-08 Thread Andrew Shewmaker
338MB yes neverno 4* 4998/5424 no 230MB yes 338MB yes * more memtesters were launched, able to allocate approximately another 100MB Future Work - Test larger memory systems. - Test an embedded image. - Test other architectures. - Time malloc microbenchm

Re: [PATCH v7 2/2] mm: replace hardcoded 3% with admin_reserve_pages knob

2013-04-08 Thread Andrew Shewmaker
On Sat, Apr 6, 2013 at 6:48 PM, Simon Jeons wrote: > Hi Andrew, > > On 04/05/2013 11:02 PM, Andrew Shewmaker wrote: >> >> On Wed, Apr 3, 2013 at 9:50 PM, Simon Jeons wrote: >>>> >>>> FAQ >>>> >> ... >>>> >>>>

Re: [PATCH v7 2/2] mm: replace hardcoded 3% with admin_reserve_pages knob

2013-04-05 Thread Andrew Shewmaker
On Wed, Apr 3, 2013 at 9:50 PM, Simon Jeons wrote: >> FAQ >> ... >> * How do you calculate a minimum useful reserve? >> >> A user or the admin needs enough memory to login and perform >> recovery operations, which includes, at a minimum: >> >> sshd or login + bash (or some other shel

Re: [PATCH v6 1/2] mm: limit growth of 3% hardcoded other user reserve

2013-03-28 Thread Andrew Shewmaker
On Wed, Mar 27, 2013 at 02:28:32PM -0700, Andrew Morton wrote: > On Mon, 18 Mar 2013 17:44:42 -0400 Andrew Shewmaker wrote: > > > Add user_reserve_kbytes knob. > > > > Limit the growth of the memory reserved for other user > > processes to min(3% current pr

[PATCH v7 2/2] mm: replace hardcoded 3% with admin_reserve_pages knob

2013-03-25 Thread Andrew Shewmaker
5001/5427 no 230MB yes 338MB yes neverno 4* 4998/5424 no 230MB yes 338MB yes * more memtesters were launched, able to allocate approximately another 100MB Future Work - Test larger memory systems. - Test an embedded image. - Time malloc mic

[PATCH v7 1/2] mm: limit growth of 3% hardcoded other user reserve

2013-03-25 Thread Andrew Shewmaker
001/5427 no 230MB yes 338MB yes neverno 4* 4998/5424 no 230MB yes 338MB yes * more memtesters were launched, able to allocate approximately another 100MB Future Work - Test larger memory systems. - Test an embedded image. - Time malloc microbe

[PATCH v6 1/2] mm: limit growth of 3% hardcoded other user reserve

2013-03-18 Thread Andrew Shewmaker
everno 1 5332/5428 no 0MB no 50MB yes neverno 1 5293/5429 no 0MB no 90MB yes neverno 1 5001/5427 no 230MB yes 338MB yes neverno 4* 4998/5424 no 230MB yes 338MB yes *

[PATCH v6 2/2] mm: replace hardcoded 3% with admin_reserve_pages knob

2013-03-18 Thread Andrew Shewmaker
everno 1 5323/5428 no 0MB no 10MB barely neverno 1 5332/5428 no 0MB no 50MB yes neverno 1 5293/5429 no 0MB no 90MB yes neverno 1 5001/5427 no 230MB yes 338M

Re: [PATCH v5 1/2] mm: limit growth of 3% hardcoded other user reserve

2013-03-13 Thread Andrew Shewmaker
On Tue, Mar 12, 2013 at 04:01:36PM -0700, Andrew Morton wrote: > On Wed, 6 Mar 2013 18:52:01 -0500 Andrew Shewmaker wrote: > > > Add user_reserve_pages knob. > > > > Limit the growth of the memory reserved for other user > > processes to min(3% curre

[PATCH v5 2/2] mm: replace hardcoded 3% with admin_reserve_pages knob

2013-03-06 Thread Andrew Shewmaker
-off-by: Andrew Shewmaker --- v5: * Custom sysctl handler was unnecessary now using proc_doulongvec_minmax() v4: * Rebased onto v3.8-mmotm-2013-03-01-15-50 * No longer assumes 4kb pages * Code duplicated for nommu v3: * New patch summary because it wasn't unique New is "m

[PATCH v5 1/2] mm: limit growth of 3% hardcoded other user reserve

2013-03-06 Thread Andrew Shewmaker
of each. This only affects OVERCOMMIT_NEVER mode. Signed-off-by: Andrew Shewmaker --- v5: * Change k in min(3% process size, k) into user_reserve_pages knob * user_reserve_pages defaults to min(3% free pages, 128MB) previous k=8MB wasn't enough for OVERCOMMIT_NEVER mode and 128MB w

Re: [PATCH v4 001/002] mm: limit growth of 3% hardcoded other user reserve

2013-03-06 Thread Andrew Shewmaker
On Wed, Mar 06, 2013 at 07:46:29AM +0800, Simon Jeons wrote: > On 03/06/2013 07:38 AM, Andrew Shewmaker wrote: > >Limit the growth of the memory reserved for other processes > >to the smaller of 3% or 8MB. > > > >This affects only OVERCOMMIT_NEVER. > > &

[PATCH v4 002/002] mm: replace hardcoded 3% with admin_reserve_pages knob

2013-03-05 Thread Andrew Shewmaker
Add an admin_reserve_pages knob to allow admins of large memory systems to change the hardcoded memory reserve to something other than 3%. This affects OVERCOMMIT_GUESS and OVERCOMMIT_NEVER. admin_reserve_pages is initialized to min(3% free pages, 8MB) Signed-off-by: Andrew Shewmaker

[PATCH v4 001/002] mm: limit growth of 3% hardcoded other user reserve

2013-03-05 Thread Andrew Shewmaker
Limit the growth of the memory reserved for other processes to the smaller of 3% or 8MB. This affects only OVERCOMMIT_NEVER. Signed-off-by: Andrew Shewmaker --- Rebased onto v3.8-mmotm-2013-03-01-15-50 No longer assumes 4kb pages. Code duplicated for nommu. diff --git a/mm/mmap.c b/mm

[PATCH v3 002/002] mm: replace hardcoded 3% with admin_reserve_pages knob

2013-03-01 Thread Andrew Shewmaker
, bash, and top to recover if necessary. This affects OVERCOMMIT_GUESS and OVERCOMMIT_NEVER modes. Signed-off-by: Andrew Shewmaker --- I changed the name of the knob from "rootuser" to "admin" because it better matches the cap_sys_admin conditional. Documentatio

[PATCH v3 001/002] mm: limit growth of 3% hardcoded other user reserve

2013-03-01 Thread Andrew Shewmaker
Limit the growth of the memory reserved for other processes to the smaller of 3% or 2000 pages. This affects OVERCOMMIT_NEVER mode. Signed-off-by: Andrew Shewmaker --- I had simply removed the reserve previously, but that caused forks to fail easily. This allows a user to recover similar to

Re: [RFC PATCH v2 1/2] mm: tuning hardcoded reserved memory

2013-03-01 Thread Andrew Shewmaker
On Fri, Mar 01, 2013 at 10:40:43AM +0800, Ric Mason wrote: > On 02/28/2013 11:48 AM, Andrew Shewmaker wrote: > >On Thu, Feb 28, 2013 at 02:12:00PM -0800, Andrew Morton wrote: > >>On Wed, 27 Feb 2013 15:56:30 -0500 > >>Andrew Shewmaker wrote: > >> > >>

Re: [RFC PATCH v2 1/2] mm: tuning hardcoded reserved memory

2013-02-28 Thread Andrew Shewmaker
On Thu, Feb 28, 2013 at 02:12:00PM -0800, Andrew Morton wrote: > On Wed, 27 Feb 2013 15:56:30 -0500 > Andrew Shewmaker wrote: > > > The following patches are against the mmtom git tree as of February 27th. > > > > The first patch only affects OVERCOMMIT_NEVER mode, e

Re: [RFC PATCH v2 2/2] mm: tuning hardcoded reserved memory

2013-02-28 Thread Andrew Shewmaker
On Thu, Feb 28, 2013 at 02:14:41PM -0800, Andrew Morton wrote: > On Wed, 27 Feb 2013 16:09:25 -0500 > Andrew Shewmaker wrote: > > > Add a rootuser_reserve_pages knob to allow admins of large memory > > systems running with overcommit disabled to change the hardcoded

[RFC PATCH v2 2/2] mm: tuning hardcoded reserved memory

2013-02-27 Thread Andrew Shewmaker
Add a rootuser_reserve_pages knob to allow admins of large memory systems running with overcommit disabled to change the hardcoded memory reserve to something other than 3%. Signed-off-by: Andrew Shewmaker --- Patch based off of mmotm git tree as of February 27th. I set rootuser_reserve

[RFC PATCH v2 1/2] mm: tuning hardcoded reserved memory

2013-02-27 Thread Andrew Shewmaker
for the root user with a tunable knob. Signed-off-by: Andrew Shewmaker --- __vm_enough_memory reserves 3% of free pages with the default overcommit mode and 6% when overcommit is disabled. These hardcoded values have become less reasonable as memory sizes have grown. On scientific clusters

[RFC PATCH v1 1/1] mm: tuning hardcoded reserved memory

2013-02-25 Thread Andrew Shewmaker
and when it is disabled. I've made it tunable in private patches, and I plan on submitting some version of them, but I can't decide whether a ratio or a byte count would be more acceptable. What would people prefer see? Signed-off-by: Andrew Shewmaker diff --git a/mm/mmap.c b/mm/mmap

Re: Disabling x86 System Management Mode

2007-04-18 Thread Andrew Shewmaker
uff. http://www.linuxbios.org/pipermail/linuxbios/2006-December/017861.html same thread, but continued http://www.linuxbios.org/pipermail/linuxbios/2007-January/017905.html -- Andrew Shewmaker - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a mes