Re: Linux compatible setaffinity.



On Thu, 21 Feb 2008, David Xu wrote:

Robert Watson wrote:

On Wed, 20 Feb 2008, Jeff Roberson wrote:

So perhaps this means a slightly more complex API, but not much more complex. How about:

int cpuaffinity_get(scope, id, length, mask)
int cpuaffinity_getmax(scope, id, length, mask)
int cpuaffinity_set(scope, id, length, mask)
int cpuaffinity_setmax(scope, id, length, mask)


Are these features only for jail or something else which don't care CPU
L2 cache sharing between cores ? since program still can not figure out
L2 sharing information, no way to optimize its thread's cpu arrangement.

These are all for binding to specific cpu sets. Potentially with some support for creating something like solaris psets. This is when you have some static information about what processors to use.

I think a cache aware solution will be the next process. I have a patch which allows the kernel scheduler to understand the cache hierarchies in the system. This information could be exported to userland if that would be useful.


Regards,
David Xu

_______________________________________________
freebsd-arch@xxxxxxxxxxx mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-arch
To unsubscribe, send any mail to "freebsd-arch-unsubscribe@xxxxxxxxxxx"



Relevant Pages

  • [PATCH] bitmap parsing routines, version 3
    ... int bitmap_weight(const unsigned long *bitmap, ... * bitmap_snprintf - convert bitmap to a hex string. ... * and a length, describing the mask contents. ...
    (Linux-Kernel)
  • [PATCH 03/18] flag parameters: paccept
    ... This syscall differs from accept in that it adds ... The flags parameter can be used to set flag like SOCK_CLOEXEC. ... we really want the signal mask ... handler (int s) ...
    (Linux-Kernel)
  • [PATCH 02/18] flag parameters: paccept
    ... This syscall differs from accept in that it adds ... The flags parameter can be used to set flag like SOCK_CLOEXEC. ... we really want the signal mask ... handler (int s) ...
    (Linux-Kernel)
  • [RFC] bitmap relative operator for mempolicy extensions
    ... mask is set, then the m-th bit of the destination mask will ... int nodelist_scnprintfFormat nodemask as list for printing ... +#define nodes_relative(dst, orig, relmap) \ ... * Set the n-th bit of @dst iff there exists some m such that the ...
    (Linux-Kernel)
  • Re: [PATCH 2/3] RT: Cache cpus_allowed weight for optimizing migration
    ... weight of the task->cpus_allowed mask. ... unsigned int time_slice; ... #ifdef CONFIG_PREEMPT_RCU ... This would properly update the migration state. ...
    (Linux-Kernel)