Hi, --- borasahin@xxxxxxxxxxx escreveu: > On Tuesday 12 September 2006 18:14, Jakko Pastuchio wrote: > > Hi all, > > > > How can I find out (from within a loadable module) how many CPUs > are there > > in the system ? NR_CPUS macro can help. You can access each CPU availabe for scheduling using "for_each_online_cpu(cpu)" macro. Other macros that can help are for_each_possible_cpu(cpu) and for_each_present_cpu(cpu). You can get more info about these macros from linux/include/linux/cpumask.h. BR, Mauricio Lin. > > > > Can I know on which CPU I (the current module) am running ? > > get_cpu(). > > > Can I choose a CPU to run on ? > > I think you should look for "CPU affinity" to begin with it. > > > thanks...! > > Jakko > > > > -- > > Kernelnewbies: Help each other learn about the Linux kernel. > > Archive: http://mail.nl.linux.org/kernelnewbies/ > > FAQ: http://kernelnewbies.org/faq/ > > -- > Bora SAHIN > > -- > Kernelnewbies: Help each other learn about the Linux kernel. > Archive: http://mail.nl.linux.org/kernelnewbies/ > FAQ: http://kernelnewbies.org/faq/ > > _______________________________________________________ Você quer respostas para suas perguntas? Ou você sabe muito e quer compartilhar seu conhecimento? Experimente o Yahoo! Respostas ! http://br.answers.yahoo.com/ -- Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ FAQ: http://kernelnewbies.org/faq/