<feed xmlns='http://www.w3.org/2005/Atom'>
<title>snowball/igloo-kernel.git/mm, branch 10</title>
<subtitle>Igloo kernel</subtitle>
<id>https://git.etezian.org/cgit.cgi/snowball/igloo-kernel.git/atom?h=10</id>
<link rel='self' href='https://git.etezian.org/cgit.cgi/snowball/igloo-kernel.git/atom?h=10'/>
<link rel='alternate' type='text/html' href='https://git.etezian.org/cgit.cgi/snowball/igloo-kernel.git/'/>
<updated>2009-05-07T19:03:41+00:00</updated>
<entry>
<title>NOMMU: Don't check vm_region::vm_start is page aligned in add_nommu_region()</title>
<updated>2009-05-07T19:03:41+00:00</updated>
<author>
<name>David Howells</name>
<email>dhowells@redhat.com</email>
</author>
<published>2009-05-07T10:41:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.etezian.org/cgit.cgi/snowball/igloo-kernel.git/commit/?id=8c9ed899b44c19e81859fbb0e9d659fe2f8630fc'/>
<id>urn:sha1:8c9ed899b44c19e81859fbb0e9d659fe2f8630fc</id>
<content type='text'>
Don't check vm_region::vm_start is page aligned in add_nommu_region() because
the region may reflect some non-page-aligned mapped file, such as could be
obtained from RomFS XIP.

Signed-off-by: David Howells &lt;dhowells@redhat.com&gt;
Acked-by: Greg Ungerer &lt;gerg@uclinux.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>nommu: make the initial mmap allocation excess behaviour Kconfig configurable</title>
<updated>2009-05-06T23:36:10+00:00</updated>
<author>
<name>David Howells</name>
<email>dhowells@redhat.com</email>
</author>
<published>2009-05-06T23:03:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.etezian.org/cgit.cgi/snowball/igloo-kernel.git/commit/?id=fc4d5c292b68ef02514d2072dcbf82d090c34875'/>
<id>urn:sha1:fc4d5c292b68ef02514d2072dcbf82d090c34875</id>
<content type='text'>
NOMMU mmap() has an option controlled by a sysctl variable that determines
whether the allocations made by do_mmap_private() should have the excess
space trimmed off and returned to the allocator.  Make the initial setting
of this variable a Kconfig configuration option.

The reason there can be excess space is that the allocator only allocates
in power-of-2 size chunks, but mmap()'s can be made in sizes that aren't a
power of 2.

There are two alternatives:

 (1) Keep the excess as dead space.  The dead space then remains unused for the
     lifetime of the mapping.  Mappings of shared objects such as libc, ld.so
     or busybox's text segment may retain their dead space forever.

 (2) Return the excess to the allocator.  This means that the dead space is
     limited to less than a page per mapping, but it means that for a transient
     process, there's more chance of fragmentation as the excess space may be
     reused fairly quickly.

During the boot process, a lot of transient processes are created, and
this can cause a lot of fragmentation as the pagecache and various slabs
grow greatly during this time.

By turning off the trimming of excess space during boot and disabling
batching of frees, Coldfire can manage to boot.

A better way of doing things might be to have /sbin/init turn this option
off.  By that point libc, ld.so and init - which are all long-duration
processes - have all been loaded and trimmed.

Reported-by: Lanttor Guo &lt;lanttor.guo@freescale.com&gt;
Signed-off-by: David Howells &lt;dhowells@redhat.com&gt;
Tested-by: Lanttor Guo &lt;lanttor.guo@freescale.com&gt;
Cc: Greg Ungerer &lt;gerg@snapgear.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>nommu: clamp zone_batchsize() to 0 under NOMMU conditions</title>
<updated>2009-05-06T23:36:10+00:00</updated>
<author>
<name>David Howells</name>
<email>dhowells@redhat.com</email>
</author>
<published>2009-05-06T23:03:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.etezian.org/cgit.cgi/snowball/igloo-kernel.git/commit/?id=3a6be87fd1e5cdbbc3b6a14d02a3efa9ecba1d3f'/>
<id>urn:sha1:3a6be87fd1e5cdbbc3b6a14d02a3efa9ecba1d3f</id>
<content type='text'>
Clamp zone_batchsize() to 0 under NOMMU conditions to stop
free_hot_cold_page() from queueing and batching frees.

The problem is that under NOMMU conditions it is really important to be
able to allocate large contiguous chunks of memory, but when munmap() or
exit_mmap() releases big stretches of memory, return of these to the buddy
allocator can be deferred, and when it does finally happen, it can be in
small chunks.

Whilst the fragmentation this incurs isn't so much of a problem under MMU
conditions as userspace VM is glued together from individual pages with
the aid of the MMU, it is a real problem if there isn't an MMU.

By clamping the page freeing queue size to 0, pages are returned to the
allocator immediately, and the buddy detector is more likely to be able to
glue them together into large chunks immediately, and fragmentation is
less likely to occur.

By disabling batching of frees, and by turning off the trimming of excess
space during boot, Coldfire can manage to boot.

