Updated from Linux LTS 3.10.25 to 3.10.26
This commit is contained in:
@@ -1488,7 +1488,13 @@ try_to_wake_up(struct task_struct *p, unsigned int state, int wake_flags)
|
||||
unsigned long flags;
|
||||
int cpu, success = 0;
|
||||
|
||||
smp_wmb();
|
||||
/*
|
||||
* If we are going to wake up a thread waiting for CONDITION we
|
||||
* need to ensure that CONDITION=1 done by the caller can not be
|
||||
* reordered with p->state check below. This pairs with mb() in
|
||||
* set_current_state() the waiting thread does.
|
||||
*/
|
||||
smp_mb__before_spinlock();
|
||||
raw_spin_lock_irqsave(&p->pi_lock, flags);
|
||||
if (!(p->state & state))
|
||||
goto out;
|
||||
@@ -2995,6 +3001,12 @@ need_resched:
|
||||
if (sched_feat(HRTICK))
|
||||
hrtick_clear(rq);
|
||||
|
||||
/*
|
||||
* Make sure that signal_pending_state()->signal_pending() below
|
||||
* can't be reordered with __set_current_state(TASK_INTERRUPTIBLE)
|
||||
* done by the caller to avoid the race with signal_wake_up().
|
||||
*/
|
||||
smp_mb__before_spinlock();
|
||||
raw_spin_lock_irq(&rq->lock);
|
||||
|
||||
switch_count = &prev->nivcsw;
|
||||
|
||||
@@ -936,6 +936,13 @@ void task_numa_work(struct callback_head *work)
|
||||
if (vma->vm_end - vma->vm_start < HPAGE_SIZE)
|
||||
continue;
|
||||
|
||||
/*
|
||||
* Skip inaccessible VMAs to avoid any confusion between
|
||||
* PROT_NONE and NUMA hinting ptes
|
||||
*/
|
||||
if (!(vma->vm_flags & (VM_READ | VM_EXEC | VM_WRITE)))
|
||||
continue;
|
||||
|
||||
do {
|
||||
start = max(start, vma->vm_start);
|
||||
end = ALIGN(start + (pages << PAGE_SHIFT), HPAGE_SIZE);
|
||||
|
||||
@@ -924,6 +924,13 @@ inc_rt_prio_smp(struct rt_rq *rt_rq, int prio, int prev_prio)
|
||||
{
|
||||
struct rq *rq = rq_of_rt_rq(rt_rq);
|
||||
|
||||
#ifdef CONFIG_RT_GROUP_SCHED
|
||||
/*
|
||||
* Change rq's cpupri only if rt_rq is the top queue.
|
||||
*/
|
||||
if (&rq->rt != rt_rq)
|
||||
return;
|
||||
#endif
|
||||
if (rq->online && prio < prev_prio)
|
||||
cpupri_set(&rq->rd->cpupri, rq->cpu, prio);
|
||||
}
|
||||
@@ -933,6 +940,13 @@ dec_rt_prio_smp(struct rt_rq *rt_rq, int prio, int prev_prio)
|
||||
{
|
||||
struct rq *rq = rq_of_rt_rq(rt_rq);
|
||||
|
||||
#ifdef CONFIG_RT_GROUP_SCHED
|
||||
/*
|
||||
* Change rq's cpupri only if rt_rq is the top queue.
|
||||
*/
|
||||
if (&rq->rt != rt_rq)
|
||||
return;
|
||||
#endif
|
||||
if (rq->online && rt_rq->highest_prio.curr != prev_prio)
|
||||
cpupri_set(&rq->rd->cpupri, rq->cpu, rt_rq->highest_prio.curr);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user