<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/base/node.c, branch v3.12.14</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/drivers/base/node.c?h=v3.12.14</id>
<link rel='self' href='https://git.amat.us/linux/atom/drivers/base/node.c?h=v3.12.14'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2013-09-12T22:38:03Z</updated>
<entry>
<title>thp: account anon transparent huge pages into NR_ANON_PAGES</title>
<updated>2013-09-12T22:38:03Z</updated>
<author>
<name>Kirill A. Shutemov</name>
<email>kirill.shutemov@linux.intel.com</email>
</author>
<published>2013-09-12T22:13:58Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=3cd14fcd3f128d5eba8575491cb4e1999ee1bad2'/>
<id>urn:sha1:3cd14fcd3f128d5eba8575491cb4e1999ee1bad2</id>
<content type='text'>
We use NR_ANON_PAGES as base for reporting AnonPages to user.  There's
not much sense in not accounting transparent huge pages there, but add
them on printing to user.

Let's account transparent huge pages in NR_ANON_PAGES in the first place.

Signed-off-by: Kirill A. Shutemov &lt;kirill.shutemov@linux.intel.com&gt;
Acked-by: Dave Hansen &lt;dave.hansen@linux.intel.com&gt;
Cc: Andrea Arcangeli &lt;aarcange@redhat.com&gt;
Cc: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
Cc: Hugh Dickins &lt;hughd@google.com&gt;
Cc: Wu Fengguang &lt;fengguang.wu@intel.com&gt;
Cc: Jan Kara &lt;jack@suse.cz&gt;
Cc: Mel Gorman &lt;mgorman@suse.de&gt;
Cc: Andi Kleen &lt;ak@linux.intel.com&gt;
Cc: Matthew Wilcox &lt;willy@linux.intel.com&gt;
Cc: Hillf Danton &lt;dhillf@gmail.com&gt;
Cc: Ning Qu &lt;quning@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>drivers/base/node.c: switch to register_hotmemory_notifier()</title>
<updated>2013-04-29T22:54:36Z</updated>
<author>
<name>Andrew Morton</name>
<email>akpm@linux-foundation.org</email>
</author>
<published>2013-04-29T22:08:07Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=6e259e7dc482d4d5e2701259ddc85ffebd957502'/>
<id>urn:sha1:6e259e7dc482d4d5e2701259ddc85ffebd957502</id>
<content type='text'>
Squishes a warning which my change to hotplug_memory_notifier() added.

I want to keep that warning, because it is punishment for failnig to check
the hotplug_memory_notifier() return value.

Cc: Greg KH &lt;greg@kroah.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>numa: add CONFIG_MOVABLE_NODE for movable-dedicated node</title>
<updated>2012-12-13T01:38:34Z</updated>
<author>
<name>Lai Jiangshan</name>
<email>laijs@cn.fujitsu.com</email>
</author>
<published>2012-12-12T21:52:00Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=20b2f52b73febce476fc9376f0296c1aa0e4f5a7'/>
<id>urn:sha1:20b2f52b73febce476fc9376f0296c1aa0e4f5a7</id>
<content type='text'>
We need a node which only contains movable memory.  This feature is very
important for node hotplug.  If a node has normal/highmem, the memory may
be used by the kernel and can't be offlined.  If the node only contains
movable memory, we can offline the memory and the node.

All are prepared, we can actually introduce N_MEMORY.
add CONFIG_MOVABLE_NODE make we can use it for movable-dedicated node

[akpm@linux-foundation.org: fix Kconfig text]
Signed-off-by: Lai Jiangshan &lt;laijs@cn.fujitsu.com&gt;
Tested-by: Yasuaki Ishimatsu &lt;isimatu.yasuaki@jp.fujitsu.com&gt;
Signed-off-by: Wen Congyang &lt;wency@cn.fujitsu.com&gt;
Cc: Jiang Liu &lt;jiang.liu@huawei.com&gt;
Cc: KOSAKI Motohiro &lt;kosaki.motohiro@jp.fujitsu.com&gt;
Cc: Minchan Kim &lt;minchan.kim@gmail.com&gt;
Cc: Mel Gorman &lt;mgorman@suse.de&gt;
Cc: David Rientjes &lt;rientjes@google.com&gt;
Cc: Yinghai Lu &lt;yinghai@kernel.org&gt;
Cc: Rusty Russell &lt;rusty@rustcorp.com.au&gt;
Cc: Greg KH &lt;greg@kroah.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>hugetlb: use N_MEMORY instead N_HIGH_MEMORY</title>
<updated>2012-12-13T01:38:33Z</updated>
<author>
<name>Lai Jiangshan</name>
<email>laijs@cn.fujitsu.com</email>
</author>
<published>2012-12-12T21:51:36Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=8cebfcd074a3044780f3f9af236fc8534d89e55e'/>
<id>urn:sha1:8cebfcd074a3044780f3f9af236fc8534d89e55e</id>
<content type='text'>
N_HIGH_MEMORY stands for the nodes that has normal or high memory.
N_MEMORY stands for the nodes that has any memory.

