PPL Logo

MSA_Page_StateT< ENTRY, ENTRIES_PER_PAGE > Class Template Reference

Stores all housekeeping information about a cached copy of a page: everything but the actual page data. More...

#include <msa-DistPageMgr.h>

Collaboration diagram for MSA_Page_StateT< ENTRY, ENTRIES_PER_PAGE >:

Collaboration graph
[legend]

Public Member Functions

bool canPageOut (void) const
 Return true if this page can be safely written back.
bool canDelete (void) const
 Return true if this page can be safely purged from memory.
 MSA_Page_StateT ()
void write (unsigned int i)
 Write entry i of this page.
void writeClear (void)
 Clear the write list for this page.
int roundUp (int v, int m)
 Return the nearest multiple of m >= v.
int writeSpans (MSA_WriteSpan_t *span)
 Get a list of our written output values as this list of spans.

Data Fields

MSA_Page_Fault_t state
 e.g., Read_Fault for a read-only page.
bool locked
 If true, this page is locked in memory.
MSA_Listeners readRequests
 Threads waiting for this page to be paged in from the network.
MSA_Listeners writeRequests
 Threads waiting for this page to be paged out to the network.

Private Types

enum  { writes_bits = writes_t::store_bits }
enum  { writes2_bits = writes2_t::store_bits*writes_t::store_bits }
typedef fixedlength_bitvector
< ENTRIES_PER_PAGE > 
writes_t
 Write tracking: Somehow, we have to identify the entries in a page that have been written to.
typedef writes_t::store_t writes_store_t
typedef fixedlength_bitvector
< writes_t::len > 
writes2_t
 Tracking writes to our writes: a smaller vector, used to avoid the large number of 0's in the writes vector.
typedef writes2_t::store_t writes2_store_t

Private Attributes

writes_t writes
writes2_t writes2

Detailed Description

template<class ENTRY, unsigned int ENTRIES_PER_PAGE>
class MSA_Page_StateT< ENTRY, ENTRIES_PER_PAGE >

Stores all housekeeping information about a cached copy of a page: everything but the actual page data.

Definition at line 115 of file msa-DistPageMgr.h.


Member Typedef Documentation

template<class ENTRY, unsigned int ENTRIES_PER_PAGE>
typedef fixedlength_bitvector<ENTRIES_PER_PAGE> MSA_Page_StateT< ENTRY, ENTRIES_PER_PAGE >::writes_t [private]

Write tracking: Somehow, we have to identify the entries in a page that have been written to.

Our method for doing this is a bitvector: 0's indicate the entry hasn't been written; 1's indicate the entry has been written.

Definition at line 123 of file msa-DistPageMgr.h.

template<class ENTRY, unsigned int ENTRIES_PER_PAGE>
typedef writes_t::store_t MSA_Page_StateT< ENTRY, ENTRIES_PER_PAGE >::writes_store_t [private]

Definition at line 125 of file msa-DistPageMgr.h.

template<class ENTRY, unsigned int ENTRIES_PER_PAGE>
typedef fixedlength_bitvector<writes_t::len> MSA_Page_StateT< ENTRY, ENTRIES_PER_PAGE >::writes2_t [private]

Tracking writes to our writes: a smaller vector, used to avoid the large number of 0's in the writes vector.

Bit i of writes2 indicates that store_t i of writes has 1's.

Definition at line 131 of file msa-DistPageMgr.h.

template<class ENTRY, unsigned int ENTRIES_PER_PAGE>
typedef writes2_t::store_t MSA_Page_StateT< ENTRY, ENTRIES_PER_PAGE >::writes2_store_t [private]

Definition at line 133 of file msa-DistPageMgr.h.


Member Enumeration Documentation

template<class ENTRY, unsigned int ENTRIES_PER_PAGE>
anonymous enum [private]

Enumerator:
writes_bits 

Definition at line 126 of file msa-DistPageMgr.h.

template<class ENTRY, unsigned int ENTRIES_PER_PAGE>
anonymous enum [private]

Enumerator:
writes2_bits 

Definition at line 134 of file msa-DistPageMgr.h.


Constructor & Destructor Documentation

