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] [day] [month] [year] [list]
Message-ID: <e1a028d8-3be2-4bea-961a-855de4626999@igalia.com>
Date: Tue, 4 Feb 2025 00:51:02 +0900
From: Changwoo Min <changwoo@...lia.com>
To: Tejun Heo <tj@...nel.org>
Cc: void@...ifault.com, arighi@...dia.com, kernel-dev@...lia.com,
 linux-kernel@...r.kernel.org
Subject: Re: [PATCH v3 07/11] sched_ext: Add an event, SCX_EV_BYPASS_DISPATCH

Hello,

On 25. 2. 3. 02:33, Tejun Heo wrote:
> Hello,
> 
> On Fri, Jan 31, 2025 at 04:09:34PM +0900, Changwoo Min wrote:
> ...
>> @@ -2869,11 +2874,17 @@ static int balance_one(struct rq *rq, struct task_struct *prev)
>>   	}
>>   
>>   	/* if there already are tasks to run, nothing to do */
>> -	if (rq->scx.local_dsq.nr)
>> +	if (rq->scx.local_dsq.nr) {
>> +		if (scx_rq_bypassing(rq))
>> +			__scx_add_event(SCX_EV_BYPASS_DISPATCH, 1);
>>   		goto has_tasks;
>> +	}
>>   
>> -	if (consume_global_dsq(rq))
>> +	if (consume_global_dsq(rq)) {
>> +		if (scx_rq_bypassing(rq))
>> +			__scx_add_event(SCX_EV_BYPASS_DISPATCH, 1);
> 
> Hmm... Wouldn't it be easier to count it from select_task_rq_scx() and
> do_enqueue_task()? The latter already has scx_rq_bypassing() condition and
> the former one can easily cache bypassing test result and use that in the
> else block.

That makes sense. I will change the code as you suggested.

> 
>> @@ -2899,10 +2910,16 @@ static int balance_one(struct rq *rq, struct task_struct *prev)
>>   			rq->scx.flags |= SCX_RQ_BAL_KEEP;
>>   			goto has_tasks;
>>   		}
>> -		if (rq->scx.local_dsq.nr)
>> +		if (rq->scx.local_dsq.nr) {
>> +			if (scx_rq_bypassing(rq))
>> +				__scx_add_event(SCX_EV_BYPASS_DISPATCH, 1);
>>   			goto has_tasks;
>> -		if (consume_global_dsq(rq))
>> +		}
>> +		if (consume_global_dsq(rq)) {
>> +			if (scx_rq_bypassing(rq))
>> +				__scx_add_event(SCX_EV_BYPASS_DISPATCH, 1);
>>   			goto has_tasks;
>> +		}
> 
> The above can happen while bypass mode is being turned on but once on
> control doesn't even reach here, right?

You are right. I will clean this up.

Regards,
Changwoo Min

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