From owner-freebsd-amd64@FreeBSD.ORG Sat Mar 18 16:34:55 2006 Return-Path: X-Original-To: freebsd-amd64@freebsd.org Delivered-To: freebsd-amd64@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id CDE7216A41F for ; Sat, 18 Mar 2006 16:34:55 +0000 (UTC) (envelope-from reed@pilchuck.reedmedia.net) Received: from pilchuck.reedmedia.net (pilchuck.reedmedia.net [209.166.74.74]) by mx1.FreeBSD.org (Postfix) with ESMTP id 374DE43D48 for ; Sat, 18 Mar 2006 16:34:55 +0000 (GMT) (envelope-from reed@pilchuck.reedmedia.net) Received: from reed by pilchuck.reedmedia.net with local (Exim 4.44) id 1FKeOE-0006wD-Lc for freebsd-amd64@freebsd.org; Sat, 18 Mar 2006 08:34:54 -0800 Date: Sat, 18 Mar 2006 08:34:54 -0800 (PST) From: "Jeremy C. Reed" To: freebsd-amd64@freebsd.org In-Reply-To: <200603180042.47458.satyam@sklinks.com> Message-ID: References: <200603180042.47458.satyam@sklinks.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: "Jeremy C. Reed" Subject: Re: amd64 webpage, 12GB memory? 64-bit or not? SMP or not? X-BeenThere: freebsd-amd64@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the AMD64 platform List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 18 Mar 2006 16:34:55 -0000 Thank you, Joseph and Scott. I am replying to both Joseph's and Scott's emails below. (Plus I have new questions below :) On Sat, 18 Mar 2006, Joseph Vella wrote: > In the upper left part of the website homepage, there's a single paragraph. > The last sentence of that paragraph has a direct link to the page you refer. Thanks. I overlooked that. I was looking in the various lists of hyperlinks. Maybe the "amd64" could be hyperlinked above? (But then again maybe hyperlinking everything becomes too cluttered.) But I feel it should be hyperlinked for sure direct from the "Get FreeBSD" webpage. > Right after the lines you posted I have "Multiprocessor System Detected: 2 > CPUs": ... > I had to recompile my kernel to get that. I found it pretty easy to do, the > Handbook tells you how. I'm not sure if this was in there but I had to add > "Options SMP" to my kernel config file. That is my point. I do not want to compile and reboot with new kernel to know this. I am not asking how to get SMP enabled. I just want to know if this system even supports it. (Thanks for links to kernconfig.html and handbook. I have had the opportunity to read most of the handbook -- plus several other BSD books in addition to my own *BSD courseware -- already. And I have configured and built FreeBSD kernels hundreds of times, including many with SMP support.) I am looking for something like: "This machine appears to have support for multiprocessors; enabling 'options SMP' may take advantage of this." > The 'LM' string in the AMD Features lines tells you that it can go into long > mode, which means that it can operate in 64 bit mode. Awesome! That was what I was hoping. It would be great if this was listed somewhere, maybe on a FAQ or amd64 or i386 webpage. (If I overlooked this I am sorry, but please point me to it.) (I did find brief note of this in identcpu.c code, but that seems like the wrong way to find out and is not clear.) > > I understand. I know it is running GENERIC as I mentioned. My question is: > > How can I tell if it can take advantage of "options SMP" (from looking at > > 6.0-RELEASE i386 GENERIC output)? > > > > How can I tell if my car takes diesel or unleaded? I'm sorry, but this > questioning sounds a bit hysterical. But, if you truly have no other > way of knowing, compile and run the tool in /usr/src/tools/tools/ncpus. I don't know why it is funny. (Anyways with most cars, even without access to engine, you can look on dash board and on fuel cap and see.) Imagine someone giving you remote access to a system and you don't know what hardware it has (since you can not physically inspect). Rebooting with an SMP kernel seems like the slow way to find out. I am just curious if there is some way without rebooting, maybe the non-SMP kernel could detect and printf at boot time (for dmesg) something like: "It appears this system is multiprocessor; using 'options SMP' may be useful." I have used the ncpu's tool before (ported from FreeBSD to DragonFly). I didn't realize that it could tell a non-SMP kernel user about their multiprocessors. I didn't have a chance to run it yet on FreeBSD 6.0-RELEASE, as it does not compile: In file included from biosmptable.c:37: /usr/include/machine/mptable.h:143: error: syntax error before "pcib" Maybe because device_t is not defined yet. It is defined in sys/bus.h but only if _KERNEL. I will look at that later. It would be useful for a user to know if system is multiprocessor without building and running an outside tool (in this case not even included with FreeBSD 6.0-RELEASE). > > I have been looking at src/sys/i386/i386/identcpu.c. But I am not sure how > > an 64-bit Intel Xeon would behave. (I am guessing it would be CPUCLASS_686.) > > CPUCLASS_686 refers to Pentium Pro and above CPUs, and significantly > predates the 64-bit x86 architecture. But fwiw, the i386 sources files > are not a good place to find 64-bit code. Understood. The system is running FreeBSD-6.0-RELEASE i386 GENERIC. It would be interesting to add to the dmesg output: "Consider using the 'amd64' kernel" if that is appropriate. > > I do see that my dmesg output has AMD featuress with "LM" which means 64-bit > > long mode. But I don't know if that means this is a 64-bit system. > > YES! ... > > I am hoping the system I am looking at can run the amd64 kernel. > > Yes, it sure can. That was the answer I am looking for! Thank you! I will now reboot with an amd64 kernel. (Hopefully with reboot all my 12 GB of memory will be seen; I do understand there are some issues with big memory.) Can you please point me to the webpage that says it is okay to boot an amd64 kernel using a i386 (6.0-RELEASE in this case) userland? (I will update userland after reboot.) Also can you point me to the documentation for cross-compiling amd64 kernel and userland (on i386 host). The point of my email: it would be nice if there was some documentation or webpage or kernel boot output that can suggest to an i386 user that they should consider using an amd64 kernel instead -- and it would be nice if there was some documentation or webpage or kernel boot output that can suggest to a user that an "options SMP" kernel could be beneficial. Booting an amd64 kernel on a (possibly) non-amd64 system seems like the wrong way to find out. Booting an "options SMP" kernel to find out if multiprocessor seems like a slow way to find out. I will submit a patch for the amd64 webpage and maybe the FAQ and maybe the i386 webpage. Please review the following: "If you boot with an i386 kernel and it shows an "AMD Features" line containing an "LM" string, then you are operating in 64-bit long mode and can use an amd64 kernel." (I don't have text for my SMP question since I still do not know the answer.) Thanks again for the replies. Jeremy C. Reed