Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1603237
| From | Michal Hocko <mhocko@kernel.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 4/5] mm, swap: Try kzalloc before vzalloc |
| Date | 2017-03-17 12:50 +0100 |
| Message-ID | <tlYym-5OT-21@gated-at.bofh.it> (permalink) |
| References | <tlTS1-20n-9@gated-at.bofh.it> <tlU1H-25C-9@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
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
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 1/5] mm, swap: Fix comment in __read_swap_cache_async "Huang, Ying" <ying.huang@intel.com> - 2017-03-17 07:50 +0100
[PATCH 3/5] mm, swap: Avoid lock swap_avail_lock when held cluster lock "Huang, Ying" <ying.huang@intel.com> - 2017-03-17 08:00 +0100
[PATCH 4/5] mm, swap: Try kzalloc before vzalloc "Huang, Ying" <ying.huang@intel.com> - 2017-03-17 08:00 +0100
Re: [PATCH 4/5] mm, swap: Try kzalloc before vzalloc David Rientjes <rientjes@google.com> - 2017-03-17 10:00 +0100
Re: [PATCH 4/5] mm, swap: Try kzalloc before vzalloc Michal Hocko <mhocko@kernel.org> - 2017-03-17 12:50 +0100
[PATCH 5/5] mm, swap: Sort swap entries before free "Huang, Ying" <ying.huang@intel.com> - 2017-03-17 08:00 +0100
Re: [PATCH 1/5] mm, swap: Fix comment in __read_swap_cache_async Rafael Aquini <aquini@redhat.com> - 2017-03-17 13:50 +0100
Re: [PATCH 1/5] mm, swap: Fix comment in __read_swap_cache_async "Huang\, Ying" <ying.huang@intel.com> - 2017-03-20 03:10 +0100
csiph-web