Sungju's Slow Life

Personal journal


What happens if numa=off is provided in kernel parameter?

If “numa=off” is in kernel boot parameter, it will mark ‘numa_off’ global variable which will be checked during initialization function which is ‘x86_numa_init()’ in x86_64. This will make it not call ‘numa_init’ if numa_off is 1.


static __init int numa_setup(char *opt)
{
    if (!opt)
        return -EINVAL;
    if (!strncmp(opt, "off", 3))
        numa_off = 1;
#ifdef CONFIG_NUMA_EMU
    if (!strncmp(opt, "fake=", 5))
        numa_emu_cmdline(opt + 5);
#endif
#ifdef CONFIG_ACPI_NUMA
    if (!strncmp(opt, "noacpi", 6))
        acpi_numa = -1;
#endif
    return 0;
}
early_param("numa", numa_setup);


...
/**
 * x86_numa_init - Initialize NUMA
 *
 * Try each configured NUMA initialization method until one succeeds.  The
 * last fallback is dummy single node config encomapssing whole memory and
 * never fails.
 */
void __init x86_numa_init(void)
{
    if (!numa_off) {
#ifdef CONFIG_X86_NUMAQ
        if (!numa_init(numaq_numa_init))
            return;

...


Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

About Me

A software engineer who loves any technologies that makes life easier. That’s why I love Linux and Mac at the same time.

Newsletter

%d bloggers like this: