From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755813Ab2F1M6c (ORCPT ); Thu, 28 Jun 2012 08:58:32 -0400 Received: from mx1.redhat.com ([209.132.183.28]:31181 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755730Ab2F1M61 (ORCPT ); Thu, 28 Jun 2012 08:58:27 -0400 From: Andrea Arcangeli To: linux-kernel@vger.kernel.org, linux-mm@kvack.org Cc: Hillf Danton , Dan Smith , Peter Zijlstra , Linus Torvalds , Andrew Morton , Thomas Gleixner , Ingo Molnar , Paul Turner , Suresh Siddha , Mike Galbraith , "Paul E. McKenney" , Lai Jiangshan , Bharata B Rao , Lee Schermerhorn , Rik van Riel , Johannes Weiner , Srivatsa Vaddagiri , Christoph Lameter , Alex Shi , Mauricio Faria de Oliveira , Konrad Rzeszutek Wilk , Don Morris , Benjamin Herrenschmidt Subject: [PATCH 15/40] autonuma: knuma_migrated per NUMA node queues Date: Thu, 28 Jun 2012 14:55:55 +0200 Message-Id: <1340888180-15355-16-git-send-email-aarcange@redhat.com> In-Reply-To: <1340888180-15355-1-git-send-email-aarcange@redhat.com> References: <1340888180-15355-1-git-send-email-aarcange@redhat.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This implements the knuma_migrated queues. The pages are added to these queues through the NUMA hinting page faults (memory follow CPU algorithm with false sharing evaluation) and knuma_migrated then is waken with a certain hysteresis to migrate the memory in round robin from all remote nodes to its local node. The head that belongs to the local node that knuma_migrated runs on, for now must be empty and it's not being used. Signed-off-by: Andrea Arcangeli --- include/linux/mmzone.h | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h index 2427706..d53b26a 100644 --- a/include/linux/mmzone.h +++ b/include/linux/mmzone.h @@ -697,6 +697,12 @@ typedef struct pglist_data { struct task_struct *kswapd; int kswapd_max_order; enum zone_type classzone_idx; +#ifdef CONFIG_AUTONUMA + spinlock_t autonuma_lock; + struct list_head autonuma_migrate_head[MAX_NUMNODES]; + unsigned long autonuma_nr_migrate_pages; + wait_queue_head_t autonuma_knuma_migrated_wait; +#endif } pg_data_t; #define node_present_pages(nid) (NODE_DATA(nid)->node_present_pages)