From owner-freebsd-arch@FreeBSD.ORG Wed Feb 26 22:58:32 2014 Return-Path: Delivered-To: arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8900E2DE for ; Wed, 26 Feb 2014 22:58:32 +0000 (UTC) Received: from mail-pa0-x22c.google.com (mail-pa0-x22c.google.com [IPv6:2607:f8b0:400e:c03::22c]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 5A3A21663 for ; Wed, 26 Feb 2014 22:58:32 +0000 (UTC) Received: by mail-pa0-f44.google.com with SMTP id bj1so1611977pad.31 for ; Wed, 26 Feb 2014 14:58:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=content-type:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=LVayOy4tMeMDKrqwE0SXOkeoOiKnsPLrKo3T1tA3+qs=; b=wOyu0deN2RYJZFM5Q1odCrJohcvbdODkxYct59kEtZzzQWetGiCL3AS36uWPh8ZDiz K+C4FuchZlXzNZ7E48w34QGCsIPA6+mJmwy1mzBFvDgKz7BFDAoMa0U1Yb8eYlgoSfLd s/asC45RLTvNfHXoZB5fJa0XYMicuER/S7mONMMuhJBh+yjwk9BcgiKQjl7HeRmPJ5em 3/JTPQ67mN09WClHysHzZDM+HjJv8HvdEY1FjWmFYvhAtQuA1iPO4+JzXfi7v8R9XLBB giScvGLTWV1Laonl+VKlcjpgum3Zrw0M4JdDCHJNO48xsVyxNIA76Xxifuk8Boe4eAUn htXQ== X-Received: by 10.67.1.202 with SMTP id bi10mr11790851pad.68.1393455512069; Wed, 26 Feb 2014 14:58:32 -0800 (PST) Received: from [10.64.26.169] (dc1-prod.netflix.com. [69.53.236.251]) by mx.google.com with ESMTPSA id gj9sm6998585pbc.7.2014.02.26.14.58.23 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 26 Feb 2014 14:58:30 -0800 (PST) Content-Type: text/plain; charset=windows-1252 Mime-Version: 1.0 (Mac OS X Mail 7.2 \(1874\)) Subject: Re: small kernel kernel option... From: Warner Losh In-Reply-To: <20140226222445.GD92037@funkthat.com> Date: Wed, 26 Feb 2014 14:58:20 -0800 Content-Transfer-Encoding: quoted-printable Message-Id: References: <20140226214816.GB92037@funkthat.com> <20140226214816.GB92037@funkthat.com> <5BA6FA29-0BBE-45C1-B734-29013C5A2D29@bsdimp.com> <20140226222445.GD92037@funkthat.com> To: John-Mark Gurney X-Mailer: Apple Mail (2.1874) Cc: arch@freebsd.org X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 26 Feb 2014 22:58:32 -0000 On Feb 26, 2014, at 2:24 PM, John-Mark Gurney wrote: > Warner Losh wrote this message on Wed, Feb 26, 2014 at 14:02 -0800: >>=20 >> On Feb 26, 2014, at 1:48 PM, John-Mark Gurney = wrote: >>=20 >>> I'm about to commit a change to sha256 to speed it up, but the cost >>> of that speed up is an increase in code/data size from just under 1k >>> to almost 9k (as measured on amd64)... this increase is from = unrolling >>> a loop.. >>>=20 >>> Maybe we should have a global kernel option, SMALL_KERNEL, or = something >>> similar that can be used to shrink code size for those that are = trying >>> to build small embedded devices? >>=20 >> I?d prefer something that?s more like OPTIMIZE_SIZE or = OPTIMIZE_SPEED. >=20 > Shall I add OPTIMIZE_SIZE and make OPTIMIZE_SPEED the default (by = being > unspecified)? I don't know of a good way w/ config to make sure only > one or the other is specified (besides having some shared header = #error > if they are.. and though you could say if neither is specified, = balance > that optimization, but I don't see a use for it=85 I=92d toss it into a header. No reason that config needs to error out=85 Warner