lkml.org 
[lkml]   [2010]   [Nov]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] kthread: NUMA aware kthread_create_on_cpu()
On Mon, Nov 29, 2010 at 12:37:04AM +0100, Eric Dumazet wrote:
> Le lundi 29 novembre 2010 à 00:01 +0100, Andi Kleen a écrit :
> > On Sun, Nov 28, 2010 at 11:51:51PM +0100, Eric Dumazet wrote:
> > > > Also this messes up the policy of the caller process. You really
> > > > need to save/restore it.
> > >
> > > Well, caller process duty is to create kthreads in a loop.
> >
> > In this case any other allocations it may do
> > are still on those
> > nodes.
>
> As I said, it does only create_kthread() calls, and no "other
> allocations".

Code changes. Your current setup seems fragile (also
the static variable)

> > > > for the stack, so may be a larger patch.
> > >
> > > I suggest arches that need slab to allocate kthread stacks do the
> > > appropriate changes, because I am not able to make them myself.
> > >
> > > On x86, we use page allocator only, so NUMA mempolicy is used.
> >
> > task_struct is always allocated from slab.
>
> Hmm, I meant stack (the thing that might be trashed a lot in ksoftirqd),
> so it is included in struct thread_info

task_struct is quite hot too. Also your original mail said
task struct i believe.

> And got correct stacks. Are you sure we must use PREFERRED ?

Yes.

-Andi

--
ak@linux.intel.com -- Speaking for myself only.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2010-11-29 10:07    [W:0.059 / U:10.664 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site