From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S261219AbVFCK6b (ORCPT ); Fri, 3 Jun 2005 06:58:31 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S261215AbVFCK6b (ORCPT ); Fri, 3 Jun 2005 06:58:31 -0400 Received: from mx1.elte.hu ([157.181.1.137]:62946 "EHLO mx1.elte.hu") by vger.kernel.org with ESMTP id S261213AbVFCK6C (ORCPT ); Fri, 3 Jun 2005 06:58:02 -0400 Date: Fri, 3 Jun 2005 12:57:13 +0200 From: Ingo Molnar To: Pekka J Enberg Cc: Linus Torvalds , Pekka Enberg , Andrew Morton , Kernel Mailing List Subject: Re: TASK_NONINTERACTIVE (was: Machine Freezes while Running Crossover Office) Message-ID: <20050603105713.GA29060@elte.hu> References: <84144f0205052911202863ecd5@mail.gmail.com> <1117399764.9619.12.camel@localhost> <1117466611.9323.6.camel@localhost> <20050601073544.GA21384@elte.hu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.1i X-ELTE-SpamVersion: MailScanner 4.31.6-itk1 (ELTE 1.2) SpamAssassin 2.63 ClamAV 0.73 X-ELTE-VirusStatus: clean X-ELTE-SpamCheck: no X-ELTE-SpamCheck-Details: score=-4.9, required 5.9, autolearn=not spam, BAYES_00 -4.90 X-ELTE-SpamLevel: X-ELTE-SpamScore: -4 Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org * Pekka J Enberg wrote: > Unfortunately I have to take that comment back. Under heavy CPU load > [*], the interactivity is worse than with 2.6.11.10. XMMS skips and > the X mouse cursor is all jerky. A better short-term fix would be to > reduce pipe buffer size to 4 KB. > > [*] Running Eclipse and Tomcat while exercising Selenium JavaScript > tests in Firefox. In other words, a JavaScript bot going through a > Java web application. could you please make it double sure and try the attached patch ontop of the other patch? It adds a /proc/sys/kernel/pipe_noninteractive tunable (default: off). It's quite tricky to test interactivity between kernels (there's too much other state that may matter), so having a runtime tunable can help significantly. Could you enable/disable it and see whether it has a negative impact on interactivity? (besides fixing the Wine problem too, of course) Ingo --- linux/fs/pipe.c.orig2 +++ linux/fs/pipe.c @@ -34,16 +34,19 @@ * -- Manfred Spraul 2002-05-09 */ +int pipe_noninteractive; + /* Drop the inode semaphore and wait for a pipe event, atomically */ void pipe_wait(struct inode * inode) { + int flag = pipe_noninteractive ? TASK_NONINTERACTIVE : 0; DEFINE_WAIT(wait); /* * Pipes are system-local resources, so sleeping on them * is considered a noninteractive wait: */ - prepare_to_wait(PIPE_WAIT(*inode), &wait, TASK_INTERRUPTIBLE|TASK_NONINTERACTIVE); + prepare_to_wait(PIPE_WAIT(*inode), &wait, TASK_INTERRUPTIBLE|flag); up(PIPE_SEM(*inode)); schedule(); finish_wait(PIPE_WAIT(*inode), &wait); --- linux/kernel/sysctl.c.orig2 +++ linux/kernel/sysctl.c @@ -66,6 +66,8 @@ extern int printk_ratelimit_jiffies; extern int printk_ratelimit_burst; extern int pid_max_min, pid_max_max; +extern int pipe_noninteractive; + #if defined(CONFIG_X86_LOCAL_APIC) && defined(CONFIG_X86) int unknown_nmi_panic; extern int proc_unknown_nmi_panic(ctl_table *, int, struct file *, @@ -275,6 +277,14 @@ static ctl_table kern_table[] = { .proc_handler = &proc_dointvec, }, { + .ctl_name = KERN_PANIC, + .procname = "pipe_noninteractive", + .data = &pipe_noninteractive, + .maxlen = sizeof(int), + .mode = 0644, + .proc_handler = &proc_dointvec, + }, + { .ctl_name = KERN_CORE_USES_PID, .procname = "core_uses_pid", .data = &core_uses_pid,