The code here need to handle with the nodes which have memory, we should
use N_MEMORY instead.

Signed-off-by: Lai Jiangshan &lt;laijs@cn.fujitsu.com&gt;
Acked-by: Hillf Danton &lt;dhillf@gmail.com&gt;
Signed-off-by: Wen Congyang &lt;wency@cn.fujitsu.com&gt;
Cc: Christoph Lameter &lt;cl@linux.com&gt;
Cc: Hillf Danton &lt;dhillf@gmail.com&gt;
Cc: Lin Feng &lt;linfeng@cn.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>
<entry>
<title>drivers/base/node.c: cleanup node_state_attr[]</title>
<updated>2012-12-12T01:22:28Z</updated>
<author>
<name>Lai Jiangshan</name>
<email>laijs@cn.fujitsu.com</email>
</author>
<published>2012-12-12T00:03:13Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=fcf07d22f089856631b52a75c35ba3c33b70a1b4'/>
<id>urn:sha1:fcf07d22f089856631b52a75c35ba3c33b70a1b4</id>
<content type='text'>
use [index] = init_value
use N_xxxxx instead of hardcode.

Make it more readability and easier to add new state.

Signed-off-by: Lai Jiangshan &lt;laijs@cn.fujitsu.com&gt;
Signed-off-by: Wen Congyang &lt;wency@cn.fujitsu.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>
<entry>
<title>mm: cleanup register_node()</title>
<updated>2012-12-12T01:22:27Z</updated>
<author>
<name>Yasuaki Ishimatsu</name>
<email>isimatu.yasuaki@jp.fujitsu.com</email>
</author>
<published>2012-12-12T00:02:52Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=fa264375175a382621c5344a6508e02ec4d1c3c0'/>
<id>urn:sha1:fa264375175a382621c5344a6508e02ec4d1c3c0</id>
<content type='text'>
register_node() is defined as extern in include/linux/node.h.  But the
function is only called from register_one_node() in driver/base/node.c.

So the patch defines register_node() as static.

Signed-off-by: Yasuaki Ishimatsu &lt;isimatu.yasuaki@jp.fujitsu.com&gt;
Acked-by: David Rientjes &lt;rientjes@google.com&gt;
Acked-by: KOSAKI Motohiro &lt;kosaki.motohiro@jp.fujitsu.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>memory-hotplug: suppress "Device nodeX does not have a release() function" warning</title>
<updated>2012-12-12T01:22:23Z</updated>
<author>
<name>Yasuaki Ishimatsu</name>
<email>isimatu.yasuaki@jp.fujitsu.com</email>
</author>
<published>2012-12-12T00:00:57Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=8c7b5b4ed948d1ddf9672ee932a16750b280822a'/>
<id>urn:sha1:8c7b5b4ed948d1ddf9672ee932a16750b280822a</id>
<content type='text'>
When calling unregister_node(), the function shows following message at
device_release().

"Device 'node2' does not have a release() function, it is broken and must
be fixed."

The reason is node's device struct does not have a release() function.

So the patch registers node_device_release() to the device's release()
function for suppressing the warning message.  Additionally, the patch
adds memset() to initialize a node struct into register_node().  Because
the node struct is part of node_devices[] array and it cannot be freed by
node_device_release().  So if system reuses the node struct, it has a
garbage.

Signed-off-by: Yasuaki Ishimatsu &lt;isimatu.yasuaki@jp.fujitsu.com&gt;
Signed-off-by: Wen Congyang &lt;wency@cn.fujitsu.com&gt;
Cc: David Rientjes &lt;rientjes@google.com&gt;
Cc: Jiang Liu &lt;liuj97@gmail.com&gt;
Cc: Minchan Kim &lt;minchan.kim@gmail.com&gt;
Cc: KOSAKI Motohiro &lt;kosaki.motohiro@jp.fujitsu.com&gt;
Cc: Greg KH &lt;greg@kroah.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>numa: convert static memory to dynamically allocated memory for per node device</title>
<updated>2012-12-12T01:22:23Z</updated>
<author>
<name>Wen Congyang</name>
<email>wency@cn.fujitsu.com</email>
</author>
<published>2012-12-12T00:00:56Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=8732794b166196cc501c2ddd9e7c97cf45ab64c5'/>
<id>urn:sha1:8732794b166196cc501c2ddd9e7c97cf45ab64c5</id>
<content type='text'>
We use a static array to store struct node.  In many cases, we don't have
too many nodes, and some memory will be unused.  Convert it to per-device
dynamically allocated memory.

Signed-off-by: Wen Congyang &lt;wency@cn.fujitsu.com&gt;
Cc: David Rientjes &lt;rientjes@google.com&gt;
Cc: Jiang Liu &lt;liuj97@gmail.com&gt;
Cc: Minchan Kim &lt;minchan.kim@gmail.com&gt;
Cc: KOSAKI Motohiro &lt;kosaki.motohiro@jp.fujitsu.com&gt;
Cc: Yasuaki Ishimatsu &lt;isimatu.yasuaki@jp.fujitsu.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 off-by-one bug in print_nodes_state()</title>
<updated>2012-05-29T23:22:19Z</updated>
<author>
<name>Ryota Ozaki</name>
<email>ozaki.ryota@gmail.com</email>
</author>
<published>2012-05-29T22:06:20Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=f62388187207bea83f1865d507bf892a1f9152c3'/>
<id>urn:sha1:f62388187207bea83f1865d507bf892a1f9152c3</id>
<content type='text'>
/sys/devices/system/node/{online,possible} outputs a garbage byte
because print_nodes_state() returns content size + 1.  To fix the bug,
the patch changes the use of cpuset_sprintf_cpulist to follow the use at
other places, which is clearer and safer.

This bug was introduced in v2.6.24 (commit bde631a51876: "mm: add node
states sysfs class attributeS").

Signed-off-by: Ryota Ozaki &lt;ozaki.ryota@gmail.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>drivers/base/memory.c: fix memory_dev_init() long delay</title>
<updated>2012-02-02T23:50:05Z</updated>
<author>
<name>Yinghai Lu</name>
<email>yinghai@kernel.org</email>
</author>
<published>2012-01-30T21:57:12Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=321bf4ed5ff5f7c62ef59f33b7eec5b154391f0a'/>
<id>urn:sha1:321bf4ed5ff5f7c62ef59f33b7eec5b154391f0a</id>
<content type='text'>
One system with 2048g ram, reported soft lockup on recent kernel.

[   34.426749] cpu_dev_init done
[   61.166399] BUG: soft lockup - CPU#0 stuck for 22s! [swapper/0:1]
[   61.166733] Modules linked in:
[   61.166904] irq event stamp: 1935610
[   61.178431] hardirqs last  enabled at (1935609): [&lt;ffffffff81ce8c05&gt;] mutex_lock_nested+0x299/0x2b4
[   61.178923] hardirqs last disabled at (1935610): [&lt;ffffffff81cf2bab&gt;] apic_timer_interrupt+0x6b/0x80
[   61.198767] softirqs last  enabled at (1935476): [&lt;ffffffff8106e59c&gt;] __do_softirq+0x195/0x1ab
[   61.218604] softirqs last disabled at (1935471): [&lt;ffffffff81cf359c&gt;] call_softirq+0x1c/0x30
[   61.238408] CPU 0
[   61.238549] Modules linked in:
[   61.238744]
[   61.238825] Pid: 1, comm: swapper/0 Not tainted 3.3.0-rc1-tip-yh-02076-g962f689-dirty #171
[   61.278212] RIP: 0010:[&lt;ffffffff810b3e3a&gt;]  [&lt;ffffffff810b3e3a&gt;] lock_release+0x90/0x9c
[   61.278627] RSP: 0018:ffff883f64dbfd70  EFLAGS: 00000246
[   61.298287] RAX: ffff883f64dc0000 RBX: 0000000000000000 RCX: 000000000000008b
[   61.298690] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000
[   61.318383] RBP: ffff883f64dbfda0 R08: 0000000000000001 R09: 000000000000008b
[   61.338215] R10: 0000000000000000 R11: 0000000000000000 R12: ffff883f64dbfd10
[   61.338610] R13: ffff883f64dc0708 R14: ffff883f64dc0708 R15: ffffffff81095657
[   61.358299] FS:  0000000000000000(0000) GS:ffff883f7d600000(0000) knlGS:0000000000000000
[   61.378118] CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
[   61.378450] CR2: 0000000000000000 CR3: 00000000024af000 CR4: 00000000000007f0
[   61.398144] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[   61.417918] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
[   61.418260] Process swapper/0 (pid: 1, threadinfo ffff883f64dbe000, task ffff883f64dc0000)
[   61.445358] Stack:
[   61.445511]  0000000000000002 ffff897f649ba168 ffff883f64dbfe10 ffff88ff64bb57a8
[   61.458040]  0000000000000000 0000000000000000 ffff883f64dbfdc0 ffffffff81ceb1b4
[   61.458491]  000000000011608c ffff88ff64bb58a8 ffff883f64dbfdf0 ffffffff81c57638
[   61.478215] Call Trace:
[   61.478367]  [&lt;ffffffff81ceb1b4&gt;] _raw_spin_unlock+0x21/0x2e
[   61.497994]  [&lt;ffffffff81c57638&gt;] klist_next+0x9e/0xbc
[   61.498264]  [&lt;ffffffff8148ba99&gt;] next_device+0xe/0x1e
[   61.517867]  [&lt;ffffffff8148c0cc&gt;] subsys_find_device_by_id+0xb7/0xd6
[   61.518197]  [&lt;ffffffff81498846&gt;] find_memory_block_hinted+0x3d/0x66
[   61.537927]  [&lt;ffffffff8149887f&gt;] find_memory_block+0x10/0x12
[   61.538193]  [&lt;ffffffff814988b6&gt;] add_memory_section+0x35/0x9e
[   61.557932]  [&lt;ffffffff827fecef&gt;] memory_dev_init+0x68/0xda
[   61.558227]  [&lt;ffffffff827fec01&gt;] driver_init+0x97/0xa7
[   61.577853]  [&lt;ffffffff827cdf3c&gt;] kernel_init+0xf6/0x1c0
[   61.578140]  [&lt;ffffffff81cf34a4&gt;] kernel_thread_helper+0x4/0x10
[   61.597850]  [&lt;ffffffff81ceb59d&gt;] ? retint_restore_args+0xe/0xe
[   61.598144]  [&lt;ffffffff827cde46&gt;] ? start_kernel+0x3ab/0x3ab
[   61.617826]  [&lt;ffffffff81cf34a0&gt;] ? gs_change+0xb/0xb
[   61.618060] Code: 10 48 83 3b 00 eb e8 4c 89 f2 44 89 fe 4c 89 ef e8 e1 fe ff ff 65 48 8b 04 25 40 bc 00 00 c7 80 cc 06 00 00 00 00 00 00 41 54 9d &lt;5e&gt; 5b 41 5c 41 5d 41 5e 41 5f 5d c3 55 48 89 e5 41 57 41 89 cf
[   89.285380] memory_dev_init done

Finally it takes about 55s to create 16400 memory entries.

Root cause: for x86_64, 2048g (with 2g hole at [2g,4g), and TOP2 will be 2050g), will have 16400 memory block.

find_memory_block/subsys_find_device_by_id will be expensive with that many entries.

Actually, we don't need to find that memory block for BOOT path.

Skip that finding make it get back to normal.

[   34.466696] cpu_dev_init done
[   35.290080] memory_dev_init done

Also solved the delay with topology_init when sections_per_block is not 1.

Signed-off-by: Yinghai Lu &lt;yinghai@kernel.org&gt;
Cc: Kay Sievers &lt;kay.sievers@vrfy.org&gt;
Cc: Nathan Fontenot &lt;nfont@austin.ibm.com&gt;
Cc: Robin Holt &lt;holt@sgi.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
</feed>
