[OpenAFS] Re: Windows cache rehashed...

Jeffrey Altman jaltman@columbia.edu
Wed, 17 Dec 2003 12:54:27 -0500


This is a cryptographically signed message in MIME format.

--------------ms070603050804020104050208
Content-Type: multipart/alternative;
 boundary="------------060904070802040305090207"

This is a multi-part message in MIME format.
--------------060904070802040305090207
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit

You can read information about the CreateFileMapping() API within the 
MSDN library.
The memory associated with the file mapping is allocated as 
PAGE_READWRITE with the
default section attribute (SEC_COMMIT):


SEC_COMMIT 	Allocates physical storage in memory or in the paging file 
on disk for all pages of a section. This is the default setting.
SEC_IMAGE 	The file specified for a section's file mapping is an 
executable image file. Because the mapping information and file 
protection are taken from the image file, no other attributes are valid 
with SEC_IMAGE.

*Windows Me/98/95:  *This flag is not supported.

SEC_NOCACHE 	All pages of a section are to be set as noncacheable. This 
attribute is intended for architectures requiring various locking 
structures to be in memory that is never fetched into the processor's. 
On 80x86 and MIPS machines, using the cache for these structures only 
slows down the performance as the hardware keeps the caches coherent. 
Some device drivers require noncached data so that programs can write 
through to the physical memory. SEC_NOCACHE requires either the 
SEC_RESERVE or SEC_COMMIT to also be set.
SEC_RESERVE 	Reserves all pages of a section without allocating physical 
storage. The reserved range of pages cannot be used by any other 
allocation operations until it is released. Reserved pages can be 
committed in subsequent calls to the *VirtualAlloc* function. This 
attribute is valid only if the /hFile/ parameter is 
INVALID_HANDLE_VALUE; that is, a file mapping object backed by the 
operating system paging file.



Joe Buehler wrote:

> OK, thanks -- the cache file is mmap'd by afsd and it depends on Windows
> to manage what's in RAM.
>
> The question arose because of a peculiarity of Task Manager under 
> Windows NT.
> It shows "memory usage" for afsd being about the size of the cache, but
> "virtual memory" stays small.  So I guess Task Manager has a couple 
> things
> mixed up, or they have defined some terms strangely.


--------------060904070802040305090207
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
  <title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
You can read information about the CreateFileMapping() API within the
MSDN library.<br>
The memory associated with the file mapping is allocated as
PAGE_READWRITE with the<br>
default section attribute (SEC_COMMIT):<br>
<br>
<br>
<table>
  <tbody>
    <tr>
      <td width="40%">SEC_COMMIT</td>
      <td width="60%">Allocates physical storage in memory or in the
paging file on disk for all pages of a section. This is the default
setting.</td>
    </tr>
    <tr>
      <td width="40%">SEC_IMAGE</td>
      <td width="60%">The file specified for a section's file mapping
is an executable image file. Because the mapping information and file
protection are taken from the image file, no other attributes are valid
with SEC_IMAGE.
      <p></p>
      <p><b>Windows&nbsp;Me/98/95:&nbsp;&nbsp;</b>This flag is not supported.</p>
      </td>
    </tr>
    <tr>
      <td width="40%">SEC_NOCACHE</td>
      <td width="60%">All pages of a section are to be set as
noncacheable. This attribute is intended for architectures requiring
various locking structures to be in memory that is never fetched into
the processor's. On 80x86 and MIPS machines, using the cache for these
structures only slows down the performance as the hardware keeps the
caches coherent. Some device drivers require noncached data so that
programs can write through to the physical memory. SEC_NOCACHE requires
either the SEC_RESERVE or SEC_COMMIT to also be set.</td>
    </tr>
    <tr>
      <td width="40%">SEC_RESERVE</td>
      <td width="60%">Reserves all pages of a section without
allocating physical storage. The reserved range of pages cannot be used
by any other allocation operations until it is released. Reserved pages
can be committed in subsequent calls to the <MSHelp:link tabindex="0"
 keywords="base.virtualalloc" errorurl="../common/badjump.htm"><b>VirtualAlloc</b></MSHelp:link>
function. This attribute is valid only if the <i>hFile</i> parameter
is INVALID_HANDLE_VALUE; that is, a file mapping object backed by the
operating system paging file.</td>
    </tr>
  </tbody>
</table>
<br>
<br>
Joe Buehler wrote:<br>
<blockquote cite="mid3FDF721A.6020101@hekimian.com" type="cite">OK,
thanks -- the cache file is mmap'd by afsd and it depends on Windows
  <br>
to manage what's in RAM.
  <br>
  <br>
The question arose because of a peculiarity of Task Manager under
Windows NT.
  <br>
It shows "memory usage" for afsd being about the size of the cache, but
  <br>
"virtual memory" stays small.&nbsp; So I guess Task Manager has a couple
things
  <br>
mixed up, or they have defined some terms strangely.
  <br>
</blockquote>
</body>
</html>

--------------060904070802040305090207--

--------------ms070603050804020104050208
Content-Type: application/x-pkcs7-signature; name="smime.p7s"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="smime.p7s"
Content-Description: S/MIME Cryptographic Signature

MIAGCSqGSIb3DQEHAqCAMIACAQExCzAJBgUrDgMCGgUAMIAGCSqGSIb3DQEHAQAAoIIJUDCC
AwYwggJvoAMCAQICAwpxijANBgkqhkiG9w0BAQQFADCBkjELMAkGA1UEBhMCWkExFTATBgNV
BAgTDFdlc3Rlcm4gQ2FwZTESMBAGA1UEBxMJQ2FwZSBUb3duMQ8wDQYDVQQKEwZUaGF3dGUx
HTAbBgNVBAsTFENlcnRpZmljYXRlIFNlcnZpY2VzMSgwJgYDVQQDEx9QZXJzb25hbCBGcmVl
bWFpbCBSU0EgMjAwMC44LjMwMB4XDTAzMDczMDAyMDkyOFoXDTA0MDcyOTAyMDkyOFowRjEf
MB0GA1UEAxMWVGhhd3RlIEZyZWVtYWlsIE1lbWJlcjEjMCEGCSqGSIb3DQEJARYUamFsdG1h
bkBjb2x1bWJpYS5lZHUwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDBtDG6ZyGA
sK+rZOfKPKGBn6oCTLYSLk/mpeX9QTmTG71qh308KUeN35qqoRXjLvscfw6NPOYXiuxE/RqL
sx7WKEnK3C4gzzpioCTX1b7o4M7YbpvCRBFPE9Jgsd0yz2EN+mk/pPuK1GP+iQNot2m4A56A
aPe6F5T25GqffU535GNIdAtWPao6wHcOm17se25ny/TNzb9mlA4UzYl9XP7MF1fkpJyaDDAy
DNNTSSjxBdPVs2EaYq1p/xadXbIpysQiySXAxoeiZusgJopRHLcBsBmmY9QVD4QnUqZVmfJ5
f1CiNri5vlexKCmdFSrxMLuoLr4EQZC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