svn commit: r267783 - in user/attilio/rm_vmobj_cache/sys: sys vm
Attilio Rao
attilio at FreeBSD.org
Mon Jun 23 09:35:14 UTC 2014
Author: attilio
Date: Mon Jun 23 09:35:13 2014
New Revision: 267783
URL: http://svnweb.freebsd.org/changeset/base/267783
Log:
Add a new pagequeue, called "disposed".
This is going to be used as an high-priority inactive queue, more or
less, with specific constraint.
It is going to give vm_page_advise() the ability to free some pages
in steady way.
Modified:
user/attilio/rm_vmobj_cache/sys/sys/vmmeter.h
user/attilio/rm_vmobj_cache/sys/vm/vm_page.c
user/attilio/rm_vmobj_cache/sys/vm/vm_page.h
Modified: user/attilio/rm_vmobj_cache/sys/sys/vmmeter.h
==============================================================================
--- user/attilio/rm_vmobj_cache/sys/sys/vmmeter.h Mon Jun 23 08:40:56 2014 (r267782)
+++ user/attilio/rm_vmobj_cache/sys/sys/vmmeter.h Mon Jun 23 09:35:13 2014 (r267783)
@@ -96,6 +96,7 @@ struct vmmeter {
u_int v_active_count; /* (q) pages active */
u_int v_inactive_target; /* (c) pages desired inactive */
u_int v_inactive_count; /* (q) pages inactive */
+ u_int v_disposed_count; /* (q) pages disposed */
u_int v_cache_count; /* (f) pages on cache queue */
u_int v_cache_min; /* (c) min pages desired on cache queue */
u_int v_cache_max; /* (c) max pages in cached obj (unused) */
Modified: user/attilio/rm_vmobj_cache/sys/vm/vm_page.c
==============================================================================
--- user/attilio/rm_vmobj_cache/sys/vm/vm_page.c Mon Jun 23 08:40:56 2014 (r267782)
+++ user/attilio/rm_vmobj_cache/sys/vm/vm_page.c Mon Jun 23 09:35:13 2014 (r267783)
@@ -259,6 +259,10 @@ vm_page_domain_init(struct vm_domain *vm
"vm active pagequeue";
*__DECONST(int **, &vmd->vmd_pagequeues[PQ_ACTIVE].pq_vcnt) =
&vm_cnt.v_active_count;
+ *__DECONST(char **, &vmd->vmd_pagequeues[PQ_DISPOSED].pq_name) =
+ "vm disposed pagequeue";
+ *__DECONST(int **, &vmd->vmd_pagequeues[PQ_DISPOSED].pq_vcnt) =
+ &vm_cnt.v_disposed_count;
vmd->vmd_page_count = 0;
vmd->vmd_free_count = 0;
vmd->vmd_segs = 0;
@@ -3165,10 +3169,11 @@ DB_SHOW_COMMAND(pageq, vm_page_print_pag
vm_cnt.v_free_count, vm_cnt.v_cache_count);
for (dom = 0; dom < vm_ndomains; dom++) {
db_printf(
- "dom %d page_cnt %d free %d pq_act %d pq_inact %d pass %d\n",
+"dom %d page_cnt %d free %d pq_disposed %d pq_act %d pq_inact %d pass %d\n",
dom,
vm_dom[dom].vmd_page_count,
vm_dom[dom].vmd_free_count,
+ vm_dom[dom].vmd_pagequeues[PQ_DISPOSED].pq_cnt,
vm_dom[dom].vmd_pagequeues[PQ_ACTIVE].pq_cnt,
vm_dom[dom].vmd_pagequeues[PQ_INACTIVE].pq_cnt,
vm_dom[dom].vmd_pass);
Modified: user/attilio/rm_vmobj_cache/sys/vm/vm_page.h
==============================================================================
--- user/attilio/rm_vmobj_cache/sys/vm/vm_page.h Mon Jun 23 08:40:56 2014 (r267782)
+++ user/attilio/rm_vmobj_cache/sys/vm/vm_page.h Mon Jun 23 09:35:13 2014 (r267783)
@@ -206,7 +206,8 @@ struct vm_page {
#define PQ_NONE 255
#define PQ_INACTIVE 0
#define PQ_ACTIVE 1
-#define PQ_COUNT 2
+#define PQ_DISPOSED 2
+#define PQ_COUNT 3
TAILQ_HEAD(pglist, vm_page);
SLIST_HEAD(spglist, vm_page);
More information about the svn-src-user
mailing list