template<class ENTRY, unsigned int ENTRIES_PER_PAGE>
MSA_Page_StateT< ENTRY, ENTRIES_PER_PAGE >::MSA_Page_StateT (  )  [inline]

Definition at line 159 of file msa-DistPageMgr.h.


Member Function Documentation

template<class ENTRY, unsigned int ENTRIES_PER_PAGE>
bool MSA_Page_StateT< ENTRY, ENTRIES_PER_PAGE >::canPageOut ( void   )  const [inline]

Return true if this page can be safely written back.

Definition at line 150 of file msa-DistPageMgr.h.

template<class ENTRY, unsigned int ENTRIES_PER_PAGE>
bool MSA_Page_StateT< ENTRY, ENTRIES_PER_PAGE >::canDelete ( void   )  const [inline]

Return true if this page can be safely purged from memory.

Definition at line 155 of file msa-DistPageMgr.h.

template<class ENTRY, unsigned int ENTRIES_PER_PAGE>
void MSA_Page_StateT< ENTRY, ENTRIES_PER_PAGE >::write ( unsigned int  i  )  [inline]

Write entry i of this page.

Definition at line 165 of file msa-DistPageMgr.h.

template<class ENTRY, unsigned int ENTRIES_PER_PAGE>
void MSA_Page_StateT< ENTRY, ENTRIES_PER_PAGE >::writeClear ( void   )  [inline]

Clear the write list for this page.

Definition at line 171 of file msa-DistPageMgr.h.

References len.

template<class ENTRY, unsigned int ENTRIES_PER_PAGE>
int MSA_Page_StateT< ENTRY, ENTRIES_PER_PAGE >::roundUp ( int  v,
int  m 
) [inline]

Return the nearest multiple of m >= v.

Definition at line 182 of file msa-DistPageMgr.h.

template<class ENTRY, unsigned int ENTRIES_PER_PAGE>
int MSA_Page_StateT< ENTRY, ENTRIES_PER_PAGE >::writeSpans ( MSA_WriteSpan_t span  )  [inline]

Get a list of our written output values as this list of spans.

Returns the total number of spans written to "span".

Definition at line 188 of file msa-DistPageMgr.h.

References MSA_WriteSpan_t::end, and MSA_WriteSpan_t::start.


Field Documentation

template<class ENTRY, unsigned int ENTRIES_PER_PAGE>
writes_t MSA_Page_StateT< ENTRY, ENTRIES_PER_PAGE >::writes [private]

Definition at line 124 of file msa-DistPageMgr.h.

template<class ENTRY, unsigned int ENTRIES_PER_PAGE>
writes2_t MSA_Page_StateT< ENTRY, ENTRIES_PER_PAGE >::writes2 [private]

Definition at line 132 of file msa-DistPageMgr.h.

template<class ENTRY, unsigned int ENTRIES_PER_PAGE>
MSA_Page_Fault_t MSA_Page_StateT< ENTRY, ENTRIES_PER_PAGE >::state

e.g., Read_Fault for a read-only page.

Definition at line 138 of file msa-DistPageMgr.h.

template<class ENTRY, unsigned int ENTRIES_PER_PAGE>
bool MSA_Page_StateT< ENTRY, ENTRIES_PER_PAGE >::locked

If true, this page is locked in memory.

Pages get locked so people can safely use the non-checking version of "get".

Definition at line 142 of file msa-DistPageMgr.h.

Referenced by MSA_CacheGroup< ENTRY_TYPE, ENTRY_OPS_CLASS, ENTRIES_PER_PAGE >::UnlockPage().

template<class ENTRY, unsigned int ENTRIES_PER_PAGE>
MSA_Listeners MSA_Page_StateT< ENTRY, ENTRIES_PER_PAGE >::readRequests

Threads waiting for this page to be paged in from the network.

Definition at line 145 of file msa-DistPageMgr.h.

template<class ENTRY, unsigned int ENTRIES_PER_PAGE>
MSA_Listeners MSA_Page_StateT< ENTRY, ENTRIES_PER_PAGE >::writeRequests

Threads waiting for this page to be paged out to the network.

Definition at line 147 of file msa-DistPageMgr.h.


The documentation for this class was generated from the following file:

Generated on Mon Sep 21 08:27:46 2020 for Charm++ by  doxygen 1.5.5