From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40385) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bNj3k-0000wh-0u for qemu-devel@nongnu.org; Thu, 14 Jul 2016 12:00:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bNj3f-0003F6-JO for qemu-devel@nongnu.org; Thu, 14 Jul 2016 12:00:20 -0400 Received: from mail-wm0-x22b.google.com ([2a00:1450:400c:c09::22b]:36481) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bNj3f-0003Ee-Ci for qemu-devel@nongnu.org; Thu, 14 Jul 2016 12:00:15 -0400 Received: by mail-wm0-x22b.google.com with SMTP id f126so71663827wma.1 for ; Thu, 14 Jul 2016 09:00:15 -0700 (PDT) References: <1467839703-11733-1-git-send-email-sergey.fedorov@linaro.org> From: Alex =?utf-8?Q?Benn=C3=A9e?= In-reply-to: <1467839703-11733-1-git-send-email-sergey.fedorov@linaro.org> Date: Thu, 14 Jul 2016 17:00:16 +0100 Message-ID: <878tx443cf.fsf@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Subject: Re: [Qemu-devel] [RFC v2 00/11] cpu-exec: Safe work in quiescent state List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Sergey Fedorov Cc: qemu-devel@nongnu.org, MTTCG Devel , KONRAD =?utf-8?B?RnLDqWTDqXJpYw==?= , Alvise Rigo , "Emilio G. Cota" , Paolo Bonzini , Richard Henderson , Peter Maydell , Sergey Fedorov Sergey Fedorov writes: > From: Sergey Fedorov > > Hi, > > This is a v2 of the RFC series [3] that was a follow-up for a discussion > on the subject [1]. This is sill marked as FRC becuse it laks bsd-user > support. Given the maintenance state of BSD I'm not sure how important this is. I assume the exclusive handling will be pretty much the same though. > > Basically, this series suggests a way to perform some operations in > quiescent state. The goal is to implement such a mechanism which can be > used for safe translation buffer flush in multi-threaded user-mode > emulation (and later in MTTCG) and merge it into mainline as soon as > possible. > > This series is a more elaborated version of the original series since > there was some positive feedback and I'd appreciate some comments from > maintainers this time. > > The first two patches are some useful tweak from Alex's MTTCG trees. > > The patches 3 through 8 are arrangements for the patch 9 which adds > support for CPU work in linux-user. This wouldn't make any sense without > the patch 10 which is the subject matter of this series. Although there > is nothing special to do in case of single-threaded round-robin CPU loop > of current system-mode emulation to ensure quiescent state, that is > shown in the patch 10, how it would look like in MTTCG. The last patch > actually employs this new mechanism making translation buffer flush > thread safe. > > The considerations on expensiveness of work item dynamic allocation [2] > was not taken into account. I'll just mention here that the desired > effect can be achieved by either using dynamic arrays for CPU work > queues or making queue_work_on_cpu() from the patch 3 a public interface > thus allowing to use preallocated work items. > > I would like your comments in order to produce something upstreamable > quickly! > > This series is available at a public git repository: > > https://github.com/sergefdrv/qemu.git safe-cpu-work-v2 > I've finished by review pass now. If Sergey doesn't get a chance to re-spin before he moves onto other things I'll pick the series up. -- Alex Bennée