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:	Thu, 26 Jul 2007 22:56:13 -0400
From:	Eric St-Laurent <ericstl34@...patico.ca>
To:	Ingo Molnar <mingo@...e.hu>
Cc:	Andrew Morton <akpm@...ux-foundation.org>,
	linux-kernel@...r.kernel.org
Subject: Re: [patch] sched: make cpu_clock() not use the rq clock

On Thu, 2007-26-07 at 11:00 +0200, Ingo Molnar wrote:
> Subject: sched: make cpu_clock() not use the rq clock
> From: Ingo Molnar <mingo@...e.hu>
> 
> it is enough to disable interrupts to get the precise rq-clock
> of the local CPU.

Hi Ingo,

Those new fast nanoseconds resolution clock APIs are nice but it seems
to me that their naming and _where_ they are implemented in the tree is
a little odd, IMO.

We have:

1. sched_clock() is in kernel/sched.c (weak implementation)
2. sched_clock() is in arch/i386/kernel/tsc.c (architecture override)
3. rq_clock() is in kernel/sched.c
4. cpu_clock() is in kernel/sched.c

I would suggest:

1. rename sched_clock() (remove sched_ as it's not sched specific
anymore) and place it in kernel/time/...
2. rename the architecture specific version of it too 

This first function is the basic fast ns clock

3. base your rq_clock() on cpu_clock() (#4) or use the later directly.

This is local to sched.c

4. move cpu_clock() in kernel/time/...

This the per-cpu monotonic version.


See my point? Base the scheduler clock from a general kernel API, not
the other way around.

Just a suggestion.


Best regards,

- Eric


-
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