Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Tue, 5 Nov 2002 18:58:14 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Tue, 5 Nov 2002 18:57:19 -0500 Received: from e6.ny.us.ibm.com ([32.97.182.106]:33279 "EHLO e6.ny.us.ibm.com") by vger.kernel.org with ESMTP id ; Tue, 5 Nov 2002 18:56:17 -0500 Date: Tue, 05 Nov 2002 16:57:47 -0800 From: "Martin J. Bligh" To: bert hubert cc: Peter Chubb , jw schultz , LKML Subject: Re: ps performance sucks (was Re: dcache_rcu [performance results]) Message-ID: <27920000.1036544267@flay> In-Reply-To: <20021105231649.GA14511@outpost.ds9a.nl> References: <15816.19206.959160.739312@wombat.chubb.wattle.id.au> <26610000.1036541181@flay> <20021105231649.GA14511@outpost.ds9a.nl> X-Mailer: Mulberry/2.1.2 (Linux/x86) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 886 Lines: 22 >> The locking of walking the tasklist seems non-trivial, but we may well >> end up with something like that. By the time you finish, it looks more >> like a /dev device thing than /proc (which I'm fine with), and looks > > Can people just oprofile this instead of guessing? Opening a file is not > very expensive anymore, so if ps is noticeably slow, it must be something > else. > > 'To measure is to know' Errm... we have profiled it. Look at the subject line ... this started off as a dcache_rcu discussion. The dcache lookup ain't cheap, for starters, but that's not really the problem ... it's O(number of tasks), which sucks. M. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/