From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ingo Molnar Subject: Re: [PATCH 4/6] kvm tools: Add rwlock wrapper Date: Fri, 27 May 2011 13:10:57 +0200 Message-ID: <20110527111057.GA27058@elte.hu> References: <1306419950-19064-4-git-send-email-levinsasha928@gmail.com> <1306426743.3065.34.camel@lappy> <20110526180518.GA3572@elte.hu> <4DDE97CE.4000302@redhat.com> <20110526202531.GA2765@elte.hu> <20110526230508.GA15983@Krystal> <20110527102533.GA24608@elte.hu> <20110527110729.GA26920@elte.hu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Pekka Enberg , Avi Kivity , Sasha Levin , john@jfloren.net, kvm@vger.kernel.org, asias.hejun@gmail.com, gorcunov@gmail.com, prasadjoshi124@gmail.com, "Paul E. McKenney" To: Mathieu Desnoyers Return-path: Received: from mx2.mail.elte.hu ([157.181.151.9]:33540 "EHLO mx2.mail.elte.hu" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752499Ab1E0LLH (ORCPT ); Fri, 27 May 2011 07:11:07 -0400 Content-Disposition: inline In-Reply-To: <20110527110729.GA26920@elte.hu> Sender: kvm-owner@vger.kernel.org List-ID: * Ingo Molnar wrote: > I was thinking about that on and off so loudly that Peter > implemented it long ago via fasync support on the perf event fd! > :-) > > So if you set a notification signal via fcntl(F_SETOWN) on the > scheduler context switch event fd, the user-space RCU code will get > a signal on every context switch. > > I have not tried it for this purpose yet, so let us know if there > are unexpected complications :) Note that you do not want the context switch event, but the CPU migration event: that will notify user-space when it gets migrated to another CPU. This is the case that RCU really needs. Thanks, Ingo