[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <90a8e819-988a-4f16-831c-71a0f4631e96@I-love.SAKURA.ne.jp>
Date: Mon, 29 Jul 2024 21:58:30 +0900
From: Tetsuo Handa <penguin-kernel@...ove.SAKURA.ne.jp>
To: Andrew Morton <akpm@...ux-foundation.org>
Cc: Anna-Maria Gleixner <anna-maria@...utronix.de>,
Arnd Bergmann <arnd@...db.de>,
Mel Gorman <mgorman@...hsingularity.net>,
Michal Hocko <mhocko@...e.com>, Peter Zijlstra <peterz@...radead.org>,
Thomas Gleixner <tglx@...utronix.de>, Vlastimil Babka <vbabka@...e.cz>,
Ingo Molnar <mingo@...nel.org>, LKML <linux-kernel@...r.kernel.org>,
Linus Torvalds <torvalds@...ux-foundation.org>
Subject: Re: [PATCH] profiling: remove prof_cpu_mask
On 2024/07/28 1:54, Linus Torvalds wrote:
> On Sat, 27 Jul 2024 at 04:00, Tetsuo Handa
> <penguin-kernel@...ove.sakura.ne.jp> wrote:
>>
>> We could replace alloc_cpumask_var() with zalloc_cpumask_var() and
>> call cpumask_copy() from create_proc_profile() on only UP kernels, for
>> profile_online_cpu() calls cpumask_set_cpu() as needed via
>> cpuhp_setup_state(CPUHP_AP_ONLINE_DYN) on SMP kernels. But this patch
>> removes prof_cpu_mask because it seems unnecessary.
>
> So I like this one a lot more, but it actually makes me wonder: could
> we just remove the horrid per-cpu profile flip buffers entirely?
I dropped "profiling: initialize prof_cpu_mask from profile_online_cpu()" from
my tree so that someone can take this patch. Andrew, can you take this patch?
Whether somebody notices performance/accuracy problem by removing the horrid
per-cpu profile flip buffers will be attempted by a separate patch.
>
> This code predates the whole "we have _real_ profiling", and dates
> back to literally two decades ago.
>
> It's there due to ancient NUMA concerns on old SGI Altix hardware in 2004:
>
> https://git.kernel.org/pub/scm/linux/kernel/git/tglx/history.git/commit/?id=ad02973d42f6b538c7ed76c7c0a5ae8560f65913
>
> and I think it's past time to just take all this code out of its misery.
>
> Nobody sane should use the old profile code for any real work any
> more. I'd be more than happy to just remove all the magic code and see
> if anybody even notices..
>
> Linus
Powered by blists - more mailing lists