[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20240630075103.GB11898@redhat.com>
Date: Sun, 30 Jun 2024 09:51:04 +0200
From: Oleg Nesterov <oleg@...hat.com>
To: Wei Yang <richard.weiyang@...il.com>
Cc: akpm@...ux-foundation.org, brauner@...nel.org, mjguzik@...il.com,
tandersen@...flix.com, linux-kernel@...r.kernel.org,
Mike Rapoport <rppt@...nel.org>,
David Hildenbrand <david@...hat.com>
Subject: Re: [PATCH] kernel/fork.c: get totalram_pages from memblock to
calculate max_threads
On 06/30, Wei Yang wrote:
>
> static void set_max_threads(unsigned int max_threads_suggested)
> {
> u64 threads;
> - unsigned long nr_pages = totalram_pages();
> + unsigned long nr_pages = PHYS_PFN(memblock_phys_mem_size() - memblock_reserved_size());
Can't comment, I don't understand this patch.
but if you change set_max_threads, perhaps you can mark it as __init
for consistency?
Oleg.
Powered by blists - more mailing lists