lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 1 Feb 2011 15:16:14 +0100 (CET)
From:	Thomas Gleixner <tglx@...utronix.de>
To:	John Stultz <john.stultz@...aro.org>
cc:	LKML <linux-kernel@...r.kernel.org>,
	Jamie Lokier <jamie@...reable.org>,
	Alexander Shishkin <virtuoso@...nd.org>,
	Arve Hjønnevåg <arve@...roid.com>
Subject: Re: [PATCH 2/2] hrtimers: Add CLOCK_BOOTTIME clockid, hrtimerbase
 and posix interface

On Mon, 31 Jan 2011, John Stultz wrote:

> CLOCK_MONOTONIC stops while the system is in suspend. This is because
> to applications system suspend is invisible. However, there is a
> growing set of applications that are wanting to be suspend-aware,
> but do not want to deal with the complicatoins of CLOCK_REALTIME
> (which might jump around if settimeofday is called).
> 
> For these applications, I propose a new clockid: CLOCK_BOOTTIME.
> CLOCK_BOOTTIME is idential to CLOCK_MONOTONIC, except it also
> includes any time spent in suspend.
> 
> This patch adds the new CLOCK_BOOTTIME clockid, as well as the
> infrastructure needed to support hrtimers against it, and the
> wiring to expose it out via the posix interface.

Can you please split that into parts:

    - Add the new functions
    - Wire up hrtimers, posix-timers

>  static void hrtimer_get_softirq_time(struct hrtimer_cpu_base *base)
>  {
> -	ktime_t xtim, tomono;
> -	struct timespec xts, tom;
> +	ktime_t xtim, tomono, sleep;
> +	struct timespec xts, tom, slp;
>  	unsigned long seq;
>  
>  	do {
>  		seq = read_seqbegin(&xtime_lock);
>  		xts = __current_kernel_time();
>  		tom = __get_wall_to_monotonic();
> +		slp = __get_sleep_time();
>  	} while (read_seqretry(&xtime_lock, seq));

Hmm, that conflicts with the xtime_lock cleanup in tip/timers/core.

>  /*
>   * Initialize everything, well, just everything in Posix clocks/timers ;)
>   */
> @@ -301,12 +309,18 @@ static __init int init_posix_timers(void)
>  		.timer_create = no_timer_create,
>  		.nsleep = no_nsleep,
>  	};
> +	struct k_clock clock_boottime = {
> +		.clock_getres = hrtimer_get_res,
> +		.clock_get = posix_get_boottime,
> +		.clock_set = do_posix_clock_nosettime,

That's going to conflict with the posix timer cleanup, but it's easy enough to fix.

Thanks,

	tglx
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