<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/linux.git/include/linux/slab.h, branch v3.12.19</title>
<subtitle>Linux Kernel
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v3.12.19</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v3.12.19'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/'/>
<updated>2013-09-04T20:11:42Z</updated>
<entry>
<title>slab: Use correct GFP_DMA constant</title>
<updated>2013-09-04T20:11:42Z</updated>
<author>
<name>Christoph Lameter</name>
<email>cl@linux.com</email>
</author>
<published>2013-09-04T19:58:08Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=23774a2f6fee0848503bfb8004eeeb5adef94f5c'/>
<id>urn:sha1:23774a2f6fee0848503bfb8004eeeb5adef94f5c</id>
<content type='text'>
On Thu, 5 Sep 2013, kbuild test robot wrote:
&gt; &gt;&gt; include/linux/slab.h:433:53: sparse: restricted gfp_t degrades to integer
&gt;    429	static __always_inline void *kmalloc_node(size_t size, gfp_t flags, int node)
&gt;    430	{
&gt;    431	#ifndef CONFIG_SLOB
&gt;    432		if (__builtin_constant_p(size) &amp;&amp;
&gt;  &gt; 433			size &lt;= KMALLOC_MAX_CACHE_SIZE &amp;&amp; !(flags &amp; SLAB_CACHE_DMA)) {
&gt;    434			int i = kmalloc_index(size);
&gt;    435

flags is of type gfp_t and not a slab internal flag. Therefore
use GFP_DMA.

Signed-off-by: Christoph Lameter &lt;cl@linux.com&gt;
Signed-off-by: Pekka Enberg &lt;penberg@kernel.org&gt;
</content>
</entry>
<entry>
<title>mm/sl[aou]b: Move kmallocXXX functions to common code</title>
<updated>2013-09-04T17:51:33Z</updated>
<author>
<name>Christoph Lameter</name>
<email>cl@linux.com</email>
</author>
<published>2013-09-04T16:35:34Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=f1b6eb6e6be149b40ebb013f5bfe2ac86b6f1c1b'/>
<id>urn:sha1:f1b6eb6e6be149b40ebb013f5bfe2ac86b6f1c1b</id>
<content type='text'>
The kmalloc* functions of all slab allcoators are similar now so
lets move them into slab.h. This requires some function naming changes
in slob.

As a results of this patch there is a common set of functions for
all allocators. Also means that kmalloc_large() is now available
in general to perform large order allocations that go directly
via the page allocator. kmalloc_large() can be substituted if
kmalloc() throws warnings because of too large allocations.

kmalloc_large() has exactly the same semantics as kmalloc but
can only used for allocations &gt; PAGE_SIZE.

Signed-off-by: Christoph Lameter &lt;cl@linux.com&gt;
Signed-off-by: Pekka Enberg &lt;penberg@kernel.org&gt;
</content>
</entry>
<entry>
<title>slab: add kmalloc() to kernel API documentation</title>
<updated>2013-07-07T16:02:59Z</updated>
<author>
<name>Michael Opdenacker</name>
<email>michael.opdenacker@free-electrons.com</email>
</author>
<published>2013-06-25T16:16:55Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=e7efa615ccf78394338144ff0187be331240748a'/>
<id>urn:sha1:e7efa615ccf78394338144ff0187be331240748a</id>
<content type='text'>
At the moment, kmalloc() isn't even listed in the kernel API
documentation (DocBook/kernel-api.html after running "make htmldocs").

Another issue is that the documentation for kmalloc_node()
refers to kcalloc()'s documentation to describe its 'flags' parameter,
while kcalloc() refered to kmalloc()'s documentation, which doesn't exist!

This patch is a proposed fix for this. It also removes the documentation
for kmalloc() in include/linux/slob_def.h which isn't included to
generate the documentation anyway. This way, kmalloc() is described
in only one place.

Acked-by: Christoph Lameter &lt;cl@linux.com&gt;
Acked-by: Randy Dunlap &lt;rdunlap@infradead.org&gt;
Signed-off-by: Michael Opdenacker &lt;michael.opdenacker@free-electrons.com&gt;
Signed-off-by: Pekka Enberg &lt;penberg@kernel.org&gt;
</content>
</entry>
<entry>
<title>slob: Rework #ifdeffery in slab.h</title>
<updated>2013-06-18T15:34:43Z</updated>
<author>
<name>Christoph Lameter</name>
<email>cl@linux.com</email>
</author>
<published>2013-06-14T19:55:13Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=069e2b351de67e7a837b15b3d26c65c19b790cc3'/>
<id>urn:sha1:069e2b351de67e7a837b15b3d26c65c19b790cc3</id>
<content type='text'>
Make the SLOB specific stuff harmonize more with the way the other allocators
do it. Create the typical kmalloc constants for that purpose. SLOB does not
support it but the constants help us avoid #ifdefs.

Signed-off-by: Christoph Lameter &lt;cl@linux.com&gt;
Signed-off-by: Pekka Enberg &lt;penberg@kernel.org&gt;
</content>
</entry>
<entry>
<title>slab: Handle ARCH_DMA_MINALIGN correctly</title>
<updated>2013-02-06T18:32:13Z</updated>
<author>
<name>Christoph Lameter</name>
<email>cl@linux.com</email>
</author>
<published>2013-02-05T16:36:47Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=c601fd6956e92b0eb268d4af754073c76155b99d'/>
<id>urn:sha1:c601fd6956e92b0eb268d4af754073c76155b99d</id>
<content type='text'>
James Hogan hit boot problems in next-20130204 on Meta:

  META213-Thread0 DSP [LogF] kobject (4fc03980): tried to init an initialized object, something is seriously wrong.
  META213-Thread0 DSP [LogF]
  META213-Thread0 DSP [LogF] Call trace:
  META213-Thread0 DSP [LogF] [&lt;4000888c&gt;] _show_stack+0x68/0x7c
  META213-Thread0 DSP [LogF] [&lt;400088b4&gt;] _dump_stack+0x14/0x28
  META213-Thread0 DSP [LogF] [&lt;40103794&gt;] _kobject_init+0x58/0x9c
  META213-Thread0 DSP [LogF] [&lt;40103810&gt;] _kobject_create+0x38/0x64
  META213-Thread0 DSP [LogF] [&lt;40103eac&gt;] _kobject_create_and_add+0x14/0x8c
  META213-Thread0 DSP [LogF] [&lt;40190ac4&gt;] _mnt_init+0xd8/0x220
  META213-Thread0 DSP [LogF] [&lt;40190508&gt;] _vfs_caches_init+0xb0/0x160
  META213-Thread0 DSP [LogF] [&lt;401851f4&gt;] _start_kernel+0x274/0x340
  META213-Thread0 DSP [LogF] [&lt;40188424&gt;] _metag_start_kernel+0x58/0x6c
  META213-Thread0 DSP [LogF] [&lt;40000044&gt;] __start+0x44/0x48
  META213-Thread0 DSP [LogF]
  META213-Thread0 DSP [LogF] devtmpfs: initialized
  META213-Thread0 DSP [LogF] L2 Cache: Not present
  META213-Thread0 DSP [LogF] BUG: failure at fs/sysfs/dir.c:736/sysfs_read_ns_type()!
  META213-Thread0 DSP [LogF] Kernel panic - not syncing: BUG!
  META213-Thread0 DSP [Thread Exit] Thread has exited - return code = 4294967295

And bisected the problem to commit 95a05b4 ("slab: Common constants for
kmalloc boundaries").

As it turns out, a fixed KMALLOC_SHIFT_LOW does not work for arches with
higher alignment requirements.

Determine KMALLOC_SHIFT_LOW from ARCH_DMA_MINALIGN instead.

Reported-and-tested-by: James Hogan &lt;james.hogan@imgtec.com&gt;
Signed-off-by: Christoph Lameter &lt;cl@linux.com&gt;
Signed-off-by: Pekka Enberg &lt;penberg@kernel.org&gt;
</content>
</entry>
<entry>
<title>slab: Common definition for the array of kmalloc caches</title>
<updated>2013-02-01T10:32:07Z</updated>
<author>
<name>Christoph Lameter</name>
<email>cl@linux.com</email>
</author>
<published>2013-01-10T19:12:17Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=9425c58e5445277699ff3c2a87bac1cfebc1b48d'/>
<id>urn:sha1:9425c58e5445277699ff3c2a87bac1cfebc1b48d</id>
<content type='text'>
Have a common definition fo the kmalloc cache arrays in
SLAB and SLUB

Acked-by: Glauber Costa &lt;glommer@parallels.com&gt;
Signed-off-by: Christoph Lameter &lt;cl@linux.com&gt;
Signed-off-by: Pekka Enberg &lt;penberg@kernel.org&gt;
</content>
</entry>
<entry>
<title>slab: Common constants for kmalloc boundaries</title>
<updated>2013-02-01T10:32:07Z</updated>
<author>
<name>Christoph Lameter</name>
<email>cl@linux.com</email>
</author>
<published>2013-01-10T19:14:19Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=95a05b428cc675694321c8f762591984f3fd2b1e'/>
<id>urn:sha1:95a05b428cc675694321c8f762591984f3fd2b1e</id>
<content type='text'>
Standardize the constants that describe the smallest and largest
object kept in the kmalloc arrays for SLAB and SLUB.

Differentiate between the maximum size for which a slab cache is used
(KMALLOC_MAX_CACHE_SIZE) and the maximum allocatable size
(KMALLOC_MAX_SIZE, KMALLOC_MAX_ORDER).

Signed-off-by: Christoph Lameter &lt;cl@linux.com&gt;
Signed-off-by: Pekka Enberg &lt;penberg@kernel.org&gt;
</content>
</entry>
<entry>
<title>slab: Common kmalloc slab index determination</title>
<updated>2013-02-01T10:32:05Z</updated>
<author>
<name>Christoph Lameter</name>
<email>cl@linux.com</email>
</author>
<published>2013-01-10T19:14:19Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=ce6a50263d4ddeba1f0d08f16716a82770c03690'/>
<id>urn:sha1:ce6a50263d4ddeba1f0d08f16716a82770c03690</id>
<content type='text'>
Extract the function to determine the index of the slab within
the array of kmalloc caches as well as a function to determine
maximum object size from the nr of the kmalloc slab.

This is used here only to simplify slub bootstrap but will
be used later also for SLAB.

Acked-by: Glauber Costa &lt;glommer@parallels.com&gt;
Signed-off-by: Christoph Lameter &lt;cl@linux.com&gt;
Signed-off-by: Pekka Enberg &lt;penberg@kernel.org&gt;
</content>
</entry>
<entry>
<title>slab: Move kmalloc related function defs</title>
<updated>2013-02-01T10:32:05Z</updated>
<author>
<name>Christoph Lameter</name>
<email>cl@linux.com</email>
</author>
<published>2013-01-10T19:00:53Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=345046673449b5c35840e5cc34a60059cbec9305'/>
<id>urn:sha1:345046673449b5c35840e5cc34a60059cbec9305</id>
<content type='text'>
Move these functions higher up in slab.h so that they are grouped with other
generic kmalloc related definitions.

Acked-by: Glauber Costa &lt;glommer@parallels.com&gt;
Signed-off-by: Christoph Lameter &lt;cl@linux.com&gt;
Signed-off-by: Pekka Enberg &lt;penberg@kernel.org&gt;
</content>
</entry>
<entry>
<title>slab: propagate tunable values</title>
<updated>2012-12-18T23:02:14Z</updated>
<author>
<name>Glauber Costa</name>
<email>glommer@parallels.com</email>
</author>
<published>2012-12-18T22:23:03Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=943a451a87d229ca564a27274b58eaeae35fde5d'/>
<id>urn:sha1:943a451a87d229ca564a27274b58eaeae35fde5d</id>
<content type='text'>
SLAB allows us to tune a particular cache behavior with tunables.  When
creating a new memcg cache copy, we'd like to preserve any tunables the
parent cache already had.

This could be done by an explicit call to do_tune_cpucache() after the
cache is created.  But this is not very convenient now that the caches are
created from common code, since this function is SLAB-specific.

Another method of doing that is taking advantage of the fact that
do_tune_cpucache() is always called from enable_cpucache(), which is
called at cache initialization.  We can just preset the values, and then
things work as expected.

It can also happen that a root cache has its tunables updated during
normal system operation.  In this case, we will propagate the change to
all caches that are already active.

This change will require us to move the assignment of root_cache in
memcg_params a bit earlier.  We need this to be already set - which
memcg_kmem_register_cache will do - when we reach __kmem_cache_create()

Signed-off-by: Glauber Costa &lt;glommer@parallels.com&gt;
Cc: Christoph Lameter &lt;cl@linux.com&gt;
Cc: David Rientjes &lt;rientjes@google.com&gt;
Cc: Frederic Weisbecker &lt;fweisbec@redhat.com&gt;
Cc: Greg Thelen &lt;gthelen@google.com&gt;
Cc: Johannes Weiner &lt;hannes@cmpxchg.org&gt;
Cc: JoonSoo Kim &lt;js1304@gmail.com&gt;
Cc: KAMEZAWA Hiroyuki &lt;kamezawa.hiroyu@jp.fujitsu.com&gt;
Cc: Mel Gorman &lt;mel@csn.ul.ie&gt;
Cc: Michal Hocko &lt;mhocko@suse.cz&gt;
Cc: Pekka Enberg &lt;penberg@cs.helsinki.fi&gt;
Cc: Rik van Riel &lt;riel@redhat.com&gt;
Cc: Suleiman Souhlal &lt;suleiman@google.com&gt;
Cc: Tejun Heo &lt;tj@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>
</feed>
