Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1603119
| From | David Rientjes <rientjes@google.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 4/5] mm, swap: Try kzalloc before vzalloc |
| Date | 2017-03-17 10:00 +0100 |
| Message-ID | <tlVTP-3K4-7@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 Mar 2017, Huang, Ying wrote: > From: Huang Ying <ying.huang@intel.com> > > Now vzalloc() is used in swap code to allocate various data > structures, such as swap cache, swap slots cache, cluster info, etc. > Because the size may be too large on some system, so that normal > kzalloc() may fail. But using kzalloc() has some advantages, for > example, less memory fragmentation, less TLB pressure, etc. So change > the data structure allocation in swap code to try to use kzalloc() > firstly, and fallback to vzalloc() if kzalloc() failed. > I'm concerned about preferring kzalloc() with __GFP_RECLAIM since the page allocator will try to do memory compaction for high-order allocations when the vzalloc() would have succeeded immediately. Do we necessarily want to spend time doing memory compaction and direct reclaim for contiguous memory if it's not needed?
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