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: <AANLkTi=gtnZ-uC-t6u9R=pNd_aSKE3YsXi_HUqnu5+VQ@mail.gmail.com>
Date:	Fri, 4 Mar 2011 14:05:52 +0530
From:	Balbir Singh <balbir@...ux.vnet.ibm.com>
To:	Yong Zhang <yong.zhang0@...il.com>
Cc:	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	Ingo Molnar <mingo@...e.hu>,
	Peter Zijlstra <pzijlstr@...hat.com>,
	Srivatsa Vaddagiri <vatsa@...ux.vnet.ibm.com>,
	Bharata B Rao <bharata.rao@...ibm.com>
Subject: Re: [BUGFIX][PATCH] Fix sched rt group scheduling when hierachy is enabled

On Fri, Mar 4, 2011 at 2:02 PM, Yong Zhang <yong.zhang0@...il.com> wrote:
> On Fri, Mar 4, 2011 at 3:25 PM, Balbir Singh <balbir@...ux.vnet.ibm.com> wrote:
>> * Yong Zhang <yong.zhang0@...il.com> [2011-03-04 11:43:16]:
>>
>>> On Thu, Mar 3, 2011 at 11:29 PM, Balbir Singh <balbir@...ux.vnet.ibm.com> wrote:
>>> > No, not really :) It is required, it is a backup check to see if we
>>> > have queued tasks, rt_time of 0 and the runqueue is not throttled, why
>>> > should it be dequeued?
>>>
>>> But I can't see where that kind of rt_rq is dequeued, mind pointing it out?
>>>
>>
>> So here is what I saw
>>
>> 1. sched_dequeue_stack called from the dequeue path dequeues the
>> queues and sets rt_nr_running to 0
>> 2. Enqueuing fails because rt_throttled is set for the group_rq
>> (parent who is throttled)
>> 3. This causes further enqueue to fail, since rt_nr_running did
>> not increment in step 2
>
> Whose rt_nr_running? group_rq's or parent of group_rq?
> For parent of group_rq, yes.
> For group_rq's, no, because we don't touch its rt_nr_running.
>

For parent of group_rq

>
>> , eventually the timer decrements rt_time
>> to 0 and the task is never picked up.
>
> If I understand correctly, you mean this:
>
> For a group(A) which has one task(b) attached but A is throttled,so
> A is unqueued now
> A.throttled == 1 && A.rt_nr_running == 1
>  deactivate_task(b); /* A.throttled == 1 && A.rt_nr_running == 0 */
>    do_sched_rt_period_timer(); /* A.run_time == 0 && A.throttled == 0*/

Note at some point rt_time becomes 0 and if enqueue is not set, the
next do_sched_rt_period_timer() is a NOP and does not enqueue back the
group

Balbir
--
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