Re: [PATCH 1/4] Zero based percpu: Infrastructure to rebase theper cpu area to zero

From: Ingo Molnar
Date: Tue Jun 10 2008 - 06:06:48 EST



* Mike Travis <travis@xxxxxxx> wrote:

> * Support an option
>
> CONFIG_HAVE_ZERO_BASED_PER_CPU
>
> to make offsets for per cpu variables to start at zero.
>
> If a percpu area starts at zero then:
>
> - We do not need RELOC_HIDE anymore
>
> - Provides for the future capability of architectures providing
> a per cpu allocator that returns offsets instead of pointers.
> The offsets would be independent of the processor so that
> address calculations can be done in a processor independent way.
> Per cpu instructions can then add the processor specific offset
> at the last minute possibly in an atomic instruction.
>
> The data the linker provides is different for zero based percpu segments:
>
> __per_cpu_load -> The address at which the percpu area was loaded
> __per_cpu_size -> The length of the per cpu area
>
> * Removes the &__per_cpu_x in lockdep. The __per_cpu_x are already
> pointers. There is no need to take the address.
>
> * Updates kernel/module.c to be able to deal with a percpu area that
> is loaded at __per_cpu_load but is accessed at __per_cpu_start.
>
> Based on linux-2.6.tip

applied to tip/core/percpu, thanks.

Ingo
--
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/