On Wed, Feb 15, 2012 at 12:06 AM, Vimal <j.vimal@xxxxxxxxx> wrote:
Hi all,
Is there a way to set the affinity of hrtimer callback, so that it
executes on a particular logical CPU?
The reason is that I have a hrtimer callback that executes a tasklet.
If the timer callback executes on a different CPU than the one it was
enqueued in, then the tasklet is scheduled on the same CPU, which
makes it difficult to reason serialising locks to per-CPU data
How about this:
Tasklet is executed and scheduled on a particular known cpu, so unless u spawn another tasklet that execute on the other CPU, u don't need per-CPU data structure - simply because there is no another CPU to contend with the data structure. Not sure if I got the point?
I am not sure why u need to synchronize stuff "between CPU", as a particular tasklet is only executed on only one CPU at a time:
I suspect what u wanted is a "task". A tasklet is effectively a "bottom half" and u are holding a spinlock while executing it, and thus it really has to be very fast. Read this paper:
structures.
Any ideas?
Thanks,
--
Vimal
_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Regards,
Peter Teoh
_______________________________________________ Kernelnewbies mailing list Kernelnewbies@xxxxxxxxxxxxxxxxx http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies