From: Dan Magenheimer Subject: RE: Re: [PATCH 3/5] x86/pvclock: add vsyscall implementation Date: Mon, 2 Nov 2009 07:28:21 -0800 (PST) Message-ID: <861f0a3e-8d6f-473e-a67d-80e46343fedd@default> References: <4AED54D1.6070706@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=Windows-1252 Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: <4AED54D1.6070706@redhat.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Avi Kivity Cc: Jeremy Fitzhardinge , kurt.hackel@oracle.com, Glauber Costa , maintainers , Linux Kernel Mailing List , Glauber de Oliveira Costa , Xen-devel , Keir Fraser , the, Ingo Molnar , zach.brown@oracle.com, chris.mason@oracle.com List-Id: xen-devel@lists.xenproject.org > From: Avi Kivity [mailto:avi@redhat.com] >=20 > On 10/29/2009 06:15 PM, Dan Magenheimer wrote: > > On a related note, though some topic drift, many of > > the problems that occur in virtualization due to migration > > could be better addressed if Linux had an architected > > interface to allow it to be signaled if a migration > > occurred, and if Linux could signal applications of > > the same. I don't have any cycles (pun intended) to > > think about this right now, but if anyone else starts > > looking at it, I'd love to be cc'ed. =20 >=20 > IMO that's not a good direction. The hypervisor should not depend on=20 > the guest for migration (the guest may be broken, or=20 > malicious, or being=20 > debugged, or slow). So the notification must be asynchronous, which=20 > means that it will only be delivered to applications after=20 > migration has=20 > completed. I definitely agree that the hypervisor can't wait for a guest to respond. You've likely thought through this a lot more than I have, but I was thinking that if the kernel received the notification as some form of interrupt, it could determine immediately if any running threads had registered for "SIG_MIGRATE" and deliver the signal synchronously. > Instead of a "migration has occured, run for the hills" signal we're=20 > better of finding out why applications want to know about=20 > this event and=20 > addressing specific needs. Perhaps. It certainly isn't warranted for this one special case of timestamp handling. But I'll bet 5-10 years from now, after we've handled a few special cases, we'll wish that we would have handled it more generically. Dan