lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1291043604.3435.969.camel@edumazet-laptop>
Date:	Mon, 29 Nov 2010 16:13:23 +0100
From:	Eric Dumazet <eric.dumazet@...il.com>
To:	Andi Kleen <andi@...stfloor.org>
Cc:	Andrew Morton <akpm@...ux-foundation.org>,
	linux-kernel <linux-kernel@...r.kernel.org>,
	linux-arch@...r.kernel.org, netdev <netdev@...r.kernel.org>,
	David Miller <davem@...emloft.net>, Tejun Heo <tj@...nel.org>,
	Rusty Russell <rusty@...tcorp.com.au>,
	Tony Luck <tony.luck@...el.com>,
	Fenghua Yu <fenghua.yu@...el.com>
Subject: [PATCH v2 0/4] kthread: NUMA aware kthread_create_on_cpu()

Note : compiled and tested on x86_32 and x86_64 only, but these patches
take care of other arches as well.

Cc: linux-arch@...r.kernel.org 

Thanks for your feedback Andi !


[PATCH v2 0/4] kthread: NUMA aware kthread_create_on_cpu()

All kthreads being created from a single helper task, they all use
memory from a single node for their kernel stack and task struct.

This patch suite creates kthread_create_on_cpu(), adding a 'cpu'
parameter to parameters already used by kthread_create().

This parameter serves in allocating memory for the new kthread on its
memory node if available.

Users of this new function are : ksoftirqd, kworker, migration,
pktgend...


Patch 1/4 mm: NUMA aware alloc_task_struct_node()

alloc_task_struct(void) becomes alloc_task_struct_node(int node)

Patch 2/4 mm: NUMA aware alloc_thread_info_node()

alloc_thread_info(struct task_struct *tsk) becomes
alloc_thread_info_node(struct task_struct *tsk, int node)

Patch 3/4 kthread: NUMA aware kthread_create_on_cpu()

Patch 4/4 kthread: use kthread_create_on_cpu() 

ksoftirqd, kworker, migration, and pktgend kthreads can be created with
NUMA aware kthread_create_on_cpu()

Signed-off-by: Eric Dumazet <eric.dumazet@...il.com>
Cc: David Miller <davem@...emloft.net>
Cc: Andi Kleen <andi@...stfloor.org>
Cc: Andrew Morton <akpm@...ux-foundation.org>
Cc: Rusty Russell <rusty@...tcorp.com.au>
Cc: Tejun Heo <tj@...nel.org>
Cc: linux-arch@...r.kernel.org
Cc: Tony Luck <tony.luck@...el.com>
Cc: Fenghua Yu <fenghua.yu@...el.com>
---
 arch/cris/include/asm/thread_info.h     |    2 -
 arch/frv/include/asm/processor.h        |    2 -
 arch/frv/include/asm/thread_info.h      |   13 ++------
 arch/frv/kernel/process.c               |    5 ++-
 arch/ia64/include/asm/thread_info.h     |   14 +++++++--
 arch/m32r/include/asm/thread_info.h     |   13 ++------
 arch/mips/include/asm/thread_info.h     |    6 ++--
 arch/mn10300/include/asm/thread_info.h  |    6 ++--
 arch/powerpc/include/asm/thread_info.h  |    2 -
 arch/powerpc/kernel/process.c           |    4 +-
 arch/score/include/asm/thread_info.h    |    2 -
 arch/sh/include/asm/thread_info.h       |    2 -
 arch/sh/kernel/process.c                |   16 ++++++-----
 arch/sparc/include/asm/thread_info_32.h |    6 ++--
 arch/sparc/include/asm/thread_info_64.h |   24 ++++++++--------
 arch/sparc/mm/srmmu.c                   |    4 +-
 arch/sparc/mm/sun4c.c                   |    4 +-
 arch/tile/include/asm/thread_info.h     |    2 -
 arch/tile/kernel/process.c              |    4 +-
 arch/um/include/asm/processor-generic.h |    2 -
 arch/x86/include/asm/thread_info.h      |   10 +++++-
 include/linux/kthread.h                 |   14 ++++++---
 include/linux/sched.h                   |    1 
 kernel/fork.c                           |   20 ++++++++-----
 kernel/kthread.c                        |   32 +++++++++++++++++-----
 kernel/softirq.c                        |    3 +-
 kernel/stop_machine.c                   |    4 +-
 kernel/workqueue.c                      |    4 +-
 net/core/pktgen.c                       |    3 +-
 29 files changed, 135 insertions(+), 89 deletions(-)



--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