Skip to contentSkip to conversation

voluntary-preempt-2.6.9-rc2-mm1-S1

PATCH Karsten Wiese 3 participants 6 messages Sep 19, 2004

lore
Share & tools
lore
#0 lore raw

Hi Ingo,

things improved here after having applied swapspace-layout-improvements-2.6.9-rc1-bk12-A1.
I'm happily running jackd and clients realtime now without any dropouts even under heavy swapping pressure.
(Machine is a PIII@600MHz with 256MB RAM)
Could you please include the swapspace-layout-improvements in the voluntary-preempt patches?

Just 1 small correction:

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
time.c 2004-09-19 17:02:35.000000000 +0200 renamed from time.c~ 2004-09-19 15:09:38.000000000 +0200 +0 -0
@@ -96,8 +96,10 @@
 asmlinkage long sys_gettimeofday(struct timeval __user *tv, struct timezone 

__user *tz)
{
#ifdef CONFIG_LATENCY_TRACE
- if (!tv && ((long)tz == 1))

+       if (!tv && ((long)tz == 1)) {
                user_trace_start();
+               tz = NULL;
+       }
        if (!tv && !tz)
                user_trace_stop();

#endif
<<<<

thanks for your splendid patches,
Karsten

#1 lore raw
Quoted 6 lines · Karsten Wiese

Just 1 small correction:

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
time.c 2004-09-19 17:02:35.000000000 +0200 renamed from time.c~ 2004-09-19 15:09:38.000000000 +0200 +0 -0
@@ -96,8 +96,10 @@
 asmlinkage long sys_gettimeofday(struct timeval __user *tv, struct timezone 

time.c 2004-09-19 17:02:35.000000000 +0200 line 105

Quoted 10 lines
time.c 2004-09-19 17:02:35.000000000 +0200 renamed from time.c~ 2004-09-19 15:09:38.000000000 +0200 +3 -1
 __user *tz)
 {
 #ifdef CONFIG_LATENCY_TRACE
-       if (!tv && ((long)tz == 1))
+       if (!tv && ((long)tz == 1)) {
                user_trace_start();
+               tz = NULL;
+       }
        if (!tv && !tz)
                user_trace_stop();

The point is to let gettimeofday(0,1) start tracing and gettimeofday(0,0) stop tracing - a system-call-controlled tracing facility (if trace_enabled=2). This was used to trace weird latencies before, but it's not the normal mode of operation.

Ingo

#2 lore raw

Am Sonntag 19 September 2004 22:48 schrieb Ingo Molnar:

Quoted 6 lines

The point is to let gettimeofday(0,1) start tracing and gettimeofday(0,0) stop tracing - a system-call-controlled tracing facility (if trace_enabled=2). This was used to trace weird latencies before, but it's not the normal mode of operation.

Ok. The other point is a page_fault being generated later on in sys_gettimeofday() if tz is not reset:

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
	if (unlikely(tz != NULL)) {
                     ^^
		if (copy_to_user(tz, &sys_tz, sizeof(sys_tz)))
			return -EFAULT;
	}

<<<<

What do you think about including the swapspace-layout-improvements in the voluntary-preempt patches?

best regards,
Karsten

#3 lore raw
Quoted 10 lines · Karsten Wiese

Am Sonntag 19 September 2004 22:48 schrieb Ingo Molnar:

Quoted 6 lines

The point is to let gettimeofday(0,1) start tracing and gettimeofday(0,0) stop tracing - a system-call-controlled tracing facility (if trace_enabled=2). This was used to trace weird latencies before, but it's not the normal mode of operation.

Ok. The other point is a page_fault being generated later on in sys_gettimeofday() if tz is not reset:

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 6 lines
	if (unlikely(tz != NULL)) {
                     ^^
		if (copy_to_user(tz, &sys_tz, sizeof(sys_tz)))
			return -EFAULT;
	}

<<<<

yeah - it's a bit ugly. The right thing is to return from that branch.

Ingo

#4 lore raw
In reply to Karsten Wiese
Quoted 8 lines · Karsten Wiese

Hi Ingo,

things improved here after having applied swapspace-layout-improvements-2.6.9-rc1-bk12-A1. I'm happily running jackd and clients realtime now without any dropouts even under heavy swapping pressure. (Machine is a PIII@600MHz with 256MB RAM) Could you please include the swapspace-layout-improvements in the voluntary-preempt patches?

only if Andrew agrees that the patch has a chance for -mm inclusion and possible upstream merging.

Ingo

#5 lore raw
Quoted 7 lines · Ingo Molnar
Quoted 4 lines

Could you
please include the swapspace-layout-improvements in the voluntary-preempt patches?

only if Andrew agrees that the patch has a chance for -mm inclusion and possible upstream merging.

It needs more work - from the (brief) testing I did, it didn't seem to improve that which it was intended to improve: swap I/O performance. Not sure why, really.

The latency improvements were serendipitous.