Reported-by: Lanttor Guo &lt;lanttor.guo@freescale.com&gt;
Signed-off-by: David Howells &lt;dhowells@redhat.com&gt;
Tested-by: Lanttor Guo &lt;lanttor.guo@freescale.com&gt;
Cc: Greg Ungerer &lt;gerg@snapgear.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>mm: use roundown_pow_of_two() in zone_batchsize()</title>
<updated>2009-05-06T23:36:10+00:00</updated>
<author>
<name>David Howells</name>
<email>dhowells@redhat.com</email>
</author>
<published>2009-05-06T23:03:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.etezian.org/cgit.cgi/snowball/igloo-kernel.git/commit/?id=9155203a5de94278525647b16733f0c315f3b786'/>
<id>urn:sha1:9155203a5de94278525647b16733f0c315f3b786</id>
<content type='text'>
Use roundown_pow_of_two(N) in zone_batchsize() rather than (1 &lt;&lt;
(fls(N)-1)) as they are equivalent, and with the former it is easier to
see what is going on.

Signed-off-by: David Howells &lt;dhowells@redhat.com&gt;
Tested-by: Lanttor Guo &lt;lanttor.guo@freescale.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>alloc_vmap_area: fix memory leak</title>
<updated>2009-05-06T23:36:10+00:00</updated>
<author>
<name>Ralph Wuerthner</name>
<email>ralphw@linux.vnet.ibm.com</email>
</author>
<published>2009-05-06T23:02:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.etezian.org/cgit.cgi/snowball/igloo-kernel.git/commit/?id=2498ce42d3a4d1a498f1df4884da960087547db7'/>
<id>urn:sha1:2498ce42d3a4d1a498f1df4884da960087547db7</id>
<content type='text'>
If alloc_vmap_area() fails the allocated struct vmap_area has to be freed.

Signed-off-by: Ralph Wuerthner &lt;ralphw@linux.vnet.ibm.com&gt;
Reviewed-by: Christoph Lameter &lt;cl@linux-foundation.org&gt;
Reviewed-by: Minchan Kim &lt;minchan.kim@gmail.com&gt;
Cc: Nick Piggin &lt;npiggin@suse.de&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>oom: prevent livelock when oom_kill_allocating_task is set</title>
<updated>2009-05-06T23:36:09+00:00</updated>
<author>
<name>David Rientjes</name>
<email>rientjes@google.com</email>
</author>
<published>2009-05-06T23:02:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.etezian.org/cgit.cgi/snowball/igloo-kernel.git/commit/?id=184101bf143ac96d62b3dcc17e7b3550f98d3350'/>
<id>urn:sha1:184101bf143ac96d62b3dcc17e7b3550f98d3350</id>
<content type='text'>
When /proc/sys/vm/oom_kill_allocating_task is set for large systems that
want to avoid the lengthy tasklist scan, it's possible to livelock if
current is ineligible for oom kill.  This normally happens when it is set
to OOM_DISABLE, but is also possible if any threads are sharing the same
-&gt;mm with a different tgid.

So change __out_of_memory() to fall back to the full task-list scan if it
was unable to kill `current'.

Cc: Nick Piggin &lt;npiggin@suse.de&gt;
Signed-off-by: David Rientjes &lt;rientjes@google.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>Ignore madvise(MADV_WILLNEED) for hugetlbfs-backed regions</title>
<updated>2009-05-05T21:37:58+00:00</updated>
<author>
<name>Mel Gorman</name>
<email>mel@csn.ul.ie</email>
</author>
<published>2009-05-05T15:37:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.etezian.org/cgit.cgi/snowball/igloo-kernel.git/commit/?id=a425a638c858fd10370b573bde81df3ba500e271'/>
<id>urn:sha1:a425a638c858fd10370b573bde81df3ba500e271</id>
<content type='text'>
madvise(MADV_WILLNEED) forces page cache readahead on a range of memory
backed by a file.  The assumption is made that the page required is
order-0 and "normal" page cache.

On hugetlbfs, this assumption is not true and order-0 pages are
allocated and inserted into the hugetlbfs page cache.  This leaks
hugetlbfs page reservations and can cause BUGs to trigger related to
corrupted page tables.

This patch causes MADV_WILLNEED to be ignored for hugetlbfs-backed
regions.

Signed-off-by: Mel Gorman &lt;mel@csn.ul.ie&gt;
Cc: stable@kernel.org
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>vmscan: avoid multiplication overflow in shrink_zone()</title>
<updated>2009-05-02T22:36:10+00:00</updated>
<author>
<name>Andrew Morton</name>
<email>akpm@linux-foundation.org</email>
</author>
<published>2009-04-30T22:08:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.etezian.org/cgit.cgi/snowball/igloo-kernel.git/commit/?id=8713e01295140f674a41f2199b0f7ca99dfb69d5'/>
<id>urn:sha1:8713e01295140f674a41f2199b0f7ca99dfb69d5</id>
<content type='text'>
Local variable `scan' can overflow on zones which are larger than

	(2G * 4k) / 100 = 80GB.

