Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1693759
| From | Michal Hocko <mhocko@kernel.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v1] mm/vmalloc: add a node corresponding to cached_hole_size |
| Date | 2017-07-21 16:50 +0200 |
| Message-ID | <u5HpE-62U-21@gated-at.bofh.it> (permalink) |
| References | <u5D2F-3tB-17@gated-at.bofh.it> <u5EBr-4jK-5@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Fri 21-07-17 04:39:48, Matthew Wilcox wrote: > On Fri, Jul 21, 2017 at 06:01:41PM +0800, Zhaoyang Huang wrote: > > we just record the cached_hole_size now, which will be used when > > the criteria meet both of 'free_vmap_cache == NULL' and 'size < > > cached_hole_size'. However, under above scenario, the search will > > start from the rb_root and then find the node which just in front > > of the cached hole. > > > > free_vmap_cache miss: > > vmap_area_root > > / \ > > _next U > > / (T1) > > cached_hole_node > > / > > ... (T2) > > / > > first > > > > vmap_area_list->first->......->cached_hole_node->cached_hole_node.list.next > > |-------(T3)-------| | <<< cached_hole_size >>> | > > > > vmap_area_list->......->cached_hole_node->cached_hole_node.list.next > > | <<< cached_hole_size >>> | > > > > The time cost to search the node now is T = T1 + T2 + T3. > > The commit add a cached_hole_node here to record the one just in front of > > the cached_hole_size, which can help to avoid walking the rb tree and > > the list and make the T = 0; > > Yes, but does this matter in practice? Are there any workloads where > this makes a difference? If so, how much? I have already asked this and didn't get any response. There were other versions of a similar patch without a good clarification... Zhaoyang Huang, please try to formulate the problem you are fixing and why. While it is clear that you add _an_ optimization it is not really clear why we need it and whether it might adversely affect existing workloads. I would rather not touch this code unless there is a strong justification for it. -- Michal Hocko SUSE Labs
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH v1] mm/vmalloc: add a node corresponding to cached_hole_size Zhaoyang Huang <huangzhaoyang@gmail.com> - 2017-07-21 12:10 +0200
Re: [PATCH v1] mm/vmalloc: add a node corresponding to cached_hole_size Matthew Wilcox <willy@infradead.org> - 2017-07-21 13:50 +0200
Re: [PATCH v1] mm/vmalloc: add a node corresponding to cached_hole_size Michal Hocko <mhocko@kernel.org> - 2017-07-21 16:50 +0200
csiph-web