From owner-freebsd-current@FreeBSD.ORG Thu Jul 11 09:39:01 2013 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 777EEF03 for ; Thu, 11 Jul 2013 09:39:01 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-we0-x234.google.com (mail-we0-x234.google.com [IPv6:2a00:1450:400c:c03::234]) by mx1.freebsd.org (Postfix) with ESMTP id 132681E0B for ; Thu, 11 Jul 2013 09:39:00 +0000 (UTC) Received: by mail-we0-f180.google.com with SMTP id w56so6746499wes.39 for ; Thu, 11 Jul 2013 02:39:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=3sk6ECivSwmOz1fQyfjx1+QVZfP1SNtkzI6z+NxXLEY=; b=RHBAyeGwbKhO76WiDGLzFjKX44bzAH+02aOWqHUj9Lg2lkXG3aaAXtRWUDxNvhPykW MB9JOgMmn06RYpzFKcqOQjDaHPipEhv6yg7TrenOayTvKFN0ikjYVCyI9ira5rAa4GWK T3i0DdMh0p8kEBMPExNC6i7d3vZDLQnwv7OoMzMSYhrSzIvC6n0H6Pi2igmd2Dn1I2xx GiQpvAFk1V03eUV9nwYAuV8OsPtkGh5ssrZCwhSQ1pSiPACqHwVS00gkYpkaoJM026fR f2dYuz17uOaCy3CvbLZwhOIbgT9fYb3sTewEhsNIZx67wNlUlGBH3BGmSuO9zFQEo1ij 78QA== MIME-Version: 1.0 X-Received: by 10.180.82.196 with SMTP id k4mr21967188wiy.0.1373535540168; Thu, 11 Jul 2013 02:39:00 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.217.94.132 with HTTP; Thu, 11 Jul 2013 02:39:00 -0700 (PDT) In-Reply-To: <20130711093630.GL91021@kib.kiev.ua> References: <20130711061753.GK91021@kib.kiev.ua> <20130711093630.GL91021@kib.kiev.ua> Date: Thu, 11 Jul 2013 02:39:00 -0700 X-Google-Sender-Auth: dHf6hPnV7p0GzH6RAzHmxrY4XyI Message-ID: Subject: Re: hacking - aio_sendfile() From: Adrian Chadd To: Konstantin Belousov Content-Type: text/plain; charset=ISO-8859-1 Cc: freebsd-current X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Jul 2013 09:39:01 -0000 On 11 July 2013 02:36, Konstantin Belousov wrote: > No, it is not disk I/O which is problematic there. It is socket I/O > e.g. wait for the socket buffers lomark in the kern_sendfile() which > causes unbounded sleep. Look for the sbwait() call, both in the > kern_sendfile() itself, and in the pru_send methods of the protocols, > e.g. in sosend_generic(). The wait scope controlled by the other side of > connection and allow it to completely block the aio subsystem. > > Disk I/O is supposed to finish in the finite time. Even if the destination socket is marked as NONBLOCK? -adrian