Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1655958

Re: [PATCH 1/9] mm: introduce kv[mz]alloc helpers

From "Levin, Alexander (Sasha Levin)" <alexander.levin@verizon.com>
Newsgroups linux.kernel
Subject Re: [PATCH 1/9] mm: introduce kv[mz]alloc helpers
Date 2017-06-02 09:20 +0200
Message-ID <tNP2j-6d4-33@gated-at.bofh.it> (permalink)
References <thYdA-6Qv-15@gated-at.bofh.it> <thYdB-6Qv-43@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Mon, Mar 06, 2017 at 11:30:24AM +0100, Michal Hocko wrote:
> +void *kvmalloc_node(size_t size, gfp_t flags, int node)
> +{
> +	gfp_t kmalloc_flags = flags;
> +	void *ret;
> +
> +	/*
> +	 * vmalloc uses GFP_KERNEL for some internal allocations (e.g page tables)
> +	 * so the given set of flags has to be compatible.
> +	 */
> +	WARN_ON_ONCE((flags & GFP_KERNEL) != GFP_KERNEL);

Hm, there are quite a few locations in the kernel that do something like:

	__vmalloc(len, GFP_NOFS, PAGE_KERNEL);

According to your patch, vmalloc can't really do GFP_NOFS, right?

-- 

Thanks,
Sasha

Back to linux.kernel | Previous | NextNext in thread | Find similar | Unroll thread


Thread

Re: [PATCH 1/9] mm: introduce kv[mz]alloc helpers "Levin, Alexander (Sasha Levin)" <alexander.levin@verizon.com> - 2017-06-02 09:20 +0200
  Re: [PATCH 1/9] mm: introduce kv[mz]alloc helpers Michal Hocko <mhocko@kernel.org> - 2017-06-02 09:30 +0200
    Re: [PATCH 1/9] mm: introduce kv[mz]alloc helpers "Levin, Alexander (Sasha Levin)" <alexander.levin@verizon.com> - 2017-06-02 09:50 +0200
      Re: [PATCH 1/9] mm: introduce kv[mz]alloc helpers Michal Hocko <mhocko@kernel.org> - 2017-06-02 10:00 +0200

csiph-web