Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755033AbXFDOFA (ORCPT ); Mon, 4 Jun 2007 10:05:00 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752160AbXFDOEx (ORCPT ); Mon, 4 Jun 2007 10:04:53 -0400 Received: from wa-out-1112.google.com ([209.85.146.179]:30223 "EHLO wa-out-1112.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752273AbXFDOEw (ORCPT ); Mon, 4 Jun 2007 10:04:52 -0400 DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=tnh4oTDglU/fAwKhAu37J+KQ/zh10nS0pTtqCFpihFEaGEHmqNFYglOzc1jFRNtLNY+Kiwu0I6OwcnUE5NE1TlS/5wBl4g1o+DeE5Km81+O87wyor+kERH/eGUITltWMXrCto9UgWSsPJcXh02ZRiLyprOi5fWefJJiGnnGZeqc= Message-ID: Date: Mon, 4 Jun 2007 10:04:52 -0400 From: "Aaron Wiebe" To: "Alan Cox" Subject: Re: slow open() calls and o_nonblock Cc: linux-kernel@vger.kernel.org In-Reply-To: <20070604144918.42354235@the-village.bc.nu> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <20070604144918.42354235@the-village.bc.nu> Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1216 Lines: 27 On 6/4/07, Alan Cox wrote: > > > Now, I'm a userspace guy so I can be pretty dense, but shouldn't a > > call with a nonblocking flag return EAGAIN if its going to take > > anywhere near 415ms? > > Violation of causality. We don't know it will block for 415ms until 415ms > have elapsed. Understood - but what I'm getting at is more the fact that there really doesn't appear to be any real implementation of nonblocking open(). On the socket side of the fence, I would consider a regular file open() to be equivalent to a connect() call - the difference obviously being that we already have a handle for the socket. The end result, however, is roughly the same. We have a file descriptor with the endpoint established. In the socket world, we assume that a nonblocking request will always return immediately and the application is expected to come back around and see if the request has completed. Regular files have no equivalent. -Aaron - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/