Received: from eggs.gnu.org ([2001:4830:134:3::10]:32961) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y0aOo-0005tK-6t for qemu-devel@nongnu.org; Mon, 15 Dec 2014 13:29:43 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Y0aOi-0005XR-DP for qemu-devel@nongnu.org; Mon, 15 Dec 2014 13:29:38 -0500 Received: from roura.ac.upc.es ([147.83.33.10]:42665) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y0aOi-0005Wx-2k for qemu-devel@nongnu.org; Mon, 15 Dec 2014 13:29:32 -0500 From: =?utf-8?Q?Llu=C3=ADs_Vilanova?= References: <5485BA0A.4010206@greensocs.com> <87sigo3dv6.fsf@fimbulvetr.bsc.es> <183375C9-1A8D-4E17-9F7C-19F4A1486F5A@greensocs.com> Date: Mon, 15 Dec 2014 12:29:24 -0600 In-Reply-To: <183375C9-1A8D-4E17-9F7C-19F4A1486F5A@greensocs.com> (Mark Burton's message of "Mon, 15 Dec 2014 14:07:22 +0100") Message-ID: <871to0ix6j.fsf@fimbulvetr.bsc.es> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] TCG multithread plan. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Mark Burton Cc: mttcg@greensocs.com, qemu-devel , KONRAD =?utf-8?B?RnLDqWTDqXJpYw==?= Mark Burton writes: > (please note the address of the match list server is > mttcg@listserver.greensocs.com) > On 9 Dec 2014, at 18:57, Llu=C3=ADs Vilanova wr= ote: =20=20=20=20 > Frederic Konrad writes: =20=20=20=20 > Hi everybody, > Here is the plan we will follow: =20=20=20=20=20=20=20=20 > We will be focusing - from the outset - on the end goal of multi-thre= aded > TCG in full system emulation mode. On the way, we expect this wil= l =E2=80=98fix=E2=80=99 > user mode. =20=20=20=20=20=20=20=20 > The plan is: =20=20=20=20=20=20=20=20 > * Create one cache per CPU as a first step. We can do more next and s= hare a > cache. > * Update tb_* to add a pointer to their cache. > * Add atomic instruction support to the TGC (first on ARM). > * Make tb_invalidate work between all cache. > * Modify main-loop for multi-thread. > * Memory access (eg: for device) are not thread safe that need to= be > fixed. Initial plan simply globally mutex memory accesses - this = may be > optimised later. > * For now, irq handler for CPU seems ok but we need to check. =20=20=20=20=20=20=20=20 > We will discuss this during the call tomorrow. =20=20=20=20=20=20=20=20 > Is there any plan to have the notion of "memory coherency domains"? > (shortened > as MCD in the wiki) =20=20=20=20 > Even though it's not that useful now, it could be used in the future = to > relax > the atomicity of operations when different devices operate on differe= nt MCDs > and > TCG is not able to map that into an atomic host operation (aka, has t= o use > locks). A system with a CPU and a GPU would be a good example of that. =20=20=20=20 =20=20=20=20 > This would - I think - be a vote for doing atomicity via the =E2=80=98io= =E2=80=99 path I > believe? I'm not sure what you mean by that (I wasn't on any of the conference calls). What I mean is that atomic TCG operations that are not (or cannot) be trans= lated to atomic host operations need to use a lock, and different MCDs can use different locks (to avoid unnecessary contention). Best, Lluis --=20 "And it's much the same thing with knowledge, for whenever you learn something new, the whole world becomes that much richer." -- The Princess of Pure Reason, as told by Norton Juster in The Phantom Tollbooth