Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 03 Dec 2017 04:59:39 +0000
From:      bugzilla-noreply@freebsd.org
To:        freebsd-bugs@FreeBSD.org
Subject:   [Bug 223831] [patch] swap_pager.c to release multiple swap blocks at a time
Message-ID:  <bug-223831-8-57Xe2RVYqa@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-223831-8@https.bugs.freebsd.org/bugzilla/>
References:  <bug-223831-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=3D223831

--- Comment #3 from ota@j.email.ne.jp ---
(In reply to Konstantin Belousov from comment #2)

Indeed, 1st patch chunk failed and I overlooked it.
Also, I missed offset initialization.

To answer your question, I started with 2 reasons.
#1 - I started looking at optimizing page-in cases and process exit cases w=
here
they had released 1 block at a time although swp_pager_freeswapspace() takes
npages to free.  This was the 3rd one.
#2 - swp_pager_force_pagein() comment says "it doesn't work" and I wondered
why.  The reason I found is we need to call vm_page_grab for the number of
pages we want to page in.

Summing up, after I figured vm_page part, the code started working okay and
based on my observation of "top", multi-block page-in was considerably fast=
er -
reading 1 block 32 times compare to 32 blocks a time.  It looksvm_object_t =
is
locked during swapoff operation (while paging-in), too.

During research, I found swap_pager_getpages() calls swap_pager_haspage()
anyway and swap_pager_haspage() checks how many continuous blocks are behin=
d.=20
So, I started researching from swap_pager_haspage() side instead of swblk s=
ide.

I had few questions like when to lock and how and when to increment
vm_object_pip.  I posted here for some feed backs.

While checking patch failure against HEAD, I realized swp_pager_force_pagei=
n()
in HEAD had a change for (m->valid =3D=3D VM_PAGE_BITS_ALL) case.  This cha=
nge
cleared some of my questions.  I will update my changes and post a new one =
for
11-STABLE and HEAD.

--=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-223831-8-57Xe2RVYqa>