Date: Wed, 10 Apr 2002 14:55:50 +0900 (JST) From: Atsuo Ohki <ohki@gssm.otsuka.tsukuba.ac.jp> To: FreeBSD-gnats-submit@FreeBSD.org Subject: kern/36953: linux emulation does not work well on SMP Message-ID: <200204100555.g3A5tox02367@smr01.gssm.otsuka.tsukuba.ac.jp>
next in thread | raw e-mail | index | archive | help
>Number: 36953
>Category: kern
>Synopsis: linux emulation does not work well on SMP
>Confidential: no
>Severity: serious
>Priority: high
>Responsible: freebsd-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Tue Apr 09 23:00:01 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator: Atsuo Ohki
>Release: FreeBSD 4.5-RELEASE i386
>Organization:
gssm, Univesity of Tsukua, Tokyo
>Environment:
System: FreeBSD smr01 4.5-RELEASE FreeBSD 4.5-RELEASE #0: Wed Feb 27 19:18:56 JST 2002 ohki@smr01:/usr/src/sys/compile/gssm i386
>Description:
linux emulation does not work well on SMP
>How-To-Repeat:
run Java demo programs of jdk1.4.0
>Fix:
--- sys/i386/linux-REL/linprocfs/linprocfs_misc.c Tue Jun 26 04:46:47 2001
+++ sys/i386/linux/linprocfs/linprocfs_misc.c Mon Feb 25 13:28:52 2002
@@ -41,6 +41,7 @@
* $FreeBSD: src/sys/i386/linux/linprocfs/linprocfs_misc.c,v 1.3.2.8 2001/06/25 19:46:47 pirzyk Exp $
*/
+#include "../../../../../../opt_global.h" /* for SMP */
#include <sys/param.h>
#include <sys/blist.h>
#include <sys/dkstat.h>
@@ -172,7 +173,13 @@
{
char *ps;
int xlen;
+#ifdef SMP
+ extern int mp_ncpus;
+ char psbuf[512*4]; /* XXX - conservative */
+ int cpuidx;
+#else
char psbuf[512]; /* XXX - conservative */
+#endif /* SMP */
int class;
int i;
#if 0
@@ -218,13 +225,20 @@
}
ps = psbuf;
+#ifdef SMP
+ for (cpuidx = 0; cpuidx < mp_ncpus; cpuidx++) {
+#endif /* SMP */
ps += sprintf(ps,
"processor\t: %d\n"
"vendor_id\t: %.20s\n"
"cpu family\t: %d\n"
"model\t\t: %d\n"
"stepping\t: %d\n",
+#ifdef SMP
+ cpuidx, cpu_vendor, class, cpu, cpu_id & 0xf);
+#else
0, cpu_vendor, class, cpu, cpu_id & 0xf);
+#endif /* SMP */
ps += sprintf(ps,
"flags\t\t:");
@@ -248,6 +262,9 @@
(tsc_freq + 4999) / 1000000,
((tsc_freq + 4999) / 10000) % 100);
}
+#ifdef SMP
+ }
+#endif /* SMP */
xlen = ps - psbuf;
xlen -= uio->uio_offset;
>Release-Note:
>Audit-Trail:
>Unformatted:
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200204100555.g3A5tox02367>
