From: Peter Zijlstra <peterz@infradead.org>
To: Luigi Rizzo <lrizzo@google.com>
Cc: linux-kernel@vger.kernel.org, axboe@kernel.dk, paulmck@kernel.org
Subject: Re: [PATCH] smp: add a best_effort version of smp_call_function_many()
Date: Mon, 19 Apr 2021 21:17:12 +0200 [thread overview]
Message-ID: <20210419191712.GB26214@worktop.programming.kicks-ass.net> (raw)
In-Reply-To: <20210419184455.2987243-1-lrizzo@google.com>
On Mon, Apr 19, 2021 at 11:44:55AM -0700, Luigi Rizzo wrote:
> Regardless of the 'wait' argument, smp_call_function_many() must spin
> if any of the target CPUs have their csd busy waiting to be processed
> for a previous call. This may cause high tail latencies e.g. when some
> of the target CPUs are running functions that disable interrupts for a
> long time; getrusage() is one possible culprit.
>
> Here we introduce a variant, __smp_call_function_many(), that adds
> a third 'best_effort' mode to the two existing ones (nowait, wait).
> In best effort mode, the call will skip CPUs whose csd is busy, and if
> any CPU is skipped it returns -EBUSY and the set of busy in the mask.
> This allows the caller to decide how to proceed, e.g. it might retry at
> a later time, or use a private csd, etc..
>
> The new function is a compromise to avoid touching existing callers of
> smp_call_function_many(). If the feature is considered interesting, we
> could even replace the 'wait' argument with a ternary 'mode' in all
> smp_call_function_*() and derived methods.
I don't see a user of this...
next prev parent reply other threads:[~2021-04-19 19:18 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-19 18:44 Luigi Rizzo
2021-04-19 18:52 ` Randy Dunlap
2021-04-19 19:17 ` Peter Zijlstra [this message]
2021-04-19 21:07 ` Luigi Rizzo
2021-04-20 9:13 ` Peter Zijlstra
2021-04-20 10:41 ` Luigi Rizzo
2021-04-20 13:31 ` Peter Zijlstra
2021-04-20 14:40 ` Luigi Rizzo
2021-04-19 22:22 ` kernel test robot
2021-04-20 1:38 ` kernel test robot
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=20210419191712.GB26214@worktop.programming.kicks-ass.net \
--to=peterz@infradead.org \
--cc=axboe@kernel.dk \
--cc=linux-kernel@vger.kernel.org \
--cc=lrizzo@google.com \
--cc=paulmck@kernel.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
all inboxes | Powered by JetHome®