From owner-svn-src-all@FreeBSD.ORG Mon Nov 3 09:08:06 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 636169D; Mon, 3 Nov 2014 09:08:06 +0000 (UTC) Received: from mail-wi0-x232.google.com (mail-wi0-x232.google.com [IPv6:2a00:1450:400c:c05::232]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5FA3CFC7; Mon, 3 Nov 2014 09:08:05 +0000 (UTC) Received: by mail-wi0-f178.google.com with SMTP id q5so5742253wiv.17 for ; Mon, 03 Nov 2014 01:08:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=1gTDhs+p7JO3QR1MG54YxyN43Kd11a6NVxh3jXFepjs=; b=wuzVsKD9bfjlcAp/OsmdUVcnR+8N3F85hY+i0S+sJxZZOxVt7GQ1V7H8cXkMWvW2p9 GjBUGjItOEN1YcRnCPSriIrp4lrv7zQrxiY+hbK0Yj8mjbwAWFQyWNLAwfRgG8nJHntn 1JomdmKaw5KElwHf+ZrpG9pEFq7opl47pcuM8ZeNNByrRoHYsZ4cHrUlJL3QQb11oJBe gtK5jLehk8jskshsAeNr1r3BGJk6yetMpIkzGowQOtDe6J4uiFHQ0+cAFy19w0fUBNB/ uHth4FHOqq6u2IxfmydeMpGH9XO8q+pvCHVsZAXGSnbE4hDsmAQnH8cytqTx2/meiqVh Ay4Q== X-Received: by 10.180.104.229 with SMTP id gh5mr14444715wib.42.1415005683711; Mon, 03 Nov 2014 01:08:03 -0800 (PST) Received: from dft-labs.eu (n1x0n-1-pt.tunnel.tserv5.lon1.ipv6.he.net. [2001:470:1f08:1f7::2]) by mx.google.com with ESMTPSA id w10sm21448203wje.10.2014.11.03.01.08.02 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Mon, 03 Nov 2014 01:08:03 -0800 (PST) Date: Mon, 3 Nov 2014 10:08:00 +0100 From: Mateusz Guzik To: Julian Elischer Subject: Re: svn commit: r274017 - head/sys/kern Message-ID: <20141103090800.GG29497@dft-labs.eu> References: <201411030746.sA37kpPu037113@svn.freebsd.org> <54573AEE.9010602@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <54573AEE.9010602@freebsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Mateusz Guzik X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Nov 2014 09:08:06 -0000 On Mon, Nov 03, 2014 at 04:21:02PM +0800, Julian Elischer wrote: > On 11/3/14, 3:46 PM, Mateusz Guzik wrote: > >Author: mjg > >Date: Mon Nov 3 07:46:51 2014 > >New Revision: 274017 > >URL: https://svnweb.freebsd.org/changeset/base/274017 > > > >Log: > > Provide an on-stack temporary buffer for small ioctl requests. > I'm not sure I like this. We don't know how many more levels > of stack may be needed. > I know that machines are getting faster with more memory, > but the current move towards bloating out the > worries me. we started out with a single page of stack (SHARED > with the U-area!). I think we are now at several pages.. I forget, is > it 8? > I'm open to being persuaded but I think we need to have a discussion > about stack usage. We used to say that anything greater that, say > 64 bytes should probably be allocated. > Depends on the arch, 2 on arm and mips, 4 on the rest. Roughly speaking. If 128 in ioctl is really such a big concern I'm happy to make it smaller, but I do prefer to have a buffer covering some stuff. Just booting the system gives: size occurences 4 118 8 60 16 3 20 8 24 33 32 127 36 8 40 16 44 268 48 278 68 1 72 31 80 8 192 1 236 55 256 1 288 22 817 8 Building the kernel gives me over 38000 occurences of size 44 (separate question is what is that ioctl and is it really necessary to call it). That said, maybe 128 was indeed too big. 64 sounds like a nice round number to me. -- Mateusz Guzik