|
@@ -60,7 +60,7 @@ static inline bool vmacache_valid_mm(struct mm_struct *mm)
|
|
void vmacache_update(unsigned long addr, struct vm_area_struct *newvma)
|
|
void vmacache_update(unsigned long addr, struct vm_area_struct *newvma)
|
|
{
|
|
{
|
|
if (vmacache_valid_mm(newvma->vm_mm))
|
|
if (vmacache_valid_mm(newvma->vm_mm))
|
|
- current->vmacache[VMACACHE_HASH(addr)] = newvma;
|
|
|
|
|
|
+ current->vmacache.vmas[VMACACHE_HASH(addr)] = newvma;
|
|
}
|
|
}
|
|
|
|
|
|
static bool vmacache_valid(struct mm_struct *mm)
|
|
static bool vmacache_valid(struct mm_struct *mm)
|
|
@@ -71,12 +71,12 @@ static bool vmacache_valid(struct mm_struct *mm)
|
|
return false;
|
|
return false;
|
|
|
|
|
|
curr = current;
|
|
curr = current;
|
|
- if (mm->vmacache_seqnum != curr->vmacache_seqnum) {
|
|
|
|
|
|
+ if (mm->vmacache_seqnum != curr->vmacache.seqnum) {
|
|
/*
|
|
/*
|
|
* First attempt will always be invalid, initialize
|
|
* First attempt will always be invalid, initialize
|
|
* the new cache for this task here.
|
|
* the new cache for this task here.
|
|
*/
|
|
*/
|
|
- curr->vmacache_seqnum = mm->vmacache_seqnum;
|
|
|
|
|
|
+ curr->vmacache.seqnum = mm->vmacache_seqnum;
|
|
vmacache_flush(curr);
|
|
vmacache_flush(curr);
|
|
return false;
|
|
return false;
|
|
}
|
|
}
|
|
@@ -93,7 +93,7 @@ struct vm_area_struct *vmacache_find(struct mm_struct *mm, unsigned long addr)
|
|
return NULL;
|
|
return NULL;
|
|
|
|
|
|
for (i = 0; i < VMACACHE_SIZE; i++) {
|
|
for (i = 0; i < VMACACHE_SIZE; i++) {
|
|
- struct vm_area_struct *vma = current->vmacache[i];
|
|
|
|
|
|
+ struct vm_area_struct *vma = current->vmacache.vmas[i];
|
|
|
|
|
|
if (!vma)
|
|
if (!vma)
|
|
continue;
|
|
continue;
|
|
@@ -121,7 +121,7 @@ struct vm_area_struct *vmacache_find_exact(struct mm_struct *mm,
|
|
return NULL;
|
|
return NULL;
|
|
|
|
|
|
for (i = 0; i < VMACACHE_SIZE; i++) {
|
|
for (i = 0; i < VMACACHE_SIZE; i++) {
|
|
- struct vm_area_struct *vma = current->vmacache[i];
|
|
|
|
|
|
+ struct vm_area_struct *vma = current->vmacache.vmas[i];
|
|
|
|
|
|
if (vma && vma->vm_start == start && vma->vm_end == end) {
|
|
if (vma && vma->vm_start == start && vma->vm_end == end) {
|
|
count_vm_vmacache_event(VMACACHE_FIND_HITS);
|
|
count_vm_vmacache_event(VMACACHE_FIND_HITS);
|