[PATCH v2 04/18] acpi: Introduce acpi_invalid_table() to check if a table is invalid.

2013-08-01 Thread Tang Chen
In acpi_initrd_override(), it checks several things to ensure the table it found is valid. In later patches, we need to do these check somewhere else. So this patch introduces a common function acpi_invalid_table() to do all these checks, and reuse it in different places. The function will be used

[PATCH v2 02/18] earlycpio.c: Fix the confusing comment of find_cpio_data().

2013-08-01 Thread Tang Chen
The comments of find_cpio_data() says: * @offset: When a matching file is found, this is the offset to the * beginning of the cpio. .. But according to the code, dptr = PTR_ALIGN(p + ch[C_NAMESIZE], 4); nptr = PTR_ALIGN(dptr + ch[C_FILESIZE], 4); *offset = (long)npt

[PATCH v2 01/18] acpi: Print Hot-Pluggable Field in SRAT.

2013-08-01 Thread Tang Chen
The Hot-Pluggable field in SRAT suggests if the memory could be hotplugged while the system is running. Print it as well when parsing SRAT will help users to know which memory is hotpluggable. Signed-off-by: Tang Chen Reviewed-by: Wanpeng Li Reviewed-by: Zhang Yanfei Acked-by: Tejun Heo --- a

[PATCH v2 05/18] x86, acpi: Split acpi_boot_table_init() into two parts.

2013-08-01 Thread Tang Chen
In ACPI, SRAT(System Resource Affinity Table) contains NUMA info. The memory affinities in SRAT record every memory range in the system, and also, flags specifying if the memory range is hotpluggable. (Please refer to ACPI spec 5.0 5.2.16) memblock starts to work at very early time, and SRAT has n

[PATCH v2 08/18] x86: get pg_data_t's memory from other node

2013-08-01 Thread Tang Chen
From: Yasuaki Ishimatsu If system can create movable node which all memory of the node is allocated as ZONE_MOVABLE, setup_node_data() cannot allocate memory for the node's pg_data_t. So, use memblock_alloc_try_nid() instead of memblock_alloc_nid() to retry when the first allocation fails. Otherw

[PATCH v2 07/18] x86, acpi: Also initialize signature and length when parsing root table.

2013-08-01 Thread Tang Chen
Besides the phys addr of the acpi tables, it will be very convenient if we also have the signature of each table in acpi_gbl_root_table_list at early time. We can find SRAT easily by comparing the signature. This patch alse record signature and some other info in acpi_gbl_root_table_list at early

[PATCH v2 11/18] x86, acpi: Try to find SRAT in firmware earlier.

2013-08-01 Thread Tang Chen
This patch introduce early_acpi_firmware_srat() to find the phys addr of SRAT provided by firmware. And call it in find_hotpluggable_memory(). Since we have initialized acpi_gbl_root_table_list earlier, and store all the tables' phys addrs and signatures in it, it is easy to find the SRAT. Signed

[PATCH v2 14/18] memblock, numa: Introduce flag into memblock.

2013-08-01 Thread Tang Chen
There is no flag in memblock to describe what type the memory is. Sometimes, we may use memblock to reserve some memory for special usage. And we want to know what kind of memory it is. So we need a way to differentiate memory for different usage. In hotplug environment, we want to reserve hotplug

Re: [PATCH 16/18] sched: Avoid overloading CPUs on a preferred NUMA node

