linux-rt-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: He Zhe <zhe.he@windriver.com>
To: Sebastian Andrzej Siewior <bigeasy@linutronix.de>,
	Peter Zijlstra <peterz@infradead.org>
Cc: <acme@kernel.org>, <ak@linux.intel.com>,
	<alexander.shishkin@linux.intel.com>, <bp@alien8.de>,
	<hpa@zytor.com>, <jolsa@kernel.org>, <jolsa@redhat.com>,
	<kan.liang@linux.intel.com>, <mingo@redhat.com>,
	<namhyung@kernel.org>, <tglx@linutronix.de>, <x86@kernel.org>,
	<linux-kernel@vger.kernel.org>, <linux-rt-users@vger.kernel.org>
Subject: Re: [PATCH] perf/x86/intel: Avoid unnecessary reallocations of memory allocated in cpu hotplug prepare state
Date: Tue, 18 Dec 2018 20:45:32 +0800	[thread overview]
Message-ID: <b8f1f75c-bb8e-3b07-b113-32d1ff70fd3e@windriver.com> (raw)
In-Reply-To: <20181218114708.p6fpz447brob4kzz@linutronix.de>



On 2018/12/18 19:47, Sebastian Andrzej Siewior wrote:
> On 2018-12-18 12:37:00 [+0100], Peter Zijlstra wrote:
>> On Tue, Dec 18, 2018 at 12:31:19PM +0100, Peter Zijlstra wrote:
>>> On Tue, Dec 18, 2018 at 12:16:37PM +0100, Sebastian Andrzej Siewior wrote:
>>>> On 2018-12-18 12:02:09 [+0100], Peter Zijlstra wrote:
>>>>> On Tue, Dec 18, 2018 at 06:30:33PM +0800, zhe.he@windriver.com wrote:
>>>>>> Besides, in preempt-rt full mode, the freeing can happen in atomic context and
>>>>>> thus cause the following BUG.
>>>>> Hurm, I though we fixed all those long ago..
>>>>>
>>>>> And no, the patch is horrible; that's what we have things like
>>>>> x86_pmu::cpu_dead() for.
>>>> ehm, you say we keep memory allocation +free on CPU up/down?
>>> Sure, why not?
> It does not seem to be useful to allocate & free memory which you need
> anyway. So you could avoid the refcnt for instance.
> Also I doubt the memory will remain unallocated for a longer period of
> time (like you would remove the CPU for good and not boot it again a
> minute later).
> *Maybe* it is different in cloud environment where you attach vcpus
> depending on guest load at runtime but still…
>
>> I suspect the below is all we really need.
> Zhe, could you please have a look?

This works in my environment, taking CPUs offline and online many times.

Zhe

>
> Sebastian
>

  parent reply	other threads:[~2018-12-18 12:45 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-18 10:30 [PATCH] perf/x86/intel: Avoid unnecessary reallocations of memory allocated in cpu hotplug prepare state zhe.he
2018-12-18 11:02 ` Peter Zijlstra
2018-12-18 11:16   ` Sebastian Andrzej Siewior
2018-12-18 11:31     ` Peter Zijlstra
2018-12-18 11:37       ` Peter Zijlstra
2018-12-18 11:47         ` Sebastian Andrzej Siewior
2018-12-18 12:34           ` Peter Zijlstra
2018-12-18 12:45           ` He Zhe [this message]
2018-12-18 13:59             ` Sebastian Andrzej Siewior
2018-12-19 16:53         ` [PATCH] perf/x86/intel: Delay memory deallocation until x86_pmu_dead_cpu() Sebastian Andrzej Siewior
2018-12-18 11:25   ` [PATCH] perf/x86/intel: Avoid unnecessary reallocations of memory allocated in cpu hotplug prepare state Thomas Gleixner
2018-12-18 11:38     ` Peter Zijlstra
2018-12-18 11:14 ` Sebastian Andrzej Siewior

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=b8f1f75c-bb8e-3b07-b113-32d1ff70fd3e@windriver.com \
    --to=zhe.he@windriver.com \
    --cc=acme@kernel.org \
    --cc=ak@linux.intel.com \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=bigeasy@linutronix.de \
    --cc=bp@alien8.de \
    --cc=hpa@zytor.com \
    --cc=jolsa@kernel.org \
    --cc=jolsa@redhat.com \
    --cc=kan.liang@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rt-users@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=namhyung@kernel.org \
    --cc=peterz@infradead.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;
as well as URLs for NNTP newsgroup(s).