From: "Jan Beulich" Subject: Re: -EINTR return in domain_relinquish_resources Date: Mon, 26 Jan 2015 09:36:35 +0000 Message-ID: <54C618B30200007800059503@mail.emea.novell.com> References: <20150121212720.GA24555@l.oracle.com> <54C0D8530200007800057FEB@mail.emea.novell.com> <20150122163840.GB32691@l.oracle.com> <54C21E4D0200007800058992@mail.emea.novell.com> <20150123143247.GE7365@l.oracle.com> <54C25EB2.6090403@citrix.com> <54C2782B0200007800058F01@mail.emea.novell.com> <20150123154613.GA15927@l.oracle.com> <54C27EFB0200007800058F83@mail.emea.novell.com> <20150123172135.GA4888@l.oracle.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1YFg65-0004BJ-N9 for xen-devel@lists.xenproject.org; Mon, 26 Jan 2015 09:36:41 +0000 In-Reply-To: <20150123172135.GA4888@l.oracle.com> Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Konrad Rzeszutek Wilk Cc: Andrew Cooper , xen-devel@lists.xenproject.org List-Id: xen-devel@lists.xenproject.org >>> On 23.01.15 at 18:21, wrote: > On Fri, Jan 23, 2015 at 04:03:55PM +0000, Jan Beulich wrote: >> >>> On 23.01.15 at 16:46, wrote: >> > Subject: [PATCH] domain: In vcpu_destroy_pagetables we can return -ERESTART >> > instead of -EINTR >> > >> > which has the side effect that domain_relinquish_resources will stop >> > and return to user-space -EINTR - which it is not equipped to deal with. >> >> The title read wrong, especially on its own, as it appears to >> state the inverse thing of what you do in the patch. Perhaps >> >> x86: vcpu_destroy_pagetables() must not return -EINTR >> >> with the initial part of the description adjusted accordingly? >> >> > + /* >> > + * The put_page_and_type_preemptible is liable to return -EINTR. Other >> > + * callers of it filter the -EINTR to whatever they deem applicable - in >> > + * this case we MUST do it as the caller of this function will return the >> > + * error code to userspace. And userspace for domain destruction expects >> > + * -EAGAIN (domain_relinquish_resources converts ERESTART to -EAGAIN). >> > + */ >> >> This is still misleading, as it kind of implies that the function has only >> that one caller. Don't talk about domain_relinquish_resources() and >> EAGAIN at all. > > Right. I somehow managed to miss the other caller of > vcpu_destroy_pagetables. > > Please see following patch: Looks good. I don't see a reason not to apply it without you doing a formal submission. Jan