Date: Sun, 11 Nov 2007 03:53:34 +0100 From: Max Laier <max@love2party.net> To: Maxim Sobolev <sobomax@freebsd.org> Cc: src-committers@freebsd.org, Bruce Evans <brde@optusnet.com.au>, cvs-src@freebsd.org, cvs-all@freebsd.org, Colin Percival <cperciva@freebsd.org>, Nate Lawson <nate@root.org> Subject: Re: cvs commit: src/sys/amd64/amd64 mp_machdep.c src/sys/i386/i386 mp_machdep.c Message-ID: <200711110353.45378.max@love2party.net> In-Reply-To: <47357937.6080400@FreeBSD.org> References: <200711081945.lA8JjKcW080540@repoman.freebsd.org> <20071110190555.I35816@delplex.bde.org> <47357937.6080400@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
--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--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200711110353.45378.max>