public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Tejun Heo <tj@kernel.org>
To: Changwoo Min <changwoo@igalia.com>
Cc: void@manifault.com, arighi@nvidia.com, kernel-dev@igalia.com,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 08/11] sched_ext: Add an event, BYPASS_DISPATCH
Date: Thu, 30 Jan 2025 02:25:02 -1000	[thread overview]
Message-ID: <Z5tvnjpNeuFZzdwy@slm.duckdns.org> (raw)
In-Reply-To: <1b3cd342-ddcb-4d53-a0bc-07e4ecc2973b@igalia.com>

On Thu, Jan 30, 2025 at 03:26:16PM +0900, Changwoo Min wrote:
> Hello,
> 
> On 25. 1. 28. 05:05, Tejun Heo wrote:
> > On Sun, Jan 26, 2025 at 07:16:11PM +0900, Changwoo Min wrote:
> > ...
> > >   has_tasks:
> > > +	if (scx_rq_bypassing(rq))
> > > +		__scx_add_event(BYPASS_DISPATCH, 1);
> > 
> > Can we do this at the sources even if that's a bit more code?
> 
> Sure. I will remove scx_add_event() and __scx_add_event() and will use
> this_cpu_add() and __this_cpu_add() directly.

Oh, that's not what I meant. I meant that in the code quoted above, the stat
is being incremented in a spot where most code paths converge and then the
specific stat condition is being tested again. It'd be better to update the
stat where the condition is detected initially.

Thanks.

-- 
tejun

  reply	other threads:[~2025-01-30 12:25 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-26 10:16 [PATCH v2 00/11] sched_ext: Implement core event counters Changwoo Min
2025-01-26 10:16 ` [PATCH v2 01/11] sched_ext: Implement event counter infrastructure Changwoo Min
2025-01-27 20:09   ` Tejun Heo
2025-01-30  6:12     ` Changwoo Min
2025-01-26 10:16 ` [PATCH v2 02/11] sched: Move is_cpu_allowed() to the header Changwoo Min
2025-01-26 10:16 ` [PATCH v2 03/11] sched_ext: Add an event, SELECT_CPU_FALLBACK Changwoo Min
2025-01-27 20:01   ` Tejun Heo
2025-01-30  6:22     ` Changwoo Min
2025-01-26 10:16 ` [PATCH v2 04/11] sched_ext: Add an event, DISPATCH_LOCAL_DSQ_OFFLINE Changwoo Min
2025-01-26 10:16 ` [PATCH v2 05/11] sched_ext: Add an event, DISPATCH_KEEP_LAST Changwoo Min
2025-01-26 10:16 ` [PATCH v2 06/11] sched_ext: Add an event, ENQ_SKIP_EXITING Changwoo Min
2025-01-26 10:16 ` [PATCH v2 07/11] sched_ext: Add an event, BYPASS_ACTIVATE Changwoo Min
2025-01-27 20:03   ` Tejun Heo
2025-01-30  6:34     ` Changwoo Min
2025-01-26 10:16 ` [PATCH v2 08/11] sched_ext: Add an event, BYPASS_DISPATCH Changwoo Min
2025-01-27 20:05   ` Tejun Heo
2025-01-30  6:26     ` Changwoo Min
2025-01-30 12:25       ` Tejun Heo [this message]
2025-01-31  1:13         ` Changwoo Min
2025-01-26 10:16 ` [PATCH v2 09/11] sched_ext: Add an event, BYPASS_DURATION Changwoo Min
2025-01-26 10:16 ` [PATCH v2 10/11] sched_ext: Add scx_bpf_event_stats() and scx_read_event() for BPF schedulers Changwoo Min
2025-01-26 10:16 ` [PATCH v2 11/11] sched_ext: Print core event count in scx_central scheduler Changwoo Min
2025-01-27 20:08   ` Tejun Heo
2025-01-30  6:28     ` Changwoo Min
2025-01-27 20:10 ` [PATCH v2 00/11] sched_ext: Implement core event counters Tejun Heo
2025-01-30  6:28   ` Changwoo Min

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Z5tvnjpNeuFZzdwy@slm.duckdns.org \
    --to=tj@kernel.org \
    --cc=arighi@nvidia.com \
    --cc=changwoo@igalia.com \
    --cc=kernel-dev@igalia.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=void@manifault.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox