Re: [PATCH] tvec_bases too large for per-cpu data

From: Andrew Morton
Date: Tue Jan 31 2006 - 17:23:25 EST


"Jan Beulich" <JBeulich@xxxxxxxxxx> wrote:
>
> Hopefully attached revised patch addresses all concerns mentioned (except that it intentionally continues to not use
> alloc_percpu()).

This remains unaddressed:


+#ifdef CONFIG_NUMA
+ base = kmalloc_node(sizeof(*base), GFP_KERNEL, cpu_to_node(cpu));
+ if (!base)
+ /* Just in case, fall back to normal allocation. */
+#endif
+ base = kmalloc(sizeof(*base), GFP_KERNEL);
+ if (!base)
+ return -ENOMEM;


If we cannot allocate memory on this node for this CPU (wildly unlikely,
btw) we face a choice. Either

a) Allocate memory from some other node, making the machine mysteriously
run slower for the remainder of its uptime or

b) Fail the CPU bringup.

I think b) is better - it tells the operator that something went wrong, so
some sort of corrective action can be taken. I suspect that most operators
would prefer that to having the kernel secretly make their machine run
slower.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/