From owner-cvs-all@FreeBSD.ORG Sun Nov 11 02:54:26 2007 Return-Path: Delivered-To: cvs-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 98AB716A417; Sun, 11 Nov 2007 02:54:26 +0000 (UTC) (envelope-from max@love2party.net) Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.126.188]) by mx1.freebsd.org (Postfix) with ESMTP id 131DF13C491; Sun, 11 Nov 2007 02:54:26 +0000 (UTC) (envelope-from max@love2party.net) Received: from amd64.laiers.local (dslb-088-066-025-148.pools.arcor-ip.net [88.66.25.148]) by mrelayeu.kundenserver.de (node=mrelayeu7) with ESMTP (Nemesis) id 0ML2xA-1Ir2xI3GD2-0005E3; Sun, 11 Nov 2007 03:53:50 +0100 From: Max Laier Organization: FreeBSD To: Maxim Sobolev Date: Sun, 11 Nov 2007 03:53:34 +0100 User-Agent: KMail/1.9.7 References: <200711081945.lA8JjKcW080540@repoman.freebsd.org> <20071110190555.I35816@delplex.bde.org> <47357937.6080400@FreeBSD.org> In-Reply-To: <47357937.6080400@FreeBSD.org> X-Face: ,,8R(x[kmU]tKN@>gtH1yQE4aslGdu+2]; R]*pL,U>^H?)gW@49@wdJ`H<=?utf-8?q?=25=7D*=5FBD=0A=09U=5For=3D=5CmOZf764=26nYj=3DJYbR1PW0ud?=>|!~,,CPC.1-D$FG@0h3#'5"k{V]a~.<=?utf-8?q?mZ=7D44=23Se=7Em=0A=09Fe=7E=5C=5DX5B=5D=5Fxj?=(ykz9QKMw_l0C2AQ]}Ym8)fU MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart3225888.mB67qsGIbI"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <200711110353.45378.max@love2party.net> X-Provags-ID: V01U2FsdGVkX18bYR5oGkwAz6sIiZnZ8FETaXUJeBuiDmntJyc /ujAQZrohUnneoIOOt9/QxiNHeJHjJ7lK9O4Vwx4c3YDARjaMI rFBK+2d2BHtuzEevSqPoyuYyQJVvd5jOV+QneP32Is= Cc: src-committers@freebsd.org, Bruce Evans , cvs-src@freebsd.org, cvs-all@freebsd.org, Colin Percival , Nate Lawson Subject: Re: cvs commit: src/sys/amd64/amd64 mp_machdep.c src/sys/i386/i386 mp_machdep.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Nov 2007 02:54:26 -0000 --nextPart3225888.mB67qsGIbI Content-Type: multipart/mixed; boundary="Boundary-01=_06mNHqxpNSQ1xV/" Content-Transfer-Encoding: 7bit Content-Disposition: inline --Boundary-01=_06mNHqxpNSQ1xV/ Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On Saturday 10 November 2007, Maxim Sobolev wrote: > Bruce Evans wrote: > > Off is a good default since hyperthreading seems to be a > > pessimization in most casts. > > Well, actually it all depends on workload and scheduling. I believe ULE > is expected to improve things quite a bit in scheduling department. > However, even with ol'good SCHED_BSD we measured noticeable performance > increase (15-25%) in CPU intensive real-world tasks with HTT enabled > on 2-way SMP Xeon system. It was in 2004, both CPUs and schedules > should have been improved since that time. How about something along the lines of the attached? Completely untested=20 and my first time to touch sysinstall, but it seems to make sense to give=20 the first time user a tiny hint/choice like that. Would be nice to first=20 check if we are even HTT-capable - how do you figure that out again? =2D-=20 /"\ Best regards, | mlaier@freebsd.org \ / Max Laier | ICQ #67774661 X http://pf4freebsd.love2party.net/ | mlaier@EFnet / \ ASCII Ribbon Campaign | Against HTML Mail and News --Boundary-01=_06mNHqxpNSQ1xV/ Content-Type: text/x-diff; charset="iso-8859-1"; name="htt.sysinstall.diff" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="htt.sysinstall.diff" Index: config.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /home/ncvs/src/usr.sbin/sysinstall/config.c,v retrieving revision 1.242.2.1 diff -u -r1.242.2.1 config.c =2D-- config.c 1 Nov 2007 13:07:28 -0000 1.242.2.1 +++ config.c 11 Nov 2007 02:45:56 -0000 @@ -956,6 +956,27 @@ }=20 #endif =20 +#if defined(__i386__) || defined(__amd64__) +int +configHTT(dialogMenuItem *self) +{ + FILE *ldconf; + + ldconf =3D fopen("/boot/loader.conf", "a"); + if (ldconf =3D=3D NULL) { + msgConfirm("Unable to open /boot/loader.conf. Please set\n" + "machdep.hyperthreading_allowed=3D1 manually.\n"); + return DITEM_FAILURE; + } + + fprintf(ldconf, "# --- Generated by sysinstall ---\n"); + fprintf(ldconf, "machdep.hyperthreading_allowed=3D1\n"); + fclose(ldconf); + + return DITEM_SUCCESS; +}=20 +#endif + int configMTAPostfix(dialogMenuItem *self) { Index: install.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /home/ncvs/src/usr.sbin/sysinstall/install.c,v retrieving revision 1.373 diff -u -r1.373 install.c =2D-- install.c 25 Jun 2007 16:37:16 -0000 1.373 +++ install.c 11 Nov 2007 02:42:15 -0000 @@ -713,6 +713,14 @@ } #endif =20 +#if defined(__i386__) || defined(__amd64__) + dialog_clear_norefresh(); + if (!msgNoYes("Would you like to enable HyperThreading despite possibl= e security issues?\n" + "Consult 'FreeBSD-SA-05:09.htt' for details.\n")) { + (void)configHTT(self); + } +#endif + /* Now would be a good time to checkpoint the configuration data */ configRC_conf(); sync(); Index: sysinstall.h =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /home/ncvs/src/usr.sbin/sysinstall/sysinstall.h,v retrieving revision 1.274 diff -u -r1.274 sysinstall.h =2D-- sysinstall.h 25 Jun 2007 16:37:16 -0000 1.274 +++ sysinstall.h 11 Nov 2007 02:46:53 -0000 @@ -560,6 +560,9 @@ extern int checkLoaderACPI(void); extern int configLoaderACPI(int); #endif +#if defined(__i386__) || defined(__amd64__) +extern int configHTT(dialogMenuItem *self); +#endif =20 /* devices.c */ extern DMenu *deviceCreateMenu(DMenu *menu, DeviceType type, int (*hook)(d= ialogMenuItem *d), --Boundary-01=_06mNHqxpNSQ1xV/-- --nextPart3225888.mB67qsGIbI Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.4 (FreeBSD) iD8DBQBHNm65XyyEoT62BG0RAhYdAJ4zfaDJbpkHf69jPloJbbeF4bQDMQCfZql6 cHRmk1wRW/LikwalW5uoWtY= =XSv9 -----END PGP SIGNATURE----- --nextPart3225888.mB67qsGIbI--