From owner-freebsd-current@FreeBSD.ORG Sun Jan 22 17:34:22 2006 Return-Path: X-Original-To: freebsd-current@freebsd.org Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 415BB16A41F for ; Sun, 22 Jan 2006 17:34:22 +0000 (GMT) (envelope-from dunstan@zsno.ids.czest.pl) Received: from zsno.ids.czest.pl (zsno.ids.czest.pl [212.87.237.66]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7624343D5A for ; Sun, 22 Jan 2006 17:34:21 +0000 (GMT) (envelope-from dunstan@zsno.ids.czest.pl) Received: from zsno.ids.czest.pl (localhost [127.0.0.1]) by zsno.ids.czest.pl (8.13.4/8.13.3) with ESMTP id k0MJEAAQ084614 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 22 Jan 2006 20:14:10 +0100 (CET) (envelope-from dunstan@zsno.ids.czest.pl) Received: (from dunstan@localhost) by zsno.ids.czest.pl (8.13.4/8.13.3/Submit) id k0MJE9BK084613; Sun, 22 Jan 2006 20:14:09 +0100 (CET) (envelope-from dunstan) Date: Sun, 22 Jan 2006 20:14:09 +0100 From: "Wojciech A. Koszek" To: Maxim.Sobolev@portaone.com Message-ID: <20060122191409.GB84400@zsno.ids.czest.pl> References: <20060114223019.GA99634@FreeBSD.czest.pl> <43CC168D.9080708@portaone.com> <20060118082804.GC4846@FreeBSD.czest.pl> <43CF22AD.3080702@portaone.com> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-2 Content-Disposition: inline In-Reply-To: <43CF22AD.3080702@portaone.com> User-Agent: Mutt/1.4.2.1i X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.0 (zsno.ids.czest.pl [127.0.0.1]); Sun, 22 Jan 2006 20:14:10 +0100 (CET) X-Spam-Status: No, score=-2.8 required=4.0 tests=ALL_TRUSTED autolearn=ham version=3.0.4 X-Spam-Checker-Version: SpamAssassin 3.0.4 (2005-06-05) on zsno.ids.czest.pl X-Virus-Scanned: ClamAV version 0.87, clamav-milter version 0.87 on zsno.ids.czest.pl X-Virus-Status: Clean Cc: freebsd-current@freebsd.org Subject: Re: [PATCH] Support for large number of md(4) disks X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Jan 2006 17:34:22 -0000 On Wed, Jan 18, 2006 at 09:25:01PM -0800, Maxim Sobolev wrote: > Wojciech A. Koszek wrote: > >On Mon, Jan 16, 2006 at 01:56:29PM -0800, Maxim Sobolev wrote: > >>Hi, > > > >Hi Maxim, > > > >>IMHO there is better approach to fetch unknown amount of data from the > >>kernel using ioctl(2) facility. The main idea is that you allocate some > >>buffer of size sufficient in 95% of cases (for md(4) I think 8-16 > >>entries are enough), attach it to some structure which has size of the > >>buffer as one of its members and send pointer to that structure as an > >>argument to ioctl(2). [..] > Yes, there is a difference. I don't like your approach when you are > trying to win the race fixed amount of times (5) and then just bailing > out, asymptotic approach is better IMHO. Especially considering that > memory is cheap nowadays and you won't have any problems with allocating > space for many thousand configuration entries, even in the case when you > are really going to use only few of them. > > Regarding you assumption that meeting the situation when total number of > devices changes quickly I don't quite agree. A simple script can make > number of md(4) devices going up/down by few hundred per second easily, > your approach will behave erratically in such case. > I got some feedback from people who use md(4) in such cases. Looking at bugs@ gives me a feel there is also a real need for mdconfig -l working properly.. ...this is why updated patch is here: http://zsno.ids.czest.pl/~dunstan/FreeBSD/mdconfig-list.3.patch It starts with 16 entries in the user-space. Thanks! -- * Wojciech Koszek &&