Home | History | Annotate | Download | only in orig

Lines Matching defs:pGroup

41206 typedef struct PGroup PGroup;
41219 u8 isAnchor; /* This is the PGroup.lru element */
41226 /* Each page cache (or PCache) belongs to a PGroup. A PGroup is a set
41228 ** pages when they are under memory pressure. A PGroup is an instance of
41233 ** (1) Every PCache is the sole member of its own PGroup. There is
41234 ** one PGroup per PCache.
41236 ** (2) There is a single global PGroup that all PCaches are a member
41244 ** For mode (1), PGroup.mutex is NULL. For mode (2) there is only a single
41245 ** PGroup which is the pcache1.grp global variable and its mutex is
41248 struct PGroup {
41269 ** The PGroup mutex must be held when accessing nMax.
41271 PGroup *pGroup; /* PGroup this cache belongs to */
41282 ** when the accessor is holding the PGroup mutex.
41304 PGroup grp; /* The global PGroup for mode (2) */
41312 int separateCache; /* Use a new PGroup for each PCache */
41520 assert( sqlite3_mutex_held(pCache->pGroup->mutex) );
41531 assert( pCache->pGroup==&pcache1.grp );
41532 pcache1LeaveMutex(pCache->pGroup);
41549 pcache1EnterMutex(pCache->pGroup);
41558 pCache->pGroup->nCurrentPage++;
41570 assert( sqlite3_mutex_held(p->pCache->pGroup->mutex) );
41581 pCache->pGroup->nCurrentPage--;
41640 assert( sqlite3_mutex_held(p->pGroup->mutex) );
41647 pcache1LeaveMutex(p->pGroup);
41651 pcache1EnterMutex(p->pGroup);
41671 ** PGroup LRU list, if is part of it. If pPage is not part of the PGroup
41674 ** The PGroup mutex must be held when this function is called.
41684 assert( sqlite3_mutex_held(pCache->pGroup->mutex) );
41691 assert( pCache->pGroup->lru.isAnchor==1 );
41702 ** The PGroup mutex must be held when this function is called.
41709 assert( sqlite3_mutex_held(pCache->pGroup->mutex) );
41723 PGroup *pGroup = pCache->pGroup;
41725 assert( sqlite3_mutex_held(pGroup->mutex) );
41726 while( pGroup->nCurrentPage>pGroup->nMaxPage
41727 && (p=pGroup->lru.pLruPrev)->isAnchor==0
41729 assert( p->pCache->pGroup==pGroup );
41753 assert( sqlite3_mutex_held(pCache->pGroup->mutex) );
41786 ** private PGroup (mode-1). pcache1.separateCache is false if the single
41787 ** PGroup in pcache1.grp is used for all page caches (mode-2).
41847 PGroup *pGroup; /* The group the new page cache will belong to */
41853 sz = sizeof(PCache1) + sizeof(PGroup)*pcache1.separateCache;
41857 pGroup = (PGroup*)&pCache[1];
41858 pGroup->mxPinned = 10;
41860 pGroup = &pcache1.grp;
41862 if( pGroup->lru.isAnchor==0 ){
41863 pGroup->lru.isAnchor = 1;
41864 pGroup->lru.pLruPrev = pGroup->lru.pLruNext = &pGroup->lru;
41866 pCache->pGroup = pGroup;
41871 pcache1EnterMutex(pGroup);
41875 pGroup->nMinPage += pCache->nMin;
41876 pGroup->mxPinned = pGroup->nMaxPage + 10 - pGroup->nMinPage;
41878 pcache1LeaveMutex(pGroup);
41895 PGroup *pGroup = pCache->pGroup;
41896 pcache1EnterMutex(pGroup);
41897 pGroup->nMaxPage += (nMax - pCache->nMax);
41898 pGroup->mxPinned = pGroup->nMaxPage + 10 - pGroup->nMinPage;
41902 pcache1LeaveMutex(pGroup);
41914 PGroup *pGroup = pCache->pGroup;
41916 pcache1EnterMutex(pGroup);
41917 savedMaxPage = pGroup->nMaxPage;
41918 pGroup->nMaxPage = 0;
41920 pGroup->nMaxPage = savedMaxPage;
41921 pcache1LeaveMutex(pGroup);
41931 pcache1EnterMutex(pCache->pGroup);
41933 pcache1LeaveMutex(pCache->pGroup);
41952 PGroup *pGroup = pCache->pGroup;
41958 assert( pGroup->mxPinned == pGroup->nMaxPage + 10 - pGroup->nMinPage );
41961 nPinned>=pGroup->mxPinned
41973 && !pGroup->lru.pLruPrev->isAnchor
41977 pPage = pGroup->lru.pLruPrev;
41986 pGroup->nCurrentPage -= (pOther->bPurgeable - pCache->bPurgeable);
42071 ** the common case where pGroup->mutex is NULL. The pcache1Fetch() wrapper
42112 pcache1EnterMutex(pCache->pGroup);
42115 pcache1LeaveMutex(pCache->pGroup);
42135 if( pCache->pGroup->mutex ){
42157 PGroup *pGroup = pCache->pGroup;
42160 pcache1EnterMutex(pGroup);
42163 ** part of the PGroup LRU list.
42168 if( reuseUnlikely || pGroup->nCurrentPage>pGroup->nMaxPage ){
42171 /* Add the page to the PGroup LRU list. */
42172 PgHdr1 **ppFirst = &pGroup->lru.pLruNext;
42173 pPage->pLruPrev = &pGroup->lru;
42180 pcache1LeaveMutex(pCache->pGroup);
42199 pcache1EnterMutex(pCache->pGroup);
42216 pcache1LeaveMutex(pCache->pGroup);
42228 pcache1EnterMutex(pCache->pGroup);
42233 pcache1LeaveMutex(pCache->pGroup);
42243 PGroup *pGroup = pCache->pGroup;
42245 pcache1EnterMutex(pGroup);
42247 assert( pGroup->nMaxPage >= pCache->nMax );
42248 pGroup->nMaxPage -= pCache->nMax;
42249 assert( pGroup->nMinPage >= pCache->nMin );
42250 pGroup->nMinPage -= pCache->nMin;
42251 pGroup->mxPinned = pGroup->nMaxPage + 10 - pGroup->nMinPage;
42253 pcache1LeaveMutex(pGroup);