2013-08-01 Thread Srikar Dronamraju
> +static int task_numa_find_cpu(struct task_struct *p, int nid) > +{ > + int node_cpu = cpumask_first(cpumask_of_node(nid)); > + int cpu, src_cpu = task_cpu(p), dst_cpu = src_cpu; > + unsigned long src_load, dst_load; > + unsigned long min_load = ULONG_MAX; > + struct task_grou

[PATCH v2 12/18] x86, acpi, numa, mem_hotplug: Find hotpluggable memory in SRAT memory affinities.

2013-08-01 Thread Tang Chen
In ACPI SRAT(System Resource Affinity Table), there is a memory affinity for each memory range in the system. In each memory affinity, there is a field indicating that if the memory range is hotpluggable. This patch parses all the memory affinities in SRAT only, and find out all the hotpluggable

[PATCH v2 16/18] memblock, mem_hotplug: Make memblock skip hotpluggable regions by default.

2013-08-01 Thread Tang Chen
Linux kernel cannot migrate pages used by the kernel. As a result, hotpluggable memory used by the kernel won't be able to be hot-removed. To solve this problem, the basic idea is to prevent memblock from allocating hotpluggable memory for the kernel at early time, and arrange all hotpluggable memo

[PATCH v2 15/18] memblock, mem_hotplug: Introduce MEMBLOCK_HOTPLUG flag to mark hotpluggable regions.

2013-08-01 Thread Tang Chen
In find_hotpluggable_memory, once we find out a memory region which is hotpluggable, we want to mark them in memblock.memory. So that we could control memblock allocator not to allocte hotpluggable memory for the kernel later. To achieve this goal, we introduce MEMBLOCK_HOTPLUG flag to indicate th

[PATCH v2 17/18] mem-hotplug: Introduce movablenode boot option to {en|dis}able using SRAT.

2013-08-01 Thread Tang Chen
The Hot-Pluggable fired in SRAT specifies which memory is hotpluggable. As we mentioned before, if hotpluggable memory is used by the kernel, it cannot be hot-removed. So memory hotplug users may want to set all hotpluggable memory in ZONE_MOVABLE so that the kernel won't use it. Memory hotplug us

[PATCH v2 13/18] x86, numa, mem_hotplug: Skip all the regions the kernel resides in.

2013-08-01 Thread Tang Chen
At early time, memblock will reserve some memory for the kernel, such as the kernel code and data segments, initrd file, and so on, which means the kernel resides in these memory regions. Even if these memory regions are hotpluggable, we should not mark them as hotpluggable. Otherwise the kernel w

[PATCH v2 00/18] Arrange hotpluggable memory as ZONE_MOVABLE.

2013-08-01 Thread Tang Chen
This patch-set aims to solve some problems at system boot time to enhance memory hotplug functionality. [Background] The Linux kernel cannot migrate pages used by the kernel because of the kernel direct mapping. Since va = pa + PAGE_OFFSET, if the physical address is changed, we cannot simply upd

[PATCH v2 09/18] x86: Make get_ramdisk_{image|size}() global.

2013-08-01 Thread Tang Chen
In the following patches, we need to call get_ramdisk_{image|size}() to get initrd file's address and size. So make these two functions global. v1 -> v2: As tj suggested, make these two function static inline in arch/x86/include/asm/setup.h. Signed-off-by: Tang Chen Reviewed-by: Zhang Yanfei --

[PATCH v2 10/18] x86, acpi: Try to find if SRAT is overrided earlier.

2013-08-01 Thread Tang Chen
Linux cannot migrate pages used by the kernel due to the direct mapping (va = pa + PAGE_OFFSET), any memory used by the kernel cannot be hot-removed. So when using memory hotplug, we have to prevent the kernel from using hotpluggable memory. The ACPI table SRAT (System Resource Affinity Table) con

[PATCH 0/8] ARM: at91/dt: make use of periph id macros

2013-08-01 Thread Boris BREZILLON
Hello, This patch series move at91 SoCs peripheral id definitions from machine specific include dir to dt-bindings include dir. These macros are used to reference interrupts instead of peripheral numbers. This makes dt definitions cleaner and easier to debug (one can easily tell if the peripheral

Re: [PATCH -v2] sched,x86: optimize switch_mm for multi-threaded workloads

2013-08-01 Thread Ingo Molnar
* Linus Torvalds wrote: > On Wed, Jul 31, 2013 at 7:14 PM, Rik van Riel wrote: > > > > Is this better? Not that I really care which version gets applied :) > > I'm ok with this. > > That said, I'm assuming this goes in through Ingo, since it is both > x86 and scheduler-related. I can take it

[PATCH 4/8] ARM: at91/dt: use periph id macros for at91sam9263 interrupt definitions

2013-08-01 Thread Boris BREZILLON
This patch make use of the peripheral id macros defined in dt-bindings/at91/at91sam9263/peripherals.h to register peripheral interrupts. Signed-off-by: Boris BREZILLON --- arch/arm/boot/dts/at91sam9263.dtsi | 46 +++- 1 file changed, 24 insertions(+), 22 deletio

[PATCH 2/8] ARM: at91/dt: use periph id macros for at91rm9200 interrupt definitions

2013-08-01 Thread Boris BREZILLON
This patch make use of the peripheral id macros defined in dt-bindings/at91/at91rm9200/peripherals.h to register peripheral interrupts. Signed-off-by: Boris BREZILLON --- arch/arm/boot/dts/at91rm9200.dtsi | 59 + 1 file changed, 33 insertions(+), 26 deletion

[PATCH 8/8] ARM: at91/dt: use periph id macros for sama5d3 interrupt definitions

2013-08-01 Thread Boris BREZILLON
This patch make use of the peripheral id macros defined in dt-bindings/at91/sama5d3/peripherals.h to register peripheral interrupts. Signed-off-by: Boris BREZILLON --- arch/arm/boot/dts/sama5d3.dtsi | 83 1 file changed, 42 insertions(+), 41 deletions(-

[PATCH 7/8] ARM: at91/dt: use periph id macros for at91sam9x5 interrupt definitions

2013-08-01 Thread Boris BREZILLON
This patch make use of the peripheral id macros defined in dt-bindings/at91/at91sam9x5/peripherals.h to register peripheral interrupts. Signed-off-by: Boris BREZILLON --- arch/arm/boot/dts/at91sam9x5.dtsi | 63 +++-- 1 file changed, 32 insertions(+), 31 deletion

<    4   5   6   7   8   9