X-Git-Url: http://git.jankratochvil.net/?p=www.jankratochvil.net.git;a=blobdiff_plain;f=project%2Fcaptive%2Fdoc%2FCacheManager.pm;fp=project%2Fcaptive%2Fdoc%2FCacheManager.html.pl;h=754961c9df851aa4ca9236b09d1434d34b3d7b3a;hp=ba02996a47d13502c3e0d1a3a5cd536ebfd6f816;hb=f40e75167a045d189c3027a0b112a20c635d3e48;hpb=ef80d25b0a0307ee222d0a94eaae8abf1e9df31c diff --git a/project/captive/doc/CacheManager.html.pl b/project/captive/doc/CacheManager.pm similarity index 90% rename from project/captive/doc/CacheManager.html.pl rename to project/captive/doc/CacheManager.pm index ba02996..754961c 100755 --- a/project/captive/doc/CacheManager.html.pl +++ b/project/captive/doc/CacheManager.pm @@ -1,8 +1,6 @@ -#! /usr/bin/perl -# # $Id$ # Captive project doc Cache Manager page Perl template. -# Copyright (C) 2003 Jan Kratochvil +# Copyright (C) 2003-2005 Jan Kratochvil # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -25,24 +23,23 @@ our $CVS_ID=q$Id$; use strict; use warnings; -BEGIN{ open F,"Makefile"; our $top_dir=pop @{[split /\s/,(grep /^top_srcdir/,)[0]]}; eval "use lib '$top_dir'"; close F; } use My::Web; -require CGI; -BEGIN { Wuse 'project::captive::doc::Macros'; } +sub handler +{ + BEGIN { Wuse 'project::captive::doc::Macros'; } project::captive::doc::Macros->init( - "__PACKAGE__"=>__PACKAGE__, "title"=>'Captive NTFS Developer Documentation: NT Cache Manager', - "rel_prev"=>'Reverse.html.pl', - "rel_next"=>'Details.html.pl', + "rel_prev"=>'Reverse.pm', + "rel_next"=>'Details.pm', ); print <<"HERE"; -

NT Cache Manager

+

NT Cache Manager

Although there exist some 3rd party documents about NT Cache Manager W32 subsystem such as @@ -65,7 +62,7 @@ print <<"HERE"; (ImageSectionObject), insufficient system resources from NT Memory Manager or general effort to perform caching features for system performance.

- NT Cache Manager of this project has much +

NT Cache Manager of this project has much simpler goal - it just needs to provide compatible NT Cache Manager functionality while the other goals of its W32 counterpart are left to be successfuly handled @@ -108,7 +105,7 @@ print <<"HERE"; it is permitted to extend mapped size even in the case of existing (and dirty) Map or Pin mappings.

-

PCACHE_MANAGER_CALLBACKS argument can be +

PCACHE_MANAGER_CALLBACKS argument can be safely ignored:

@@ -147,8 +144,8 @@ print <<"HERE"; as it may be locked by existing ImageSectionObject of some file being executed etc. - It is fatal to destroy - SharedCacheMap + It is fatal to destroy + SharedCacheMap in the moment you see no other references to it as the driver will access it for some moment even after CcUninitializeCacheMap(). @@ -158,7 +155,7 @@ print <<"HERE"; Fortunately it is safe to never destroy SharedCacheMap and leave it leaked - everything gets clean in the - @{[ a_href 'Details.html.pl#sandbox','sandboxed environment' ]} soon anyway.

+ @{[ a_href 'Details.pm#sandbox','sandboxed environment' ]} soon anyway.

There exist Map and Pin type objects for each SharedCacheMap although they look very similiar. @@ -190,16 +187,16 @@ print <<"HERE";

Pin

Pin mapping always represents just one physical page - (PAGE_SIZE &nspan; 4096 for i386). + (PAGE_SIZE – 4096 for i386). Its base offset/length can be safely extended to be aligned to the requested page.

Pin can have associated pair of oldest and newest - LSN (Linear Sequence Number). It can be set by CcSetDirtyPinnedData() and Cache Manager always tracks the lowest and highest - reported LSN is assumed to be + reported LSN for each page. + LSN is assumed to be 0 if not set.

Any existing Pin mapping will be reused for further mappings @@ -212,10 +209,10 @@ print <<"HERE"; There can exist multiple Pin mappings of the same page (although sharing the same memory space). This detaching must be implemented even in the - @{[ a_href 'Details.html.pl#synchronous','single-threaded' ]} W32 implementation + @{[ a_href 'Details.pm#synchronous','single-threaded' ]} W32 implementation of this project as it is affecting the behaviour of Cache Manager. It was never - @{[ a_href 'CacheManager.html.pl#TraceFS','seen' ]} how to behave if multiple dirty Pin + @{[ a_href 'CacheManager.pm#TraceFS','seen' ]} how to behave if multiple dirty Pin mappings of the same page exist.

@@ -235,14 +232,14 @@ print <<"HERE"; their last unreferencing (in opposite of @{[ a_href '#sharedcachemap_leak','leaked SharedCacheMap' ]}). Despite it any dirty pages may still be held as the pages - (including their LSNs) are cached associated with SharedCacheMap. It may be also possible original Microsoft Windows Cache Manager postpones Pin mapping destroy to later time but it does not matter.

-

TraceFS NT Cache Manager Tracer

+

TraceFS NT Cache Manager Tracer

@{[ a_href '#cache_manager','Cache Manager behaviour' ]} would be hard to analyze just by @{[ a_href '#reverse','reverse engineering' ]} as it @@ -275,7 +272,7 @@ print <<"HERE";

You can now pray a bit and snap the resulting Cache Manager tracing from WinDbg by - @{[ a_href 'Reverse.html.pl#WinDbg','W32 remote kernel debugging' ]}:

+ @{[ a_href 'Reverse.pm#WinDbg','W32 remote kernel debugging' ]}:

@{[ doc_img 'ntdebug-windbg-boot','Successfuly connected WinDbg' ]} @@ -297,7 +294,7 @@ print <<"HERE"; @{[ captive_srcfile './src/TraceFS/checktrace.pl' ]} Perl Cache Manager validator.

-

TraceFS for general API tracing

+

TraceFS for general API tracing

Although TraceFS was up to now used only for tracing of NT Cache Manager it can be easily @@ -326,4 +323,6 @@ print <<"HERE"; HERE -project::captive::doc::Macros->footer(); +exit; +} +1;