From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752251AbcERIac (ORCPT ); Wed, 18 May 2016 04:30:32 -0400 Received: from www.linutronix.de ([62.245.132.108]:41136 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751950AbcERIaa (ORCPT ); Wed, 18 May 2016 04:30:30 -0400 Date: Wed, 18 May 2016 10:28:43 +0200 (CEST) From: Thomas Gleixner To: Andi Kleen cc: Andrew Morton , LKML , Andi Kleen Subject: Re: [PATCH] Allocate idle task for a CPU always on its local node In-Reply-To: <1463492694-15833-1-git-send-email-andi@firstfloor.org> Message-ID: References: <1463492694-15833-1-git-send-email-andi@firstfloor.org> User-Agent: Alpine 2.11 (DEB 23 2013-08-11) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001,URIBL_BLOCKED=0.001 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 17 May 2016, Andi Kleen wrote: > From: Andi Kleen > > Linux pre-allocates the task structs of the idle tasks for all possible CPUs. > This currently means they all end up on node 0. This also implies > that the cache line of MWAIT, which is around the flags field in the task > struct, are all located in node 0. > > We see a noticeable performance improvement on Knights Landing CPUs when > the cache lines used for MWAIT are located in the local nodes of the CPUs > using them. I would expect this to give a (likely slight) improvement > on other systems too. > > The patch implements placing the idle task in the node of > its CPUs, by passing the right target node to copy_process() > > Signed-off-by: Andi Kleen Acked-by: Thomas Gleixner