<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/mm/vmalloc.c, branch v3.6</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v3.6</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v3.6'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2012-08-01T01:42:39Z</updated>
<entry>
<title>mm: make vb_alloc() more foolproof</title>
<updated>2012-08-01T01:42:39Z</updated>
<author>
<name>Jan Kara</name>
<email>jack@suse.cz</email>
</author>
<published>2012-07-31T23:41:37Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=aa91c4d898c062804f4d0a5da6d8ab013cd0e868'/>
<id>urn:sha1:aa91c4d898c062804f4d0a5da6d8ab013cd0e868</id>
<content type='text'>
If someone calls vb_alloc() (or vm_map_ram() for that matter) to allocate
0 bytes (0 pages), get_order() returns BITS_PER_LONG - PAGE_CACHE_SHIFT
and interesting stuff happens.  So make debugging such problems easier and
warn about 0-size allocation.

[akpm@linux-foundation.org: use WARN_ON-return-value feature]
Signed-off-by: Jan Kara &lt;jack@suse.cz&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>vmalloc: walk vmap_areas by sorted list instead of rb_next()</title>
<updated>2012-08-01T01:42:39Z</updated>
<author>
<name>Hong zhi guo</name>
<email>honkiko@gmail.com</email>
</author>
<published>2012-07-31T23:41:35Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=92ca922f0a19145f2dcc99d84fe656fa55b52c2e'/>
<id>urn:sha1:92ca922f0a19145f2dcc99d84fe656fa55b52c2e</id>
<content type='text'>
There's a walk by repeating rb_next to find a suitable hole.  Could be
simply replaced by walk on the sorted vmap_area_list.  More simpler and
efficient.

Mutation of the list and tree only happens in pair within
__insert_vmap_area and __free_vmap_area, under protection of
vmap_area_lock.  The patch code is also under vmap_area_lock, so the list
walk is safe, and consistent with the tree walk.

Tested on SMP by repeating batch of vmalloc anf vfree for random sizes and
rounds for hours.

Signed-off-by: Hong Zhiguo &lt;honkiko@gmail.com&gt;
Cc: Nick Piggin &lt;npiggin@kernel.dk&gt;
Cc: Johannes Weiner &lt;hannes@cmpxchg.org&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>Merge branch 'for-linus-for-3.6-rc1' of git://git.linaro.org/people/mszyprowski/linux-dma-mapping</title>
<updated>2012-07-30T17:11:31Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2012-07-30T17:11:31Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=6f51f51582e793ea13e7de7ed6b138f71c51784b'/>
<id>urn:sha1:6f51f51582e793ea13e7de7ed6b138f71c51784b</id>
<content type='text'>
Pull DMA-mapping updates from Marek Szyprowski:
 "Those patches are continuation of my earlier work.

  They contains extensions to DMA-mapping framework to remove limitation
  of the current ARM implementation (like limited total size of DMA
  coherent/write combine buffers), improve performance of buffer sharing
  between devices (attributes to skip cpu cache operations or creation
  of additional kernel mapping for some specific use cases) as well as
  some unification of the common code for dma_mmap_attrs() and
  dma_mmap_coherent() functions.  All extensions have been implemented
  and tested for ARM architecture."

* 'for-linus-for-3.6-rc1' of git://git.linaro.org/people/mszyprowski/linux-dma-mapping:
  ARM: dma-mapping: add support for DMA_ATTR_SKIP_CPU_SYNC attribute
  common: DMA-mapping: add DMA_ATTR_SKIP_CPU_SYNC attribute
  ARM: dma-mapping: add support for dma_get_sgtable()
  common: dma-mapping: introduce dma_get_sgtable() function
  ARM: dma-mapping: add support for DMA_ATTR_NO_KERNEL_MAPPING attribute
  common: DMA-mapping: add DMA_ATTR_NO_KERNEL_MAPPING attribute
  common: dma-mapping: add support for generic dma_mmap_* calls
  ARM: dma-mapping: fix error path for memory allocation failure
  ARM: dma-mapping: add more sanity checks in arm_dma_mmap()
  ARM: dma-mapping: remove custom consistent dma region
  mm: vmalloc: use const void * for caller argument
  scatterlist: add sg_alloc_table_from_pages function
</content>
</entry>
<entry>
<title>ARM: dma-mapping: remove custom consistent dma region</title>
<updated>2012-07-30T10:25:45Z</updated>
<author>
<name>Marek Szyprowski</name>
<email>m.szyprowski@samsung.com</email>
</author>
<published>2012-07-30T07:11:33Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=e9da6e9905e639b0f842a244bc770b48ad0523e9'/>
<id>urn:sha1:e9da6e9905e639b0f842a244bc770b48ad0523e9</id>
<content type='text'>
This patch changes dma-mapping subsystem to use generic vmalloc areas
for all consistent dma allocations. This increases the total size limit
of the consistent allocations and removes platform hacks and a lot of
duplicated code.

Atomic allocations are served from special pool preallocated on boot,
because vmalloc areas cannot be reliably created in atomic context.

