Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1608404
| From | Dave Hansen <dave.hansen@linux.intel.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH -v2 1/2] mm, swap: Use kvzalloc to allocate some swap data structure |
| Date | 2017-03-24 15:00 +0100 |
| Message-ID | <toxV0-2ms-3@gated-at.bofh.it> (permalink) |
| References | (3 earlier) <top1o-4qf-5@gated-at.bofh.it> <topup-4DO-1@gated-at.bofh.it> <torcR-5YR-9@gated-at.bofh.it> <torFU-6sZ-19@gated-at.bofh.it> <torZg-6BK-29@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On 03/24/2017 12:33 AM, John Hubbard wrote: > There might be some additional information you are using to come up with > that conclusion, that is not obvious to me. Any thoughts there? These > calls use the same underlying page allocator (and I thought that both > were subject to the same constraints on defragmentation, as a result of > that). So I am not seeing any way that kmalloc could possibly be a > less-fragmenting call than vmalloc. You guys are having quite a discussion over a very small point. But, Ying is right. Let's say we have a two-page data structure. vmalloc() takes two effectively random order-0 pages, probably from two different 2M pages and pins them. That "kills" two 2M pages. kmalloc(), allocating two *contiguous* pages, is very unlikely to cross a 2M boundary (it theoretically could). That means it will only "kill" the possibility of a single 2M page. More 2M pages == less fragmentation.
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH -v2 1/2] mm, swap: Use kvzalloc to allocate some swap data structure "Huang, Ying" <ying.huang@intel.com> - 2017-03-20 10:00 +0100
[PATCH -v2 2/2] mm, swap: Sort swap entries before free "Huang, Ying" <ying.huang@intel.com> - 2017-03-20 10:00 +0100
Re: [PATCH -v2 1/2] mm, swap: Use kvzalloc to allocate some swap data structure David Rientjes <rientjes@google.com> - 2017-03-20 22:40 +0100
Re: [PATCH -v2 1/2] mm, swap: Use kvzalloc to allocate some swap data structure "Huang\, Ying" <ying.huang@intel.com> - 2017-03-24 03:50 +0100
Re: [PATCH -v2 1/2] mm, swap: Use kvzalloc to allocate some swap data structure John Hubbard <jhubbard@nvidia.com> - 2017-03-24 05:30 +0100
Re: [PATCH -v2 1/2] mm, swap: Use kvzalloc to allocate some swap data structure "Huang\, Ying" <ying.huang@intel.com> - 2017-03-24 06:00 +0100
Re: [PATCH -v2 1/2] mm, swap: Use kvzalloc to allocate some swap data structure John Hubbard <jhubbard@nvidia.com> - 2017-03-24 07:50 +0100
Re: [PATCH -v2 1/2] mm, swap: Use kvzalloc to allocate some swap data structure "Huang\, Ying" <ying.huang@intel.com> - 2017-03-24 08:20 +0100
Re: [PATCH -v2 1/2] mm, swap: Use kvzalloc to allocate some swap data structure John Hubbard <jhubbard@nvidia.com> - 2017-03-24 08:40 +0100
Re: [PATCH -v2 1/2] mm, swap: Use kvzalloc to allocate some swap data structure Dave Hansen <dave.hansen@linux.intel.com> - 2017-03-24 15:00 +0100
Re: [PATCH -v2 1/2] mm, swap: Use kvzalloc to allocate some swap data structure Tim Chen <tim.c.chen@linux.intel.com> - 2017-03-24 18:00 +0100
Re: [PATCH -v2 1/2] mm, swap: Use kvzalloc to allocate some swap data structure John Hubbard <jhubbard@nvidia.com> - 2017-03-24 19:20 +0100
csiph-web