Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751578Ab1BAVPS (ORCPT ); Tue, 1 Feb 2011 16:15:18 -0500 Received: from www.tglx.de ([62.245.132.106]:56172 "EHLO www.tglx.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751622Ab1BAVPQ (ORCPT ); Tue, 1 Feb 2011 16:15:16 -0500 Date: Tue, 1 Feb 2011 22:14:57 +0100 (CET) From: Thomas Gleixner To: john stultz cc: LKML , Richard Cochran , Ingo Molnar , Peter Zijlstra Subject: Re: [patch 08/28] posix-timers: Cleanup restart_block usage In-Reply-To: <1296594674.3336.51.camel@work-vm> Message-ID: References: <20110201134320.688829863@linutronix.de> <20110201134418.232288779@linutronix.de> <1296594674.3336.51.camel@work-vm> User-Agent: Alpine 2.00 (LFD 1167 2008-08-23) 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: 997 Lines: 25 On Tue, 1 Feb 2011, john stultz wrote: > On Tue, 2011-02-01 at 13:51 +0000, Thomas Gleixner wrote: > > - restart_block->fn = posix_cpu_nsleep_restart; > > - restart_block->arg0 = which_clock; > > - restart_block->arg1 = (unsigned long) rmtp; > > - restart_block->arg2 = t.tv_sec; > > - restart_block->arg3 = t.tv_nsec; > > + restart_block->nanosleep.expires = timespec_to_ns(&t); > > The conversion back and forth from nanoseconds to timespec seems a > little extraneous, but short of reworking all of the do_nanosleep calls > to take a ktime I don't see a clean solution (since hrtimer also uses > the restart_block). We could simply add a timespec to the nanosleep struct in the restart_block. Could be a union with expires. Thanks, tglx -- 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/