[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200408112329.GW20713@hirez.programming.kicks-ass.net>
Date: Wed, 8 Apr 2020 13:23:29 +0200
From: Peter Zijlstra <peterz@...radead.org>
To: Ankur Arora <ankur.a.arora@...cle.com>
Cc: linux-kernel@...r.kernel.org, x86@...nel.org, hpa@...or.com,
jpoimboe@...hat.com, namit@...are.com, mhiramat@...nel.org,
jgross@...e.com, bp@...en8.de, vkuznets@...hat.com,
pbonzini@...hat.com, boris.ostrovsky@...cle.com,
mihai.carabas@...cle.com, kvm@...r.kernel.org,
xen-devel@...ts.xenproject.org,
virtualization@...ts.linux-foundation.org
Subject: Re: [RFC PATCH 15/26] x86/alternatives: Non-emulated text poking
On Tue, Apr 07, 2020 at 10:03:12PM -0700, Ankur Arora wrote:
> +static int __maybe_unused text_poke_late(patch_worker_t worker, void *stage)
> +{
> + int ret;
> +
> + lockdep_assert_held(&text_mutex);
> +
> + if (system_state != SYSTEM_RUNNING)
> + return -EINVAL;
> +
> + text_poke_state.stage = stage;
> + text_poke_state.num_acks = cpumask_weight(cpu_online_mask);
> + text_poke_state.head = &alt_modules;
> +
> + text_poke_state.patch_worker = worker;
> + text_poke_state.state = PATCH_SYNC_DONE; /* Start state */
> + text_poke_state.primary_cpu = smp_processor_id();
> +
> + /*
> + * Run the worker on all online CPUs. Don't need to do anything
> + * for offline CPUs as they come back online with a clean cache.
> + */
> + ret = stop_machine(patch_worker, &text_poke_state, cpu_online_mask);
This.. that on its own is almost a reason to NAK the entire thing. We're
all working very hard to get rid of stop_machine() and you're adding
one.
Worse, stop_machine() is notoriously crap on over-committed virt, the
exact scenario where you want it.
> +
> + return ret;
> +}
Powered by blists - more mailing lists