[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20170317114732.GF26298@dhcp22.suse.cz>
Date: Fri, 17 Mar 2017 12:47:33 +0100
From: Michal Hocko <mhocko@...nel.org>
To: "Huang, Ying" <ying.huang@...el.com>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
Andi Kleen <ak@...ux.intel.com>,
Dave Hansen <dave.hansen@...ux.intel.com>,
Shaohua Li <shli@...nel.org>, Rik van Riel <riel@...hat.com>,
Johannes Weiner <hannes@...xchg.org>,
Tim Chen <tim.c.chen@...ux.intel.com>,
Mel Gorman <mgorman@...hsingularity.net>,
"Kirill A. Shutemov" <kirill.shutemov@...ux.intel.com>,
Jérôme Glisse <jglisse@...hat.com>,
Aaron Lu <aaron.lu@...el.com>, Hugh Dickins <hughd@...gle.com>,
Minchan Kim <minchan@...nel.org>,
Ingo Molnar <mingo@...nel.org>,
Vegard Nossum <vegard.nossum@...cle.com>,
linux-kernel@...r.kernel.org, linux-mm@...ck.org
Subject: Re: [PATCH 4/5] mm, swap: Try kzalloc before vzalloc
On Fri 17-03-17 14:46:22, Huang, Ying wrote:
> +void *swap_kvzalloc(size_t size)
> +{
> + void *p;
> +
> + p = kzalloc(size, GFP_KERNEL | __GFP_NOWARN);
> + if (!p)
> + p = vzalloc(size);
> +
> + return p;
> +}
please do not invent your own kvmalloc implementation when we already
have on in mmotm tree.
--
Michal Hocko
SUSE Labs
Powered by blists - more mailing lists