public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: zhouchengming <zhouchengming1@huawei.com>
To: Borislav Petkov <bp@suse.de>
Cc: <mingo@redhat.com>, <tglx@linutronix.de>, <peterz@infradead.org>,
	<hpa@zytor.com>, <jkosina@suse.cz>, <rostedt@goodmis.org>,
	<mjurczyk@google.com>, <x86@kernel.org>,
	<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] x86/alternatives: free smp_alt_modules when enable smp
Date: Fri, 27 Oct 2017 16:11:17 +0800	[thread overview]
Message-ID: <59F2EA25.1080903@huawei.com> (raw)
In-Reply-To: <20171027074912.GB1305@nazgul.tnic>

On 2017/10/27 15:49, Borislav Petkov wrote:
> On Fri, Oct 27, 2017 at 03:18:12PM +0800, Zhou Chengming wrote:
>> In the current code, we don't free smp_alt_modules when enable smp,
>> so have to wait module unload to call alternatives_smp_module_del()
>> to free its smp_alt_module. This strategy has shortcomings.
> I love it when the commit message states there is allegedly some problem
> but it doesn't explain what that problem is.

Well, I should explain it although it's small shortcomings. First, maybe
some modules don't unload after smp enabled, so these smp_alt_modules won't
be freed even they are useless anymore. Second, every module has to call
alternatives_smp_module_del() when unload to see if it's in the list even
after smp enabled, it's complete useless work. So why not take the quick
way like we do in alternatives_smp_module_add() ?

Thanks.

> > From the looks of the patch, though, I'd prefer what we do now and not
> touch the code.
>

  reply	other threads:[~2017-10-27  8:11 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-27  7:18 [PATCH] x86/alternatives: free smp_alt_modules when enable smp Zhou Chengming
2017-10-27  7:49 ` Borislav Petkov
2017-10-27  8:11   ` zhouchengming [this message]
2017-10-27  8:27     ` Borislav Petkov

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=59F2EA25.1080903@huawei.com \
    --to=zhouchengming1@huawei.com \
    --cc=bp@suse.de \
    --cc=hpa@zytor.com \
    --cc=jkosina@suse.cz \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=mjurczyk@google.com \
    --cc=peterz@infradead.org \
    --cc=rostedt@goodmis.org \
    --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