From owner-svn-src-user@FreeBSD.ORG Mon Jun 23 09:35:14 2014 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 173D1355; Mon, 23 Jun 2014 09:35:14 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id ECC6722D2; Mon, 23 Jun 2014 09:35:13 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5N9ZDhE024446; Mon, 23 Jun 2014 09:35:13 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5N9ZDat024443; Mon, 23 Jun 2014 09:35:13 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <201406230935.s5N9ZDat024443@svn.freebsd.org> From: Attilio Rao Date: Mon, 23 Jun 2014 09:35:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r267783 - in user/attilio/rm_vmobj_cache/sys: sys vm X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Jun 2014 09:35:14 -0000 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);