Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Sun, 23 Feb 2003 13:39:43 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Sun, 23 Feb 2003 13:39:43 -0500 Received: from mx1.elte.hu ([157.181.1.137]:6851 "HELO mx1.elte.hu") by vger.kernel.org with SMTP id ; Sun, 23 Feb 2003 13:39:42 -0500 Date: Sun, 23 Feb 2003 19:49:41 +0100 (CET) From: Ingo Molnar Reply-To: Ingo Molnar To: procps-list@redhat.com Cc: Linus Torvalds , , Alex Larsson , Alexander Viro Subject: Re: [patch] procfs/procps threading performance speedup, 2.5.62 In-Reply-To: <1045947170.19445.57.camel@cube> 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 Content-Length: 1611 Lines: 39 On 22 Feb 2003, Albert Cahalan wrote: > > architecture-wise there is a difference, and i'd be > > the last one arguing against a tree-based approach to > > thread groups. It's much easier to find threads belonging > > to a single 'process' via /proc this way - although no > > functionality in procps has or requires such a feature currently. > > Nope, the /proc/123/threads/246/stat approach is required. Without this, > procps is forced to read _all_ tasks to group threads together. This is > slow, prone to race conditions, more vulnerable to kernel bugs, and a > memory hog. actually, what you mention does not happen in practice. We coded it up and it works, and with tons of threads around it performs a few orders of magnitudes faster than any other stuff available so far. So the question here is 'only' interface/approach cleanliness, not actual performance difference. Sure, we could shave off another millisec or two, but the performance problems are off the radar already. > Note that the recent /proc/*/wchan addition was botched. (fyi, i have nothing to do with that change, so spare your insults for someone else.) > (next time, discuss such changes with an experienced procps developer > first) (given that this whole area was left alone in a state like this for years i'm not quite sure how you can still sit so high on your horse.) Ingo - 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/