Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Wed, 1 Nov 2000 13:56:30 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Wed, 1 Nov 2000 13:56:21 -0500 Received: from brutus.conectiva.com.br ([200.250.58.146]:21494 "EHLO brutus.conectiva.com.br") by vger.kernel.org with ESMTP id ; Wed, 1 Nov 2000 13:56:07 -0500 Date: Wed, 1 Nov 2000 16:48:04 -0200 (BRDT) From: Rik van Riel To: David Mansfield cc: lkml Subject: Re: [BUG] /proc//stat access stalls badly for swapping process, 2.4.0-test10 In-Reply-To: <3A006340.93822A@dm.ultramaster.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 1 Nov 2000, David Mansfield wrote: > I'd like to report what seems like a performance problem in the latest > kernels. Actually, all recent kernels have exhibited this problem, but > I was waiting for the new VM stuff to stabilize before reporting it. > > My test is: run 7 processes that each allocate and randomly > access 32mb of ram (on a 256mb machine). Even though 7*32MB = > 224MB, this still sends the machine lightly into swap. The > machine continues to function fairly smoothly for the most part. > I can do filesystem operations, run new programs, move desktops > in X etc. > > Except: programs which access /proc//stat stall for an > inderminate amount of time. For example, 'ps' and 'vmstat' > stall BADLY in these scenarios. I have had the stalls last over > a minute in higher VM pressure situations. I have one possible reason for this .... 1) the procfs process does (in fs/proc/array.c::proc_pid_stat) down(&mm->mmap_sem); 2) but, in order to do that, it has to wait until the process it is trying to stat has /finished/ its page fault, and is not into its next one ... 3) combine this with the elevator starvation stuff (ask Jens Axboe for blk-7 to alleviate this issue) and you have a scenario where processes using /proc//stat have the possibility to block on multiple processes that are in the process of handling a page fault (but are being starved) regards, Rik -- "What you're running that piece of shit Gnome?!?!" -- Miguel de Icaza, UKUUG 2000 http://www.conectiva.com/ http://www.surriel.com/ - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org Please read the FAQ at http://www.tux.org/lkml/