linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@linutronix.de>
To: Ingo Molnar <mingo@kernel.org>, "Zhang\,
	Qiang" <Qiang.Zhang@windriver.com>
Cc: "longman\@redhat.com" <longman@redhat.com>,
	"elver\@google.com" <elver@google.com>,
	"linux-kernel\@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: 回复: [PATCH v2] debugobjects: install cpu hotplug callback
Date: Fri, 04 Sep 2020 12:26:07 +0200	[thread overview]
Message-ID: <87k0x94z40.fsf@nanos.tec.linutronix.de> (raw)
In-Reply-To: <20200904055040.GA2765622@gmail.com>

On Fri, Sep 04 2020 at 07:50, Ingo Molnar wrote:
>> +#if defined(CONFIG_HOTPLUG_CPU)
>> +static int object_cpu_offline(unsigned int cpu)
>> +{
>> +       struct debug_percpu_free *percpu_pool;
>> +       struct hlist_node *tmp;
>> +       struct debug_obj *obj;
>> +
>> +       percpu_pool = per_cpu_ptr(&percpu_obj_pool, cpu);
>> +       hlist_for_each_entry_safe(obj, tmp, &percpu_pool->free_objs, node) {
>> +               hlist_del(&obj->node);
>> +               kmem_cache_free(obj_cache, obj);
>> +       }
>> +
>> +       return 0;
>> +}
>> +#endif
>
> What happens to ->obj_free, if the CPU is brought back online? Won't it be 
> out of sync at that point?

Yes and it's going to do the completely wrong thing.

Thanks,

        tglx

      reply	other threads:[~2020-09-04 10:26 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-27  5:06 [PATCH v2] debugobjects: install cpu hotplug callback qiang.zhang
2020-09-04  1:48 ` 回复: " Zhang, Qiang
2020-09-04  5:50   ` Ingo Molnar
2020-09-04 10:26     ` Thomas Gleixner [this message]

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=87k0x94z40.fsf@nanos.tec.linutronix.de \
    --to=tglx@linutronix.de \
    --cc=Qiang.Zhang@windriver.com \
    --cc=elver@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=longman@redhat.com \
    --cc=mingo@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).