Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752993AbYKAQOv (ORCPT ); Sat, 1 Nov 2008 12:14:51 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751671AbYKAQOn (ORCPT ); Sat, 1 Nov 2008 12:14:43 -0400 Received: from netrider.rowland.org ([192.131.102.5]:3771 "HELO netrider.rowland.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1751586AbYKAQOn (ORCPT ); Sat, 1 Nov 2008 12:14:43 -0400 Date: Sat, 1 Nov 2008 12:14:41 -0400 (EDT) From: Alan Stern X-X-Sender: stern@netrider.rowland.org To: Andrew Morton , Ingo Molnar , Linus Torvalds cc: Kernel development list Subject: (BUG?) round_jiffies() is non-monotonic on SMP Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 995 Lines: 29 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? -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/