Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 19 Oct 2017 06:08:32 +0000
From:      bugzilla-noreply@freebsd.org
To:        freebsd-bugs@FreeBSD.org
Subject:   [Bug 223059] [patch] consider skipped 2 pages in sw_nblks and add size check before blist_alloc
Message-ID:  <bug-223059-8-Z6BXBUhnYN@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-223059-8@https.bugs.freebsd.org/bugzilla/>
References:  <bug-223059-8@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D223059

--- Comment #1 from Alan Cox <alc@FreeBSD.org> ---
Testing "(sp->sw_nblks - sp->sw_used >=3D npages)" before every call to
blist_alloc() is of no real benefit.  In the common case, where there is
available swap space, it is added overhead, albeit a tiny amount of overhea=
d.=20
Only in the rare case, where there is no swap space available will it be of=
 any
benefit.  But, in that case, the gain is minimal.  The hinting mechanism in=
 the
blist code will quickly conclude that there is no available space, and retu=
rn
failure.  In summary, the tiny amount of overhead in the common case is goi=
ng
to outweigh the gain in the rare case.

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-223059-8-Z6BXBUhnYN>