Signed-off-by: Marek Szyprowski &lt;m.szyprowski@samsung.com&gt;
Reviewed-by: Kyungmin Park &lt;kyungmin.park@samsung.com&gt;
Reviewed-by: Minchan Kim &lt;minchan@kernel.org&gt;
</content>
</entry>
<entry>
<title>mm: vmalloc: use const void * for caller argument</title>
<updated>2012-07-30T10:25:44Z</updated>
<author>
<name>Marek Szyprowski</name>
<email>m.szyprowski@samsung.com</email>
</author>
<published>2012-04-13T10:32:09Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=5e6cafc83e30f0f70c79a2b7aef237dc57e29f02'/>
<id>urn:sha1:5e6cafc83e30f0f70c79a2b7aef237dc57e29f02</id>
<content type='text'>
'const void *' is a safer type for caller function type. This patch
updates all references to caller function type.

Signed-off-by: Marek Szyprowski &lt;m.szyprowski@samsung.com&gt;
Reviewed-by: Kyungmin Park &lt;kyungmin.park@samsung.com&gt;
Reviewed-by: Minchan Kim &lt;minchan@kernel.org&gt;
</content>
</entry>
<entry>
<title>vmalloc: remove KM_USER0 from comments</title>
<updated>2012-07-24T07:27:33Z</updated>
<author>
<name>Cong Wang</name>
<email>amwang@redhat.com</email>
</author>
<published>2012-06-23T03:30:16Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=a8e5202d09c1bac5b83889e1ddeff146eb421565'/>
<id>urn:sha1:a8e5202d09c1bac5b83889e1ddeff146eb421565</id>
<content type='text'>
Signed-off-by: Cong Wang &lt;amwang@redhat.com&gt;
</content>
</entry>
<entry>
<title>mm: fix faulty initialization in vmalloc_init()</title>
<updated>2012-05-29T23:22:24Z</updated>
<author>
<name>KyongHo</name>
<email>pullip.cho@samsung.com</email>
</author>
<published>2012-05-29T22:06:49Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=dbda591d920b4c7692725b13e3f68ecb251e9080'/>
<id>urn:sha1:dbda591d920b4c7692725b13e3f68ecb251e9080</id>
<content type='text'>
The transfer of -&gt;flags causes some of the static mapping virtual
addresses to be prematurely freed (before the mapping is removed) because
VM_LAZY_FREE gets "set" if tmp-&gt;flags has VM_IOREMAP set.  This might
cause subsequent vmalloc/ioremap calls to fail because it might allocate
one of the freed virtual address ranges that aren't unmapped.

va-&gt;flags has different types of flags from tmp-&gt;flags.  If a region with
VM_IOREMAP set is registered with vm_area_add_early(), it will be removed
by __purge_vmap_area_lazy().

Fix vmalloc_init() to correctly initialize vmap_area for the given
vm_struct.

Also initialise va-&gt;vm.  If it is not set, find_vm_area() for the early
vm regions will always fail.

Signed-off-by: KyongHo Cho &lt;pullip.cho@samsung.com&gt;
Cc: "Olav Haugan" &lt;ohaugan@codeaurora.org&gt;
Cc: &lt;stable@vger.kernel.org&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 kcalloc() instead of kzalloc() to allocate array</title>
<updated>2012-05-29T23:22:19Z</updated>
<author>
<name>Thomas Meyer</name>
<email>thomas@m3y3r.de</email>
</author>
<published>2012-05-29T22:06:21Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=4d67d860531ad5378dedfad7661c540f3365013d'/>
<id>urn:sha1:4d67d860531ad5378dedfad7661c540f3365013d</id>
<content type='text'>
The advantage of kcalloc is, that will prevent integer overflows which
could result from the multiplication of number of elements and size and
it is also a bit nicer to read.

The semantic patch that makes this change is available in
https://lkml.org/lkml/2011/11/25/107

Signed-off-by: Thomas Meyer &lt;thomas@m3y3r.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>mm: remove the second argument of k[un]map_atomic()</title>
<updated>2012-03-20T13:48:27Z</updated>
<author>
<name>Cong Wang</name>
<email>amwang@redhat.com</email>
</author>
<published>2011-11-25T15:14:39Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=9b04c5fec43c0da610a2c37f70c5b013101a6ad7'/>
<id>urn:sha1:9b04c5fec43c0da610a2c37f70c5b013101a6ad7</id>
<content type='text'>
Signed-off-by: Cong Wang &lt;amwang@redhat.com&gt;
</content>
</entry>
<entry>
<title>mm/vmalloc.c: eliminate extra loop in pcpu_get_vm_areas error path</title>
<updated>2012-01-13T04:13:10Z</updated>
<author>
<name>Kautuk Consul</name>
<email>consul.kautuk@gmail.com</email>
</author>
<published>2012-01-13T01:20:08Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=f1db7afd917e54711798c64d78f8f5fb090f950d'/>
<id>urn:sha1:f1db7afd917e54711798c64d78f8f5fb090f950d</id>
<content type='text'>
If either of the vas or vms arrays are not properly kzalloced, then the
code jumps to the err_free label.

The err_free label runs a loop to check and free each of the array members
of the vas and vms arrays which is not required for this situation as none
of the array members have been allocated till this point.

Eliminate the extra loop we have to go through by introducing a new label
err_free2 and then jumping to it.

[akpm@linux-foundation.org: remove now-unneeded tests]
Signed-off-by: Kautuk Consul &lt;consul.kautuk@gmail.com&gt;
Acked-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>
</feed>
