use no IRQ disable spinlocks for page_table lock
This commit is contained in:
@@ -96,7 +96,7 @@ void update_process_page_table(struct process *process, struct vm_range *range,
|
|||||||
{
|
{
|
||||||
unsigned long p, pa = range->phys;
|
unsigned long p, pa = range->phys;
|
||||||
|
|
||||||
unsigned long flags = ihk_mc_spinlock_lock(&process->vm->page_table_lock);
|
ihk_mc_spinlock_lock_noirq(&process->vm->page_table_lock);
|
||||||
p = range->start;
|
p = range->start;
|
||||||
while (p < range->end) {
|
while (p < range->end) {
|
||||||
#ifdef USE_LARGE_PAGES
|
#ifdef USE_LARGE_PAGES
|
||||||
@@ -128,7 +128,7 @@ void update_process_page_table(struct process *process, struct vm_range *range,
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
ihk_mc_spinlock_unlock(&process->vm->page_table_lock, flags);
|
ihk_mc_spinlock_unlock_noirq(&process->vm->page_table_lock);
|
||||||
}
|
}
|
||||||
|
|
||||||
int add_process_large_range(struct process *process,
|
int add_process_large_range(struct process *process,
|
||||||
@@ -360,18 +360,17 @@ unsigned long extend_process_region(struct process *proc,
|
|||||||
int remove_process_region(struct process *proc,
|
int remove_process_region(struct process *proc,
|
||||||
unsigned long start, unsigned long end)
|
unsigned long start, unsigned long end)
|
||||||
{
|
{
|
||||||
unsigned long flags;
|
|
||||||
if ((start & (PAGE_SIZE - 1)) || (end & (PAGE_SIZE - 1))) {
|
if ((start & (PAGE_SIZE - 1)) || (end & (PAGE_SIZE - 1))) {
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
flags = ihk_mc_spinlock_lock(&proc->vm->page_table_lock);
|
ihk_mc_spinlock_lock_noirq(&proc->vm->page_table_lock);
|
||||||
/* We defer freeing to the time of exit */
|
/* We defer freeing to the time of exit */
|
||||||
while (start < end) {
|
while (start < end) {
|
||||||
ihk_mc_pt_clear_page(proc->vm->page_table, (void *)start);
|
ihk_mc_pt_clear_page(proc->vm->page_table, (void *)start);
|
||||||
start += PAGE_SIZE;
|
start += PAGE_SIZE;
|
||||||
}
|
}
|
||||||
ihk_mc_spinlock_unlock(&proc->vm->page_table_lock, flags);
|
ihk_mc_spinlock_unlock_noirq(&proc->vm->page_table_lock);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@@ -540,7 +539,7 @@ int sched_wakeup_process(struct process *proc, int valid_states)
|
|||||||
irqstate = ihk_mc_spinlock_lock(&(v->runq_lock));
|
irqstate = ihk_mc_spinlock_lock(&(v->runq_lock));
|
||||||
|
|
||||||
if (proc->status & valid_states) {
|
if (proc->status & valid_states) {
|
||||||
proc->status = PS_RUNNING;
|
xchg4((int *)(&proc->status), PS_RUNNING);
|
||||||
status = 0;
|
status = 0;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|||||||
Reference in New Issue
Block a user