From owner-freebsd-hackers@FreeBSD.ORG Wed Apr 9 11:40:02 2014 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C988DDA4 for ; Wed, 9 Apr 2014 11:40:02 +0000 (UTC) Received: from mail-we0-x22a.google.com (mail-we0-x22a.google.com [IPv6:2a00:1450:400c:c03::22a]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5BE251A3F for ; Wed, 9 Apr 2014 11:40:02 +0000 (UTC) Received: by mail-we0-f170.google.com with SMTP id w61so2351808wes.1 for ; Wed, 09 Apr 2014 04:40:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:mail-followup-to:references :mime-version:content-type:content-disposition:in-reply-to :user-agent; bh=t+Y7bSHAKem51e3WgJzK0ZUXzVm0qe1UhIB2syoUofY=; b=wHfNG1YSrU3lOVyxj483L+eGBVXu/vIgB/rXLrZdYnovgTT51b2ewpZ6BA2Q6Ti7FC IHeTnfDlu0eS0OJIpIkpJYwNECQRsgvtLhMD3uzU5MtAHD1nSGcoZDjBxwR8GJX9/F5E Q8acBDgz2MN+nBABaqFu1+BIak1/vFDrGqElDh22EpToV1PxMW9oX5JczORBJdhrcIk1 1l5vahuNF8ItWqOGpAH0eJQElIoZFDPTjWjwirSNuXHUmaJTV/gfxGQogFFws0twQnus 9rLSWe/LEI29DySknN97r8Mwz2kVFPQuu5Lkli0ZFPqRRFRWg18Q2EqZb80IMYOi0M5M 0XBg== X-Received: by 10.180.19.130 with SMTP id f2mr36971333wie.6.1397043600616; Wed, 09 Apr 2014 04:40:00 -0700 (PDT) Received: from dft-labs.eu (n1x0n-1-pt.tunnel.tserv5.lon1.ipv6.he.net. [2001:470:1f08:1f7::2]) by mx.google.com with ESMTPSA id b4sm9558232wic.0.2014.04.09.04.39.59 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Wed, 09 Apr 2014 04:39:59 -0700 (PDT) Date: Wed, 9 Apr 2014 13:39:57 +0200 From: Mateusz Guzik To: Konstantin Belousov Subject: Re: pipe() resource exhaustion Message-ID: <20140409113957.GB17650@dft-labs.eu> Mail-Followup-To: Mateusz Guzik , Konstantin Belousov , Eduardo Morras , freebsd-hackers@freebsd.org References: <20140408130206.e75f3bf6c6df28b6e4839e70@yahoo.es> <20140408121222.GB30326@dft-labs.eu> <20140408123827.GW21331@kib.kiev.ua> <20140408130727.GA11363@dft-labs.eu> <20140408132442.GZ21331@kib.kiev.ua> <20140409111654.GA17650@dft-labs.eu> <20140409112627.GI21331@kib.kiev.ua> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20140409112627.GI21331@kib.kiev.ua> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: freebsd-hackers@freebsd.org, Eduardo Morras X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Apr 2014 11:40:02 -0000 On Wed, Apr 09, 2014 at 02:26:27PM +0300, Konstantin Belousov wrote: > > if (backing) { > > + /* > > + * Note that these functions can fail, but we ignore > > + * the error as it is not fatal and could be provoked > > + * by users. > > + */ > It would be benefitial to add some more details on the way to provoke the > failure. Note in the comment that creating too much pipes would exhaust > pipe map and we fall back to the buffer pipe creation there, which still > work correctly, albeit slow. > How about: Note that these functions can fail if pipe map is exhausted (as a result of too many pipes created), but we ignore the error as it is not fatal and could be provoked by unprivileged users. The only consequence is worse performance with given pipe. -- Mateusz Guzik