Received: by 10.223.176.5 with SMTP id f5csp1758898wra; Sun, 4 Feb 2018 11:22:22 -0800 (PST) X-Google-Smtp-Source: AH8x22701OaWnSs8r5XHSSJRhadj0OOooHZoew2MIzNhDiUTlkC4sZNrEzjSs3/mxW2VNR87o2rV X-Received: by 10.99.116.23 with SMTP id p23mr3673222pgc.16.1517772142021; Sun, 04 Feb 2018 11:22:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517772141; cv=none; d=google.com; s=arc-20160816; b=tomIBE96ZdKqdw5bsDgcV7rnmUDuShYxo9lJEAWwy30h3qSBZeDVDUlqUG+vws0DVz lLstXrl98oYsuM8uZiHz4xzVlAIrMWx35WarBrmAIGfr5vK7a4egii9MICKFebTbdCWC X9T2RKOZxWCJ89k8eRSV6F1gjWSO5gYY2tNdKzAe4KnEWR18QQAcpxwsQ+iycVYushTn uAcmipUFWcZIbSxN1N91y+5b45hyFIUFzqoBfVbg/rdcW1UJ2G5tqddU22Qqbz1gKsuD oZXpHitvvenksM+uMzBPqRAxLO7uM8vKOEdVzgz2dl0OWOKzhuz2H2JABHnHJvkjh7ea RD7A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature :arc-authentication-results; bh=eMxf7RH2Dx30sfg2miVvXoVD/Qof3ndV7yGX88FHdS4=; b=cCRbVF/A3mC+2eOEgss9UVIjENvgN3XBM7QV+E9vP/pld3oydD1WxJS5UFiqHN3x1L 1Op/gfEGiS3jRKsYuYeW5e0Ws4EVlrdV0YtkiaIt3N206KHCWdETJb2gOXyCDsV2osgr qwnhoabtkI7kuADsOgsnmaVC68QamSruqO3PrTWZN8g2IwgEB6OMDfHxKgwnNXFN/WDl txG2mV8LUtq3fEhOI3yzyJL22tQT4mllyNBJ8JjYhqE0SjCWb6XsBQJEtzy+va0gE/Gg n3lkDQvDEa7QddQ0/z0cbKSgyP9z0XH+4SXFVT/ggs6+xUzCfF8h65REFL/KTNHKyDdg 0XDw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2017-10-26 header.b=SsoZuNYo; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x12-v6si3478068pln.126.2018.02.04.11.22.05; Sun, 04 Feb 2018 11:22:21 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2017-10-26 header.b=SsoZuNYo; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752210AbeBDTUi (ORCPT + 99 others); Sun, 4 Feb 2018 14:20:38 -0500 Received: from aserp2130.oracle.com ([141.146.126.79]:38516 "EHLO aserp2130.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751797AbeBDTUe (ORCPT ); Sun, 4 Feb 2018 14:20:34 -0500 Received: from pps.filterd (aserp2130.oracle.com [127.0.0.1]) by aserp2130.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w14JKSrj093271; Sun, 4 Feb 2018 19:20:28 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=subject : to : cc : references : from : message-id : date : mime-version : in-reply-to : content-type : content-transfer-encoding; s=corp-2017-10-26; bh=eMxf7RH2Dx30sfg2miVvXoVD/Qof3ndV7yGX88FHdS4=; b=SsoZuNYoWwOb0TMTf9ztt5TAHzP/fxOvd0TF1IIDiYF9szWGUH+d7DLNr6TgqQL6FvYy swR2TOFrW+Mi98TSFkcGpzCZ3or9A30GNA6QFiO3AQuy4cQ6QfwoDocrf2XvxvmQ25cZ C6rR1DmzXrxS2/LNg5Y7939Z1lb4Gh8wslViguG2z2Ol/V30EqsjtqeQG2nXIKXQdoy4 sQ0o7sYijZ8USDipvprHrUVq+ZUkzyPpw6935mMnJuuX2TAA3wuWn2R04bNgNNwjQ7Gu Y3hG5qA5WFvIUQbPoJA337/jAfFFkpMu0YlpIyDeH2PILcI+M1EYefoFOTaWkkFtJlzK KQ== Received: from userv0021.oracle.com (userv0021.oracle.com [156.151.31.71]) by aserp2130.oracle.com with ESMTP id 2fx887g016-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sun, 04 Feb 2018 19:20:28 +0000 Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by userv0021.oracle.com (8.14.4/8.14.4) with ESMTP id w14JKQCu010661 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Sun, 4 Feb 2018 19:20:26 GMT Received: from abhmp0019.oracle.com (abhmp0019.oracle.com [141.146.116.25]) by aserv0122.oracle.com (8.14.4/8.14.4) with ESMTP id w14JKP9a009931; Sun, 4 Feb 2018 19:20:25 GMT Received: from [10.39.214.146] (/10.39.214.146) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Sun, 04 Feb 2018 11:20:25 -0800 Subject: Re: [PATCH] pvcalls-back: do not return error on inet_accept EAGAIN To: Stefano Stabellini , jgross@suse.com Cc: xen-devel@lists.xenproject.org, linux-kernel@vger.kernel.org References: From: Boris Ostrovsky Message-ID: <936e4d18-3f0d-3fc5-2272-c1ad9a5c7022@oracle.com> Date: Sun, 4 Feb 2018 14:20:25 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=8795 signatures=668662 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1711220000 definitions=main-1802040258 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 02/02/2018 08:34 PM, Stefano Stabellini wrote: > When the client sends a regular blocking accept request, the backend is > expected to return only when the accept is completed, simulating a > blocking behavior, or return an error. > > Specifically, on EAGAIN from inet_accept, the backend shouldn't return > "EAGAIN" to the client. Instead, it should simply continue the wait. > Otherwise, the client will send another accept request, which will cause > another EAGAIN to be sent back, which is a waste of resources and not > conforming to the expected behavior. Change the behavior by turning the > "goto error" into a return. > > Signed-off-by: Stefano Stabellini I am looking at SYSCALL_DEFINE4(accept4) and sock->ops->accept (which *I think* is inet_accept, at least in some cases) passes all errors (including EAGAIN)  back to the caller. Is this a different case? -boris