lkml.org 
[lkml]   [2019]   [Jun]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2] timer: document TIMER_PINNED
On Thu, 27 Jun 2019, Peter Xu wrote:
> + * @TIMER_PINNED: A pinned timer will not be affected by any timer
> + * placement heuristics (like, NOHZ) and will always be run on the CPU
> + * when the timer was enqueued.

s/when/on which/

> + *
> + * Note: Because enqueuing of timers can actually migrate the timer
> + * from one CPU to another, pinned timers are not guaranteed to stay
> + * on the initialy selected CPU. They move to the CPU on which the
> + * enqueue function is invoked via mod_timer() or add_timer(). If the
> + * timer should be placed on a particular CPU, then add_timer_on() has
> + * to be used. It is also suggested that the user should always use
> + * add_timer_on() explicitly for pinned timers.

That last sentence is not correct. add_timer_on() has limitations over
mod_timer(). As pinned prevents the timer from being queued on a remote CPU
mod timer is perfectly fine for many cases.

add_timer_on() is really about queueing a timer on a dedicated CPU, which
is often enough a remote CPU.

Thanks,

tglx

\
 
 \ /
  Last update: 2019-06-27 23:10    [W:0.044 / U:0.376 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site