From: "tip-bot2 for Juergen Gross" <tip-bot2@linutronix.de>
To: linux-tip-commits@vger.kernel.org
Cc: Juergen Gross <jgross@suse.com>, Ingo Molnar <mingo@kernel.org>,
x86@kernel.org, linux-kernel@vger.kernel.org
Subject: [tip: locking/core] locking/csd_lock: Prepare more CSD lock debugging
Date: Mon, 01 Mar 2021 14:09:16 -0000 [thread overview]
Message-ID: <161460775627.20312.7773924056141701835.tip-bot2@tip-bot2> (raw)
In-Reply-To: <20210301101336.7797-3-jgross@suse.com>
The following commit has been merged into the locking/core branch of tip:
Commit-ID: b3e3bc34b1e938c6447fa8b646010c4016be7fad
Gitweb: https://git.kernel.org/tip/b3e3bc34b1e938c6447fa8b646010c4016be7fad
Author: Juergen Gross <jgross@suse.com>
AuthorDate: Mon, 01 Mar 2021 11:13:35 +01:00
Committer: Ingo Molnar <mingo@kernel.org>
CommitterDate: Mon, 01 Mar 2021 14:27:58 +01:00
locking/csd_lock: Prepare more CSD lock debugging
In order to be able to easily add more CSD lock debugging data to
struct call_function_data->csd move the call_single_data_t element
into a sub-structure.
Signed-off-by: Juergen Gross <jgross@suse.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Link: https://lore.kernel.org/r/20210301101336.7797-3-jgross@suse.com
---
kernel/smp.c | 16 ++++++++++------
1 file changed, 10 insertions(+), 6 deletions(-)
diff --git a/kernel/smp.c b/kernel/smp.c
index d5f0b21..6d7e6db 100644
--- a/kernel/smp.c
+++ b/kernel/smp.c
@@ -31,8 +31,12 @@
#define CSD_TYPE(_csd) ((_csd)->node.u_flags & CSD_FLAG_TYPE_MASK)
+struct cfd_percpu {
+ call_single_data_t csd;
+};
+
struct call_function_data {
- call_single_data_t __percpu *csd;
+ struct cfd_percpu __percpu *pcpu;
cpumask_var_t cpumask;
cpumask_var_t cpumask_ipi;
};
@@ -55,8 +59,8 @@ int smpcfd_prepare_cpu(unsigned int cpu)
free_cpumask_var(cfd->cpumask);
return -ENOMEM;
}
- cfd->csd = alloc_percpu(call_single_data_t);
- if (!cfd->csd) {
+ cfd->pcpu = alloc_percpu(struct cfd_percpu);
+ if (!cfd->pcpu) {
free_cpumask_var(cfd->cpumask);
free_cpumask_var(cfd->cpumask_ipi);
return -ENOMEM;
@@ -71,7 +75,7 @@ int smpcfd_dead_cpu(unsigned int cpu)
free_cpumask_var(cfd->cpumask);
free_cpumask_var(cfd->cpumask_ipi);
- free_percpu(cfd->csd);
+ free_percpu(cfd->pcpu);
return 0;
}
@@ -694,7 +698,7 @@ static void smp_call_function_many_cond(const struct cpumask *mask,
cpumask_clear(cfd->cpumask_ipi);
for_each_cpu(cpu, cfd->cpumask) {
- call_single_data_t *csd = per_cpu_ptr(cfd->csd, cpu);
+ call_single_data_t *csd = &per_cpu_ptr(cfd->pcpu, cpu)->csd;
if (cond_func && !cond_func(cpu, info))
continue;
@@ -719,7 +723,7 @@ static void smp_call_function_many_cond(const struct cpumask *mask,
for_each_cpu(cpu, cfd->cpumask) {
call_single_data_t *csd;
- csd = per_cpu_ptr(cfd->csd, cpu);
+ csd = &per_cpu_ptr(cfd->pcpu, cpu)->csd;
csd_lock_wait(csd);
}
}
next prev parent reply other threads:[~2021-03-01 14:12 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-01 10:13 [PATCH v2 0/3] kernel/smp.c: add more CSD lock debugging Juergen Gross
2021-03-01 10:13 ` [PATCH v2 1/3] kernel/smp: add boot parameter for controlling " Juergen Gross
2021-03-01 14:09 ` [tip: locking/core] locking/csd_lock: Add " tip-bot2 for Juergen Gross
2021-03-06 11:54 ` tip-bot2 for Juergen Gross
2021-03-01 10:13 ` [PATCH v2 2/3] kernel/smp: prepare more " Juergen Gross
2021-03-01 14:09 ` tip-bot2 for Juergen Gross [this message]
2021-03-06 11:54 ` [tip: locking/core] locking/csd_lock: Prepare " tip-bot2 for Juergen Gross
2021-03-01 10:13 ` [PATCH v2 3/3] kernel/smp: add more data to " Juergen Gross
2021-03-01 14:09 ` [tip: locking/core] locking/csd_lock: Add " tip-bot2 for Juergen Gross
2021-03-01 17:07 ` [PATCH v2 3/3] kernel/smp: add " Peter Zijlstra
2021-03-01 19:16 ` Jürgen Groß
2021-03-01 20:44 ` Peter Zijlstra
2021-03-02 7:05 ` Ingo Molnar
2021-03-02 7:14 ` Ingo Molnar
2021-03-02 5:57 ` Jürgen Groß
2021-03-06 11:54 ` [tip: locking/core] locking/csd_lock: Add " tip-bot2 for Juergen Gross
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=161460775627.20312.7773924056141701835.tip-bot2@tip-bot2 \
--to=tip-bot2@linutronix.de \
--cc=jgross@suse.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=x86@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;
as well as URLs for NNTP newsgroup(s).