From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44560) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bEzfn-0007HQ-Kh for qemu-devel@nongnu.org; Mon, 20 Jun 2016 09:55:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bEzfh-0004gz-CR for qemu-devel@nongnu.org; Mon, 20 Jun 2016 09:55:30 -0400 Received: from mail-lf0-x241.google.com ([2a00:1450:4010:c07::241]:35074) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bEzfh-0004gs-4D for qemu-devel@nongnu.org; Mon, 20 Jun 2016 09:55:25 -0400 Received: by mail-lf0-x241.google.com with SMTP id w130so5556400lfd.2 for ; Mon, 20 Jun 2016 06:55:24 -0700 (PDT) References: <1466181227-14934-1-git-send-email-alex.bennee@linaro.org> <72b6283d-998b-f2d7-9037-a3896c1c9423@redhat.com> From: Sergey Fedorov Message-ID: <5767F5CA.2020200@gmail.com> Date: Mon, 20 Jun 2016 16:55:22 +0300 MIME-Version: 1.0 In-Reply-To: <72b6283d-998b-f2d7-9037-a3896c1c9423@redhat.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Subject: Re: [Qemu-devel] [RFC 0/7] Safe watch and breakpoint manipulation List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini , =?UTF-8?Q?Alex_Benn=c3=a9e?= , mttcg@greensocs.com, qemu-devel@nongnu.org, fred.konrad@greensocs.com, a.rigo@virtualopensystems.com, cota@braap.org, bobby.prani@gmail.com Cc: mark.burton@greensocs.com, jan.kiszka@siemens.com, rth@twiddle.net, peter.maydell@linaro.org, claudio.fontana@huawei.com On 17/06/16 20:01, Paolo Bonzini wrote: > > On 17/06/2016 18:33, Alex Bennée wrote: >> First we move the break/watchpoints into an array which is more >> amenable to RCU control that the QLIST. We then control the life time >> of references to break/watchpoint data by removing long held >> references in the target code and getting information when needed from >> the core. Then we stop dynamically allocation the watch/breakpoint >> data and store it directly in the array which makes iteration across >> the list a bit more cache friendly than referenced pointers. Finally >> addition and removal of elements of the array is put under RCU >> control. This ensures there is always a safe array of data to check >> in the run-loop. > I'm not sure why you say that arrays are more amenable than QTAILQ > (though indeed include/qemu/rcu_queue.h only includes QLIST for now), > but I feel bad asking you to redo all the work... Is there any realistic way to manage *doubly* linked lists in RCU? Kind regards, Sergey