linux hrtimer affinity
From: Peter Teoh <hidden>
Date: 2012-02-20 02:09:29
Read this: http://lwn.net/Articles/296578/ Take note there are several apis available: schedule_hrtimeout, schedule_hrtimeout_range, schedule_timeout, schedule_timeout_range, schedule_timeout_uninterruptible etc. On Mon, Feb 20, 2012 at 7:50 AM, Peter Teoh [off-list ref] wrote:
On Wed, Feb 15, 2012 at 12:06 AM, Vimal [off-list ref] wrote:quoted
Hi all, Is there a way to set the affinity of hrtimer callback, so that it executes on a particular logical CPU?quoted
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 wasquoted
enqueued in, then the tasklet is scheduled on the same CPU, which makes it difficult to reason serialising locks to per-CPU dataHow about this: http://www.makelinux.net/ldd3/chp-7-sect-5 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: http://www.wil.cx/matthew/lca2003/paper.pdf structures.quoted
Any ideas? Thanks, -- Vimal _______________________________________________ Kernelnewbies mailing list Kernelnewbies at kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies-- Regards, Peter Teoh
-- Regards, Peter Teoh -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20120220/eb0b31d7/attachment.html