Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S262712AbUCRP4R (ORCPT ); Thu, 18 Mar 2004 10:56:17 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S262718AbUCRP4R (ORCPT ); Thu, 18 Mar 2004 10:56:17 -0500 Received: from fw.osdl.org ([65.172.181.6]:33466 "EHLO mail.osdl.org") by vger.kernel.org with ESMTP id S262712AbUCRP4P (ORCPT ); Thu, 18 Mar 2004 10:56:15 -0500 Date: Thu, 18 Mar 2004 07:55:54 -0800 (PST) From: Linus Torvalds To: Christoph Hellwig cc: Ingo Molnar , Ulrich Drepper , Linux Kernel , Andrew Morton Subject: Re: sched_setaffinity usability In-Reply-To: <20040318120709.A27841@infradead.org> Message-ID: References: <40595842.5070708@redhat.com> <20040318112913.GA13981@elte.hu> <20040318120709.A27841@infradead.org> 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: 1407 Lines: 36 On Thu, 18 Mar 2004, Christoph Hellwig wrote: > > Like, umm, the long overdue sysconf()? For the time beeing a sysctl might > be the easiest thing.. "sysconf" has not been "long-overdue". It's just that glibc hasn't (after years of pleading) just fixed it. sysconf() MUST NOT be done in kernel space. A lot of the sysconf() options are pure user space stuff that the kernel has no idea about. Take a quick look at some of those things, and realize that there are things like "_SC_EXPR_NEST_MAX" etc that are _most_ of the values. And the kernel is simply not involved in any of this. So I will tell this one more time (and I bet I'll have to repeat myself again in a year or two, and I bet I'll be ignored then too). sysconf() is a user-level implementation issue, and so is something like "number of CPU's". Damn, the simplest way to do it is as a environment variable, for christ sake! Just make a magic environment variable called __SC_ARRAY, and make it be some kind of binary encoding if you worry about performance. Or make a "/etc/sysconf/array" file, and just map it and look up the values there. Please don't raise this issue again. Linus - 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/