From: BlaisorBlade <blaisorblade_spam@yahoo.it>
To: user-mode-linux-devel@lists.sourceforge.net
Subject: Re: [uml-devel] making uml work with smp
Date: Mon, 14 Jun 2004 20:09:32 +0200 [thread overview]
Message-ID: <200406142009.32436.blaisorblade_spam@yahoo.it> (raw)
In-Reply-To: <40C8443B.8030809@auto.ucl.ac.be>
Alle 13:21, giovedì 10 giugno 2004, Vincent Guffens ha scritto:
> Hi,
> The only changes that have to be made to compile with SMP is
>
> *add the folowing to arch/um/config.in
>
> define_bool CONFIG_SMP $CONFIG_UML_SMP
> +int 'Number of CPUs' CONFIG_NR_CPUS 1
>
> *change this line in arch/um/kernel/um_arch.c
> -int ncpus = 1;
> +int ncpus = 4;
No, please at least make CONFIG_NR_CPUS == ncpus, PLEASE!
> *turn it on in the kernel config
Well, watch this code in the patch:
+void switch_mm_skas(int mm_fd)
+{
+ int err;
+
+#warning need cpu pid in switch_mm_skas
+ err = ptrace(PTRACE_SWITCH_MM, userspace_pid[0], 0, mm_fd);
+ if(err)
+ panic("switch_mm_skas - PTRACE_SWITCH_MM failed, errno =
%d\n",
+ errno);
+}
+
+void kill_off_processes_skas(void)
+{
+#warning need to loop over userspace_pids in kill_off_processes_skas
+ os_kill_process(userspace_pid[0], 1);
+}
userspace_pid[] is the array of the pids of the "userspace threads" (the
threads in T state, i.e. ptraced, which run the actual code of the guest
userspace). The warning complain that they should act onto the whole array.
Here, instead, you must use smp_processor_id() to determine which CPU you run
on and then use it as userspace_pid index.
+int external_pid_skas(struct task_struct *task)
+{
+#warning Need to look up userspace_pid by cpu
+ return(userspace_pid[0]);
+}
+
+int thread_pid_skas(struct thread_struct *thread)
+{
+#warning Need to look up userspace_pid by cpu
+ return(userspace_pid[0]);
+}
Check any other usage of userspace_pid (on the code, not by debugging) and
you've started solving the crashes. Then you can try again to see if there is
still something.
Bye
--
Paolo Giarrusso, aka Blaisorblade
Linux registered user n. 292729
-------------------------------------------------------
This SF.Net email is sponsored by The 2004 JavaOne(SM) Conference
Learn from the experts at JavaOne(SM), Sun's Worldwide Java Developer
Conference, June 28 - July 1 at the Moscone Center in San Francisco, CA
REGISTER AND SAVE! http://java.sun.com/javaone/sf Priority Code NWMGYKND
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
prev parent reply other threads:[~2004-06-14 23:40 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-06-10 11:21 [uml-devel] making uml work with smp Vincent Guffens
2004-06-14 18:09 ` BlaisorBlade [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200406142009.32436.blaisorblade_spam@yahoo.it \
--to=blaisorblade_spam@yahoo.it \
--cc=user-mode-linux-devel@lists.sourceforge.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox