Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756573Ab1EPQBV (ORCPT ); Mon, 16 May 2011 12:01:21 -0400 Received: from one.firstfloor.org ([213.235.205.2]:57794 "EHLO one.firstfloor.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756423Ab1EPQBU (ORCPT ); Mon, 16 May 2011 12:01:20 -0400 Date: Mon, 16 May 2011 18:01:14 +0200 From: Andi Kleen To: Denys Vlasenko Cc: Andi Kleen , linux-kernel@vger.kernel.org, libc-alpha@sourceware.org, Andi Kleen Subject: Re: [PATCH 4/5] Add a sysconf syscall Message-ID: <20110516160114.GA25898@one.firstfloor.org> References: <1305329059-2017-1-git-send-email-andi@firstfloor.org> <1305329059-2017-5-git-send-email-andi@firstfloor.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.2i Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 960 Lines: 27 > ...and libc will start making many such calls in a row in order to retrieve > a dozen of such values. It doesn't because the user interface is sysconf(). So the user program just asks for it piece by piece. > It's rather inefficient to return just one word. > Try to return more data per call. I considered that, but is there a concrete use case? I didn't want to code it up without concrete use case. > Pass a pointer to the result struct and its length. > Future-proof API, such as using generously wide data types, > passing "version of struct" input parameter to facilitate incompatible > future changes, etc. Please provide a use case for all this complexity. [... more complexity snipped ... ] -Andi -- 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/