Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 30 Aug 2006 14:30:22 -0700
From:      Skylar Thompson <skylar@cs.earlham.edu>
To:        Jordi Carrillo <jordilin@gmail.com>
Cc:        backyard1454-bsd@yahoo.com, freebsd-questions@freebsd.org
Subject:   Re: SMP detection
Message-ID:  <44F6036E.7050203@cs.earlham.edu>
In-Reply-To: <94ff3700608301302n13f9aabcs935fbe6403601d30@mail.gmail.com>
References:  <94ff3700608301020l34251166nbdb4d72842e1bb86@mail.gmail.com>	<20060830181240.65785.qmail@web83106.mail.mud.yahoo.com> <94ff3700608301302n13f9aabcs935fbe6403601d30@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 2440 and 3156)
--------------enig1D4B9E908A40999963E99FB3
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

Jordi Carrillo wrote:
> 2006/8/30, backyard <backyard1454-bsd@yahoo.com>:
>>
>>
>>
>> --- Jordi Carrillo <jordilin@gmail.com> wrote:
>>
>> > I've read that SMP should be disabled for
>> > performance issues (I did not know
>> > that before installing freebsd). I have a P4 3GHz
>> > with hyperthreading
>> > technology. I have the SMP-GENERIC kernel and it
>> > only launches one cpu. So,
>> > I've decided to disable SMP from BIOS. Is that ok?,
>> > knowing that I have a
>> > Smp enabled kernel? or should I install one without
>> > smp? If so, is there a
>> > way to install one already precompiled?
>> > Thanks in advance
>> >
>> > --
>> > http://jordilin.wordpress.com
>> > _______________________________________________
>> > freebsd-questions@freebsd.org mailing list
>> >
>> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
>> > To unsubscribe, send any mail to
>> > "freebsd-questions-unsubscribe@freebsd.org"
>> >
>>
>> if the system runs with one cpu now and you don't
>> enable smp with HT with the sysctl variable then you
>> should be ok. If your not doing SMP then recompiling
>> the kernel for single processor mode will make things
>> run a little quicker because the SMP code won't come
>> into play.
>>
>> with HT disabling in FreeBSD is more for the security
>> issues about a potential exploit whereby one process
>> in one pipe can access the priveledged information of
>> a process in another pipe because the two cores share
>> one processor cache and thus one cache table. To my
>> knowledge this hasn't been exploited yet.
>>
>> If you just install the generic kernel you it should
>> be only the uniprocessor one. I would just do a:
>>
>> cd /usr/src && make buildworld && make
>> KERNCONF=3DGENERIC buildkernel && make KERNCONF=3DGENERIC
>> installkernel
>>
>> as opposed to a binary version assuming you haven't
>> updated yet you won't have to install world but I
>> believe it must have the build in the source tree to
>> build a kernel. On your P4 though the difference
>> between SMP and uniproc may not be worth the trouble
>> because I don't think much of a gain would be made. on
>> a P1 a much different story...
>>
>> if you aren't concerned with bad users or hackers
>> hitting the box I would just enable HT with the sysctl
>> variable. This will not make things run slower at all,
>> just (in theory) less secure, which is why the
>> veriable was created in the first place as I recall.
>> If you are concerned I would wait until you update
>> your system and then just build a GENERIC/CUSTOM
>> kernel without the SMP option set.
>>
>>
>> -brian
>>
>
>
> I will disable smp from bios. If I have a smp kernel, I suppose there
> will
> be no problem after all. Would that be ok?
> The problem with having SMP enabled is that the smp kernel only
> detects one
> cpu and the system monitor only features one cpu as well as gkrellm (in=

> Linux it shows two cpus). When compiling the system monitor shows the
> cpu at
> a maximum of 50%, so what's going on with the other 50%?
> writing machdep.hlt_logical_cpus to 2 in loader.conf does not solve
> anything.
I believe FreeBSD uses the other logical CPU to handle hardware
interrupts, which can still help performance. You can check dmesg to see
how it's actually handling it.

--=20
-- Skylar Thompson (skylar@cs.earlham.edu)
-- http://www.cs.earlham.edu/~skylar/



--------------enig1D4B9E908A40999963E99FB3
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (SunOS)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFE9gNxsc4yyULgN4YRAhafAJ90lPqRE9dmZN89n2JFOtCLh06yVwCfdIOC
8fw31hwZW4j5jA/JLadgAhI=
=vaZC
-----END PGP SIGNATURE-----

--------------enig1D4B9E908A40999963E99FB3--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?44F6036E.7050203>