The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* Query about timer wheel API
@ 2024-12-23  0:14 imran.f.khan
  2024-12-23 12:51 ` Hillf Danton
  2025-01-15 10:32 ` Thomas Gleixner
  0 siblings, 2 replies; 10+ messages in thread
From: imran.f.khan @ 2024-12-23  0:14 UTC (permalink / raw)
  To: Thomas Gleixner; +Cc: john.stultz, sboyd, linux-kernel

Hello Thomas,

Could you kindly help me, regarding a query about timer wheel APIs.
Right now we use add_timer or add_timer_on, to add a timer to any
or to a specific CPU respectively.
Would it be useful to have an interface like try_add_timer_on, that
would return an error or would use add_timer, if the specified CPU is
offline.

Recently we have come across some bugs in the RDS code, where a delayed
work was being queued on an offlined CPU and as a result of that the
underlying timer was not firing, which in turn meant that the work was
never able to make it to the intended worker_pool.

I understand that this is something that needs fixing at caller side and
we are taking that approach.

But I also wanted to understand if there is some scope of change on timer
side, for such situations. I saw your reply in [1] and agree with your point.
But that conversation is more than a decade old, so I thought of asking this
question, assuming that there may be some other use cases that can utilize
this new interface.

One can also ask to change queue_delayed_work_on or have an equivalent,
that would check if CPU is online before doing add_timer_on but I am not sure
if workqueue is the only subsystem that can run into this situation.

Thanks in advance for your help,
Imran

[1]: https://lists.linuxcoding.com/kernel/2007-q4/msg27627.html

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2025-01-15 13:49 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-23  0:14 Query about timer wheel API imran.f.khan
2024-12-23 12:51 ` Hillf Danton
2024-12-23 14:20   ` imran.f.khan
2024-12-24 10:41     ` Hillf Danton
2024-12-24 12:41       ` imran.f.khan
2024-12-25 11:01         ` Hillf Danton
2024-12-26 13:07           ` imran.f.khan
2024-12-27 10:30             ` Hillf Danton
2025-01-15 10:32 ` Thomas Gleixner
2025-01-15 13:48   ` imran.f.khan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox