From owner-svn-src-all@freebsd.org Wed Dec 16 13:33:26 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CB3A4A49363; Wed, 16 Dec 2015 13:33:26 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4BA311A29; Wed, 16 Dec 2015 13:33:26 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kostik@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id tBG81s1O009025 (version=TLSv1 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Wed, 16 Dec 2015 10:01:54 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua tBG81s1O009025 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id tBG81si4009024; Wed, 16 Dec 2015 10:01:54 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Wed, 16 Dec 2015 10:01:54 +0200 From: Konstantin Belousov To: Adrian Chadd Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r292299 - head/sys/kern Message-ID: <20151216080154.GP3625@kib.kiev.ua> References: <201512160013.tBG0DGhd048910@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201512160013.tBG0DGhd048910@repo.freebsd.org> User-Agent: Mutt/1.5.24 (2015-08-30) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on tom.home X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Dec 2015 13:33:26 -0000 On Wed, Dec 16, 2015 at 12:13:16AM +0000, Adrian Chadd wrote: > Author: adrian > Date: Wed Dec 16 00:13:16 2015 > New Revision: 292299 > URL: https://svnweb.freebsd.org/changeset/base/292299 > > Log: > Don't call wakeup if we're just returning reserved space; just > return the reservation and wait for more space to appear. Issue which is supposedly fixed by the commit is not due to the possibly excessive wakeups. bufspace_release() and bufspace_wakeup() clear the needsbuffer variable, while the code flow in getnewbuf() calls bufspace_wait() to wait for the condition, which prevented the buffer allocation from succeeding, to pass. > > Submitted by: jeff > Reviewed by: kib > > Modified: > head/sys/kern/vfs_bio.c > > Modified: head/sys/kern/vfs_bio.c > ============================================================================== > --- head/sys/kern/vfs_bio.c Wed Dec 16 00:09:57 2015 (r292298) > +++ head/sys/kern/vfs_bio.c Wed Dec 16 00:13:16 2015 (r292299) > @@ -2909,7 +2909,7 @@ getnewbuf(struct vnode *vp, int slpflag, > } while(buf_scan(false) == 0); > > if (reserved) > - bufspace_release(maxsize); > + atomic_subtract_long(&bufspace, maxsize); > if (bp != NULL) { > bp->b_flags |= B_INVAL; > brelse(bp);