lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <BLU437-SMTP34C73E2A63AF30704F02FB80B70@phx.gbl>
Date:	Sun, 31 May 2015 08:15:39 +0800
From:	Wanpeng Li <wanpeng.li@...mail.com>
To:	Peter Zijlstra <peterz@...radead.org>,
	Wanpeng Li <wanpeng.li@...ux.intel.com>
CC:	Ingo Molnar <mingo@...hat.com>, Juri Lelli <juri.lelli@....com>,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 7/7] sched/rt: reschedule if stop/dl task slip in after
 pull operations


On 5/29/15 10:34 PM, Peter Zijlstra wrote:
> On Wed, May 13, 2015 at 02:01:07PM +0800, Wanpeng Li wrote:
>> pull_rt_task() can drop (and re-acquire) rq->lock, this means a dl
>> or stop task can slip in, in which case need to reschedule. This
>> patch add the reschedule when the scenario occurs.
>>
>> Signed-off-by: Wanpeng Li <wanpeng.li@...ux.intel.com>
>> ---
>>   kernel/sched/rt.c | 19 ++++++++++++++++++-
>>   1 file changed, 18 insertions(+), 1 deletion(-)
>>
>> diff --git a/kernel/sched/rt.c b/kernel/sched/rt.c
>> index 560d2fa..8c948bf 100644
>> --- a/kernel/sched/rt.c
>> +++ b/kernel/sched/rt.c
>> @@ -2136,7 +2136,14 @@ static void switched_from_rt(struct rq *rq, struct task_struct *p)
>>   	if (!task_on_rq_queued(p) || rq->rt.rt_nr_running)
>>   		return;
>>   
>> -	if (pull_rt_task(rq))
>> +	/*
>> +	 * pull_rt_task() can drop (and re-acquire) rq->lock; this
>> +	 * means a dl or stop task can slip in, in which case we need
>> +	 * to reschedule.
>> +	 */
>> +	if (pull_rt_task(rq) ||
>> +		(unlikely((rq->stop && task_on_rq_queued(rq->stop)) ||
>> +			rq->dl.dl_nr_running)))
>>   		resched_curr(rq);
>>   }
> Same as before; why is the normal wakeup preemption check not working?

I will drop these two patches and send out v3. :)

Regards,
Wanpeng Li

> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@...r.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