From: Ingo Molnar <mingo@kernel.org>
To: Maksim Davydov <davydov-max@yandex-team.ru>
Cc: x86@kernel.org, linux-kernel@vger.kernel.org,
den-plotnikov@yandex-team.ru, gpiccoli@igalia.com,
mingo@redhat.com, bp@alien8.de, dave.hansen@linux.intel.com,
tglx@linutronix.de, hpa@zytor.com
Subject: Re: [PATCH] x86/split_lock: simplify reenabling
Date: Tue, 25 Mar 2025 10:25:34 +0100 [thread overview]
Message-ID: <Z-J2jnHK6_ltAdfR@gmail.com> (raw)
In-Reply-To: <20250325085807.171885-1-davydov-max@yandex-team.ru>
* Maksim Davydov <davydov-max@yandex-team.ru> wrote:
> sld_setup() is called before setup_per_cpu_areas(), thus it can't be
> used for this purpose. Another way is to implement independent
> initcall for the initialization, that's what has been done.
> + * Per-CPU delayed_work can't be statically initialized properly because
> + * the struct address is unknown. Thus per-CPU delayed_work structures
> + * have to be initialized during kernel initialization and after calling
> + * setup_per_cpu_areas().
> + */
> +static int __init setup_split_lock_delayed_work(void)
> +{
> + unsigned int cpu;
> +
> + for_each_possible_cpu(cpu) {
> + struct delayed_work *work = per_cpu_ptr(&sl_reenable, cpu);
> +
> + INIT_DELAYED_WORK(work, __split_lock_reenable);
> + }
> +
> + return 0;
> +}
> +pure_initcall(setup_split_lock_delayed_work);
Oh, I didn't realize sld_setup() couldn't be used for this - thx for
the followup!
Ingo
next prev parent reply other threads:[~2025-03-25 9:25 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-25 8:58 Maksim Davydov
2025-03-25 9:25 ` Ingo Molnar [this message]
2025-03-25 11:34 ` Maksim Davydov
2025-03-25 9:35 ` [tip: locking/urgent] x86/split_lock: Simplify reenabling tip-bot2 for Maksim Davydov
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=Z-J2jnHK6_ltAdfR@gmail.com \
--to=mingo@kernel.org \
--cc=bp@alien8.de \
--cc=dave.hansen@linux.intel.com \
--cc=davydov-max@yandex-team.ru \
--cc=den-plotnikov@yandex-team.ru \
--cc=gpiccoli@igalia.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=tglx@linutronix.de \
--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
all inboxes | Powered by JetHome®