From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from psmtp.com (na3sys010amx105.postini.com [74.125.245.105]) by kanga.kvack.org (Postfix) with SMTP id E5DDC6B006C for ; Thu, 5 Jul 2012 08:04:29 -0400 (EDT) Received: by qcsd16 with SMTP id d16so5317061qcs.14 for ; Thu, 05 Jul 2012 05:04:28 -0700 (PDT) Date: Thu, 5 Jul 2012 08:04:13 -0400 From: Konrad Rzeszutek Wilk Subject: Re: [PATCH 09/40] autonuma: introduce kthread_bind_node() Message-ID: <20120705120412.GA12779@localhost.localdomain> References: <1340888180-15355-1-git-send-email-aarcange@redhat.com> <1340888180-15355-10-git-send-email-aarcange@redhat.com> <20120630045013.GB3975@localhost.localdomain> <20120704231425.GP25743@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20120704231425.GP25743@redhat.com> Sender: owner-linux-mm@kvack.org List-ID: To: Andrea Arcangeli Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, 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 > /** > * kthread_bind_node - bind a just-created kthread to the CPUs of a node. > * @p: thread created by kthread_create(). > * @nid: node (might not be online, must be possible) for @k to run on. > * > * Description: This function is equivalent to set_cpus_allowed(), > * except that @nid doesn't need to be online, and the thread must be > * stopped (i.e., just returned from kthread_create()). > */ > void kthread_bind_node(struct task_struct *p, int nid) > { > /* Must have done schedule() in kthread() before we set_task_cpu */ > if (!wait_task_inactive(p, TASK_UNINTERRUPTIBLE)) { > WARN_ON(1); > return; > } > > /* It's safe because the task is inactive. */ > do_set_cpus_allowed(p, cpumask_of_node(nid)); > p->flags |= PF_THREAD_BOUND; > } > EXPORT_SYMBOL(kthread_bind_node); > > The above should explain why it's not _GPL right now. As far as > AutoNUMA is concerned I can drop the EXPORT_SYMBOL completely and not > allow modules to call this. In fact I could have coded this inside > autonuma too. Ok. How about dropping it and then if its needed for modules then export it out. > > I can change it to _GPL, drop the EXPORT_SYMBOL or move it inside the > autonuma code, let me know what you prefer. If I hear nothing I won't > make changes. > > Thanks, > Andrea > -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org