From owner-freebsd-hackers@FreeBSD.ORG Mon Aug 25 06:52:54 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F2CCD106564A for ; Mon, 25 Aug 2008 06:52:54 +0000 (UTC) (envelope-from nikhil.rao@intel.com) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by mx1.freebsd.org (Postfix) with ESMTP id D187C8FC12 for ; Mon, 25 Aug 2008 06:52:54 +0000 (UTC) (envelope-from nikhil.rao@intel.com) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga102.fm.intel.com with ESMTP; 24 Aug 2008 23:51:13 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.32,264,1217833200"; d="scan'208";a="373354602" Received: from orsmsx335.amr.corp.intel.com (HELO orsmsx335.jf.intel.com) ([10.22.226.40]) by fmsmga002.fm.intel.com with ESMTP; 24 Aug 2008 23:50:19 -0700 Received: from orsmsx419.amr.corp.intel.com ([10.22.226.88]) by orsmsx335.jf.intel.com with Microsoft SMTPSVC(6.0.3790.1830); Sun, 24 Aug 2008 23:52:53 -0700 X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Date: Sun, 24 Aug 2008 23:52:52 -0700 Message-ID: <12A5C15467D5B94F8E0FF265D9498ADD038AA0E9@orsmsx419.amr.corp.intel.com> In-Reply-To: <12A5C15467D5B94F8E0FF265D9498ADD0383F1CA@orsmsx419.amr.corp.intel.com> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: pmap->pm_stats.resident_count Thread-Index: AckBKhQLd0o4eU90ToGWJVTn0UwbjwAMB09wAUiGRiA= References: <20080818120021.751FB106568E@hub.freebsd.org> <12A5C15467D5B94F8E0FF265D9498ADD0383F1CA@orsmsx419.amr.corp.intel.com> From: "Rao, Nikhil" To: X-OriginalArrivalTime: 25 Aug 2008 06:52:53.0972 (UTC) FILETIME=[32CDA140:01C9067F] Subject: pmap->pm_stats.resident_count X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Aug 2008 06:52:55 -0000 vm_daemon() looks at pmap->pm_stats.resident_count in the pmap structure using vmspace_resident_count() which calls pmap_resident_count(), pm_stats.resident_count is also incremented for device memory either if the device memory has been mapped using pmap_object_init_pt or using pmap_enter. Since these pages do not belong to memory that is managed by the kernel, they should not really be accounted in the if check below in vm_pageout.c ? if (limit >=3D 0 && size >=3D limit) { 1593 vm_pageout_map_deactivate_pages( 1594 &p->p_vmspace->vm_map, limit); 1595 } Is my understanding correct ? What do the members of this list think ? Thanks, Nikhil