From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf0-f179.google.com ([209.85.192.179]:36541 "EHLO mail-pf0-f179.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751830AbcC1FEu (ORCPT ); Mon, 28 Mar 2016 01:04:50 -0400 Received: by mail-pf0-f179.google.com with SMTP id u190so128852755pfb.3 for ; Sun, 27 Mar 2016 22:04:50 -0700 (PDT) Date: Sun, 27 Mar 2016 22:04:50 -0700 From: =?iso-8859-1?Q?J=F6rn?= Engel To: Al Viro Cc: "Michael Kerrisk (man-pages)" , linux-man , "linux-fsdevel@vger.kernel.org" Subject: Re: open(2) manpage and O_NONBLOCK Message-ID: <20160328050450.GA27411@cork> References: <20160321202347.GG1612@cork> <20160328040845.GT17997@ZenIV.linux.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20160328040845.GT17997@ZenIV.linux.org.uk> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Mon, Mar 28, 2016 at 05:08:45AM +0100, Al Viro wrote: > On Mon, Mar 28, 2016 at 04:58:33PM +1300, Michael Kerrisk (man-pages) wrote: > > > blocking memory allocation: > > > f = kmem_cache_zalloc(filp_cachep, GFP_KERNEL); > > > > For how long might this block, though? > > Not much, usually. Finding the file, though, can bloody well take a _long_ > time - put it behind an automount from a slow server and we might be easily > talking about minutes, if not longer. Another example that bit me in the past is scsi devices checking for media presence. If any part of your storage stack drops the cdb, you have to wait for a scsi timeout, usually 30s. Disk events commonly cause delays around the half-second mark. I haven't gone through the code yet to see what the actual limits are. Half a second might already be too long for some realtime applications. J�rn -- When I am working on a problem I never think about beauty. I think only how to solve the problem. But when I have finished, if the solution is not beautiful, I know it is wrong. -- R. Buckminster Fuller