Making it 64-bit on 64-bit will fix that up.

Cc: KOSAKI Motohiro &lt;kosaki.motohiro@jp.fujitsu.com&gt;
Cc: Wu Fengguang &lt;fengguang.wu@intel.com&gt;
Cc: Peter Zijlstra &lt;peterz@infradead.org&gt;
Cc: Rik van Riel &lt;riel@redhat.com&gt;
Cc: Lee Schermerhorn &lt;lee.schermerhorn@hp.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>mm: fix Committed_AS underflow on large NR_CPUS environment</title>
<updated>2009-05-02T22:36:10+00:00</updated>
<author>
<name>KOSAKI Motohiro</name>
<email>kosaki.motohiro@jp.fujitsu.com</email>
</author>
<published>2009-04-30T22:08:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.etezian.org/cgit.cgi/snowball/igloo-kernel.git/commit/?id=00a62ce91e554198ef28234c91c36f850f5a3bc9'/>
<id>urn:sha1:00a62ce91e554198ef28234c91c36f850f5a3bc9</id>
<content type='text'>
The Committed_AS field can underflow in certain situations:

&gt;         # while true; do cat /proc/meminfo  | grep _AS; sleep 1; done | uniq -c
&gt;               1 Committed_AS: 18446744073709323392 kB
&gt;              11 Committed_AS: 18446744073709455488 kB
&gt;               6 Committed_AS:    35136 kB
&gt;               5 Committed_AS: 18446744073709454400 kB
&gt;               7 Committed_AS:    35904 kB
&gt;               3 Committed_AS: 18446744073709453248 kB
&gt;               2 Committed_AS:    34752 kB
&gt;               9 Committed_AS: 18446744073709453248 kB
&gt;               8 Committed_AS:    34752 kB
&gt;               3 Committed_AS: 18446744073709320960 kB
&gt;               7 Committed_AS: 18446744073709454080 kB
&gt;               3 Committed_AS: 18446744073709320960 kB
&gt;               5 Committed_AS: 18446744073709454080 kB
&gt;               6 Committed_AS: 18446744073709320960 kB

Because NR_CPUS can be greater than 1000 and meminfo_proc_show() does
not check for underflow.

But NR_CPUS proportional isn't good calculation.  In general,
possibility of lock contention is proportional to the number of online
cpus, not theorical maximum cpus (NR_CPUS).

The current kernel has generic percpu-counter stuff.  using it is right
way.  it makes code simplify and percpu_counter_read_positive() don't
make underflow issue.

Reported-by: Dave Hansen &lt;dave@linux.vnet.ibm.com&gt;
Signed-off-by: KOSAKI Motohiro &lt;kosaki.motohiro@jp.fujitsu.com&gt;
Cc: Eric B Munson &lt;ebmunson@us.ibm.com&gt;
Cc: Mel Gorman &lt;mel@csn.ul.ie&gt;
Cc: Christoph Lameter &lt;cl@linux-foundation.org&gt;
Cc: &lt;stable@kernel.org&gt;		[All kernel versions]
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>memcg: fix mem_cgroup_shrink_usage()</title>
<updated>2009-05-02T22:36:09+00:00</updated>
<author>
<name>Daisuke Nishimura</name>
<email>nishimura@mxp.nes.nec.co.jp</email>
</author>
<published>2009-04-30T22:08:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.etezian.org/cgit.cgi/snowball/igloo-kernel.git/commit/?id=ae3abae64f177586be55b04a7fb7047a34b21a3e'/>
<id>urn:sha1:ae3abae64f177586be55b04a7fb7047a34b21a3e</id>
<content type='text'>
Current mem_cgroup_shrink_usage() has two problems.

1. It doesn't call mem_cgroup_out_of_memory and doesn't update
   last_oom_jiffies, so pagefault_out_of_memory invokes global OOM.

2. Considering hierarchy, shrinking has to be done from the
   mem_over_limit, not from the memcg which the page would be charged to.

mem_cgroup_try_charge_swapin() does all of these things properly, so we
use it and call cancel_charge_swapin when it succeeded.

The name of "shrink_usage" is not appropriate for this behavior, so we
change it too.

Signed-off-by: Daisuke Nishimura &lt;nishimura@mxp.nes.nec.co.jp&gt;
Acked-by: KAMEZAWA Hiroyuki &lt;kamezawa.hiroyu@jp.fujitsu.com&gt;
Cc: Li Zefan &lt;lizf@cn.fujitsu.cn&gt;
Cc: Paul Menage &lt;menage@google.com&gt;
Cc: Dhaval Giani &lt;dhaval@linux.vnet.ibm.com&gt;
Cc: Daisuke Nishimura &lt;nishimura@mxp.nes.nec.co.jp&gt;
Cc: YAMAMOTO Takashi &lt;yamamoto@valinux.co.jp&gt;
Cc: KOSAKI Motohiro &lt;kosaki.motohiro@jp.fujitsu.com&gt;
Cc: David Rientjes &lt;rientjes@google.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
</feed>
