From: Mel Gorman <mgorman@suse.de>
To: Libo Chen <libo.chen@oracle.com>
Cc: Tim Chen <tim.c.chen@linux.intel.com>,
peterz@infradead.org, vincent.guittot@linaro.org,
21cnbao@gmail.com, dietmar.eggemann@arm.com,
linux-kernel@vger.kernel.org, tglx@linutronix.de,
Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Subject: Re: [PATCH] sched/fair: no sync wakeup from interrupt context
Date: Fri, 15 Jul 2022 11:07:38 +0100 [thread overview]
Message-ID: <20220715100738.GD3493@suse.de> (raw)
In-Reply-To: <0c0dab83-807d-317e-af1a-7bd898626b86@oracle.com>
On Thu, Jul 14, 2022 at 01:21:14PM -0700, Libo Chen wrote:
> > state explicitly that "the interrupt CPU isn't as performance critical as
> > cache from its previous CPU" so that assumption was incorrect, at least
> > in your case. I don't have a counter example where the interrupt data *is*
> > more important than any other cache-hot data so the check can go.
> >
> > I think a revert would not achieve what you want as a plain revert would
> > still allow an interrupt to pull a task from an arbitrary location as sync
> This is the tricky part, I didn't explain it well. For rds-stress, it's a
> lot (~30%) better to allow pulling across nodes when the waking CPU is idle.
Ah, the exact opposite then.
> I think this may be an example of interrupt data being more important.
> Something
> like below will help a lot for this particular benchmark (rds-stress):
>
> if (available_idle_cpu(this_cpu))
> return this_cpu;
>
I see but this will likely regress for workloads that receive interrupts on
arbitrary CPUs that are not related to the tasks preferred location. This
can happen for IO completions for example where interrupts can be delivered
round-robin to many CPUs in the system. It's all described in the changelog
for 7332dec055f2
Unfortunately, depending on the type of interrupt and IRQ
configuration, there may not be a strong relationship between the
CPU an interrupt was delivered on and the CPU a task was running
on. For example, the interrupts could all be delivered to CPUs on
one particular node due to the machine topology or IRQ affinity
configuration. Another example is an interrupt for an IO completion
which can be delivered to any CPU where there is no guarantee the
data is either cache hot or even local.
> still pulls
> the wakee task to that CPU across nodes irrespective of its previous CPU.
> And that's
> what this patch tries to address.
>
> Mel, I am thinking about a follow-up patch like below then we can continue
> the discussion
> there since this is kinda a separate issue:
>
> - if (available_idle_cpu(this_cpu) && cpus_share_cache(this_cpu, prev_cpu))
> - return available_idle_cpu(prev_cpu) ? prev_cpu : this_cpu;
> -
>
> + if (available_idle_cpu(this_cpu))
> + if (cpus_share_cache(this_cpu, prev_cpu))
> + return available_idle_cpu(prev_cpu) ? prev_cpu :
> this_cpu;
> + else
> + return this_cpu;
>
That will also pull tasks cross-node and while it might work well for a
network stress test, it will hurt other cases where the interrupt data
is relatively unimportant to the waking task.
--
Mel Gorman
SUSE Labs
next prev parent reply other threads:[~2022-07-15 10:10 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-11 22:47 [PATCH] sched/fair: no sync wakeup from interrupt context Libo Chen
2022-07-13 16:40 ` Tim Chen
[not found] ` <0917f479-b6aa-19de-3d6a-6fd422df4d21@oracle.com>
2022-07-13 19:34 ` Libo Chen
2022-07-13 20:51 ` Tim Chen
2022-07-13 21:37 ` Libo Chen
2022-07-14 14:18 ` Mel Gorman
2022-07-14 20:21 ` Libo Chen
2022-07-15 10:07 ` Mel Gorman [this message]
2022-07-14 11:26 ` Peter Zijlstra
2022-07-14 11:35 ` Peter Zijlstra
2022-07-14 18:18 ` Libo Chen
2022-07-21 8:44 ` [tip: sched/core] sched/fair: Disallow " tip-bot2 for Libo Chen
2022-07-29 4:47 ` [PATCH] sched/fair: no " K Prateek Nayak
2022-08-01 13:26 ` Ingo Molnar
2022-08-01 14:59 ` Libo Chen
2022-08-03 9:18 ` Ingo Molnar
2022-08-03 19:37 ` Libo Chen
2022-08-04 8:55 ` Ingo Molnar
2022-08-04 9:51 ` Mel Gorman
2022-08-01 14:57 ` Libo Chen
2022-08-02 4:40 ` K Prateek Nayak
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=20220715100738.GD3493@suse.de \
--to=mgorman@suse.de \
--cc=21cnbao@gmail.com \
--cc=dietmar.eggemann@arm.com \
--cc=konrad.wilk@oracle.com \
--cc=libo.chen@oracle.com \
--cc=linux-kernel@vger.kernel.org \
--cc=peterz@infradead.org \
--cc=tglx@linutronix.de \
--cc=tim.c.chen@linux.intel.com \
--cc=vincent.guittot@linaro.org \
/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