From: Michal Hocko <mhocko@suse.com>
To: "Uladzislau Rezki (Sony)" <urezki@gmail.com>
Cc: LKML <linux-kernel@vger.kernel.org>,
Andrew Morton <akpm@linux-foundation.org>,
Christian Brauner <brauner@kernel.org>,
Oleg Nesterov <oleg@redhat.com>, Tejun Heo <tj@kernel.org>,
Oleksiy Avramchenko <oleksiy.avramchenko@sony.com>
Subject: Re: [PATCH] fork: Use __vmalloc_node() for stack allocation
Date: Tue, 18 Mar 2025 09:23:30 +0100 [thread overview]
Message-ID: <Z9ktgl8kVHGQ4FLH@tiehlicka> (raw)
In-Reply-To: <20250317163614.166502-1-urezki@gmail.com>
On Mon 17-03-25 17:36:14, Uladzislau Rezki wrote:
> Replace __vmalloc_node_range() by the __vmalloc_node() function.
> The last variant requires less parameters and it uses exactly the
> same arguments which are partly now hidden inside __vmalloc_node()
> function.
>
> This change does not change any functionality. It makes the code
> a bit simpler.
>
> Signed-off-by: Uladzislau Rezki (Sony) <urezki@gmail.com>
Acked-by: Michal Hocko <mhocko@suse.com>
> ---
> kernel/fork.c | 6 ++----
> 1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/kernel/fork.c b/kernel/fork.c
> index 2fa2a3582925..72d9e7c7639e 100644
> --- a/kernel/fork.c
> +++ b/kernel/fork.c
> @@ -311,11 +311,9 @@ static int alloc_thread_stack_node(struct task_struct *tsk, int node)
> * so memcg accounting is performed manually on assigning/releasing
> * stacks to tasks. Drop __GFP_ACCOUNT.
> */
> - stack = __vmalloc_node_range(THREAD_SIZE, THREAD_ALIGN,
> - VMALLOC_START, VMALLOC_END,
> + stack = __vmalloc_node(THREAD_SIZE, THREAD_ALIGN,
> THREADINFO_GFP & ~__GFP_ACCOUNT,
> - PAGE_KERNEL,
> - 0, node, __builtin_return_address(0));
> + node, __builtin_return_address(0));
> if (!stack)
> return -ENOMEM;
>
> --
> 2.39.5
>
--
Michal Hocko
SUSE Labs
prev parent reply other threads:[~2025-03-18 8:23 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-17 16:36 [PATCH] fork: Use __vmalloc_node() for stack allocation Uladzislau Rezki (Sony)
2025-03-18 8:23 ` Michal Hocko [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=Z9ktgl8kVHGQ4FLH@tiehlicka \
--to=mhocko@suse.com \
--cc=akpm@linux-foundation.org \
--cc=brauner@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=oleg@redhat.com \
--cc=oleksiy.avramchenko@sony.com \
--cc=tj@kernel.org \
--cc=urezki@gmail.com \
/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