mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* (BUG?) round_jiffies() is non-monotonic on SMP
@ 2008-11-01 16:14 Alan Stern
  2008-11-01 16:29 ` Arjan van de Ven
  0 siblings, 1 reply; 7+ messages in thread
From: Alan Stern @ 2008-11-01 16:14 UTC (permalink / raw)
  To: Andrew Morton, Ingo Molnar, Linus Torvalds; +Cc: Kernel development list

Is it generally recognized that round_jiffies() can be non-monotonic on 
SMP systems?  By this, I mean that if cpu-a and cpu-b respectively do:

	ra = round_jiffies(ja);

		and

	rb = round_jiffies(jb);

then the ordering of ra and rb can be opposite the ordering of ja and 
jb.

If this is known, is it regarded as a potential problem?  It certainly
seems likely that some code somewhere depends on timeouts expiring in
the correct order.

Alan Stern

P.S.: As a related matter, it seems very odd that we don't have a 
round_jiffies_up() routine.  Surely there are plenty of places where it 
doesn't matter if an event is a little late but where the event must 
not be early.  (I know two such places offhand.)  Any objection to 
having one added?


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

end of thread, other threads:[~2008-11-02 15:40 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-11-01 16:14 (BUG?) round_jiffies() is non-monotonic on SMP Alan Stern
2008-11-01 16:29 ` Arjan van de Ven
2008-11-01 19:54   ` Alan Stern
2008-11-01 20:16     ` Arjan van de Ven
2008-11-02  2:36       ` Alan Stern
2008-11-02  2:43         ` Arjan van de Ven
2008-11-02 15:39           ` Alan Stern

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

all inboxes | Powered by JetHome®