Date: Wed, 16 Dec 2015 09:44:31 -0800 From: Adrian Chadd <adrian@freebsd.org> To: Konstantin Belousov <kostikbel@gmail.com> Cc: "src-committers@freebsd.org" <src-committers@freebsd.org>, "svn-src-all@freebsd.org" <svn-src-all@freebsd.org>, "svn-src-head@freebsd.org" <svn-src-head@freebsd.org> Subject: Re: svn commit: r292299 - head/sys/kern Message-ID: <CAJ-Vmo=QLyyNyKbbS=QOJ_RriYKAsyAsK9VvG4DJeeJdd_EyAQ@mail.gmail.com> In-Reply-To: <20151216080154.GP3625@kib.kiev.ua> References: <201512160013.tBG0DGhd048910@repo.freebsd.org> <20151216080154.GP3625@kib.kiev.ua>
next in thread | previous in thread | raw e-mail | index | archive | help
On 16 December 2015 at 00:01, Konstantin Belousov <kostikbel@gmail.com> wrote: > 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. Right. There's still some more work to do there to chase issues down so I can remove that sched_yield() workaround I added. > >> >> 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); >
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAJ-Vmo=QLyyNyKbbS=QOJ_RriYKAsyAsK9VvG4DJeeJdd_EyAQ>