netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: [PATCH] Remove X86_TSC dependency in net profile code
  2003-09-02 23:00 [PATCH] Remove X86_TSC dependency in net profile code Andi Kleen
@ 2003-09-02 22:57 ` David S. Miller
  2003-09-04  7:44 ` David S. Miller
  1 sibling, 0 replies; 3+ messages in thread
From: David S. Miller @ 2003-09-02 22:57 UTC (permalink / raw)
  To: Andi Kleen; +Cc: netdev, kuznet

On Wed, 3 Sep 2003 01:00:57 +0200
Andi Kleen <ak@muc.de> wrote:

> I did not actually compile test this because net profile is commented
> out since a long time and doesn't compile. An alternative if noone comes
> up to fix it would be just to remove it completely.

Alexey, time to remove the net profile stuff?

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

* [PATCH] Remove X86_TSC dependency in net profile code
@ 2003-09-02 23:00 Andi Kleen
  2003-09-02 22:57 ` David S. Miller
  2003-09-04  7:44 ` David S. Miller
  0 siblings, 2 replies; 3+ messages in thread
From: Andi Kleen @ 2003-09-02 23:00 UTC (permalink / raw)
  To: netdev


This removes one of the remaining users of CONFIG_X86_TSC

Replace it with a runtime test instead. In some configurations it 
will be still properly optimized because cpu_has_tsc will expand
to a constant then.

This also makes it handle x86-64.

I did not actually compile test this because net profile is commented
out since a long time and doesn't compile. An alternative if noone comes
up to fix it would be just to remove it completely.

-Andi

--- linux-2.6.0test4/include/net/profile.h-o	2003-05-27 03:00:21.000000000 +0200
+++ linux-2.6.0test4/include/net/profile.h	2003-08-29 19:48:11.000000000 +0200
@@ -29,11 +29,14 @@
 extern struct timeval net_profile_adjust;
 extern void net_profile_irq_adjust(struct timeval *entered, struct timeval* leaved);
 
-#ifdef CONFIG_X86_TSC
+#ifdef CONFIG_X86
 
 static inline void  net_profile_stamp(struct timeval *pstamp)
 {
-	rdtsc(pstamp->tv_usec, pstamp->tv_sec);
+	if (cpu_has_tsc)
+		rdtsc(pstamp->tv_usec, pstamp->tv_sec);
+	else
+		do_gettimeofday(pstamp);
 }
 
 static inline void  net_profile_accumulate(struct timeval *entered,

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

* Re: [PATCH] Remove X86_TSC dependency in net profile code
  2003-09-02 23:00 [PATCH] Remove X86_TSC dependency in net profile code Andi Kleen
  2003-09-02 22:57 ` David S. Miller
@ 2003-09-04  7:44 ` David S. Miller
  1 sibling, 0 replies; 3+ messages in thread
From: David S. Miller @ 2003-09-04  7:44 UTC (permalink / raw)
  To: Andi Kleen; +Cc: netdev

On Wed, 3 Sep 2003 01:00:57 +0200
Andi Kleen <ak@muc.de> wrote:

> I did not actually compile test this because net profile is commented
> out since a long time and doesn't compile. An alternative if noone comes
> up to fix it would be just to remove it completely.

I decided to just kill net profile for now.

Thanks for bringing this to my attention Andi.

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

end of thread, other threads:[~2003-09-04  7:44 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-09-02 23:00 [PATCH] Remove X86_TSC dependency in net profile code Andi Kleen
2003-09-02 22:57 ` David S. Miller
2003-09-04  7:44 ` David S. Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).