Message ID | 53AAB8A5.1040205@linaro.org |
---|---|
State | Not Applicable, archived |
Headers | show |
On Wed, 2014-06-25 at 12:55 +0100, Julien Grall wrote: > On 06/25/2014 12:45 PM, Ian Campbell wrote: > > On Wed, 2014-06-25 at 12:40 +0100, Julien Grall wrote: > >> On 06/25/2014 09:28 AM, Ian Campbell wrote: > >>> On Tue, 2014-06-24 at 13:57 -0400, John McDermott wrote: > >>>> Xen Developers, > >>>> > >>>> Trying to build arm64 on x86_64 following the guidance on the wiki; > >>>> everything ok 'till I have to run qemu static for arm64. It fails > >>>> because there is no arm64 specific binary installed in Ubuntu 13.10, > >>>> even though the wiki procedure says it should work. > >>> > >>> Which wiki page? > >>> > >>>> Not to worry; get the source and build it, I think. > >>>> > >>>> However, I cannot clone the git repo for the source, no matter which system I clone from. I even tried it from a Mac and get the same "fatal repo not found" error. > >>>> > >>>> The repo is 'https://github.com/susematz/qemu/tree/aarch64-1.6/' and I can see it in my browser just fine. > >>>> > >>>> Is there an alternative source for this code? > >>> > >>> IIRC it's all in mainline qemu these days. > >> > >> Last time I tried mainline QEMU (it was about a month ago), I was not > >> able to build the different package with an opensuse rootfs. > >> > >> It was because of the threading issue. I don't think it has been fixed yet. > > > > The threading issue affects the Xen tools build? Or were you building > > something else? > > Actually it was affecting the package manager zypper: Ah, I think I installed my build environment with the openSUSE version (which was all which existed back then) and haven't needed to run zypper since I switched to mainline. > commit ca45f1d446ca88675e85bf80f133d3d8d955dbf0 > Author: Alexander Graf <agraf@suse.de> > Date: Tue Jul 10 20:40:55 2012 +0200 > > linux-user: Run multi-threaded code on a single core How exciting! Ian.
diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 4823aa0..ff5ed06 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -4334,6 +4334,15 @@ static int do_fork(CPUArchState *env, unsigned int flags, abi_ulong newsp, if (nptl_flags & CLONE_SETTLS) cpu_set_tls (new_env, newtls); + /* agraf: Pin ourselves to a single CPU when running multi-threaded. + This turned out to improve stability for me. */ + { + cpu_set_t mask; + CPU_ZERO(&mask); + CPU_SET(0, &mask); + sched_setaffinity(0, sizeof(mask), &mask); + } + /* Grab a mutex so that thread setup appears atomic. */ pthread_mutex_lock(&clone_lock);