Commit 9c09a95c authored by Mel Gorman's avatar Mel Gorman Committed by Linus Torvalds
Browse files

slab: partially revert list3 changes

Partial revert the changes made by 04231b30

to the kmem_list3 management. On a machine with a memoryless node, this
BUG_ON was triggering

	static void *____cache_alloc_node(struct kmem_cache *cachep, gfp_t flags, int nodeid)
		struct list_head *entry;
		struct slab *slabp;
		struct kmem_list3 *l3;
		void *obj;
		int x;

		l3 = cachep->nodelists[nodeid];

Signed-off-by: default avatarMel Gorman <>
Cc: Pekka Enberg <>
Acked-by: default avatarChristoph Lameter <>
Cc: "Aneesh Kumar K.V" <>
Cc: Nishanth Aravamudan <>
Cc: KAMEZAWA Hiroyuki <>
Cc: Paul Mackerras <>
Cc: Benjamin Herrenschmidt <>
Signed-off-by: default avatarAndrew Morton <>
Signed-off-by: default avatarLinus Torvalds <>
parent c5c99429
......@@ -1590,7 +1590,7 @@ void __init kmem_cache_init(void)
/* Replace the static kmem_list3 structures for the boot cpu */
init_list(&cache_cache, &initkmem_list3[CACHE_CACHE], node);
for_each_node_state(nid, N_NORMAL_MEMORY) {
for_each_online_node(nid) {
&initkmem_list3[SIZE_AC + nid], nid);
......@@ -1968,7 +1968,7 @@ static void __init set_up_list3s(struct kmem_cache *cachep, int index)
int node;
for_each_node_state(node, N_NORMAL_MEMORY) {
for_each_online_node(node) {
cachep->nodelists[node] = &initkmem_list3[index + node];
cachep->nodelists[node]->next_reap = jiffies +
......@@ -3815,7 +3815,7 @@ static int alloc_kmemlist(struct kmem_cache *cachep)
struct array_cache *new_shared;
struct array_cache **new_alien = NULL;
for_each_node_state(node, N_NORMAL_MEMORY) {
for_each_online_node(node) {
if (use_alien_caches) {
new_alien = alloc_alien_cache(node, cachep->limit);
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment