Re: [PATCH v4 2/2] mm/vmalloc.c: Modify struct vmap_area to reduce its size

2019-07-15 Thread Pengfei Li
Hi, Vlad Thanks for the comments form you and Matthew, now I am sure v3 is enough. I will follow the next version of your "mm/vmalloc: do not keep unpurged areas in the busy tree". Thanks again for your patience with me! -- Pengfei

Re: [PATCH v4 2/2] mm/vmalloc.c: Modify struct vmap_area to reduce its size

2019-07-15 Thread Uladzislau Rezki
On Fri, Jul 12, 2019 at 11:09:00PM +0800, Pengfei Li wrote: > On Fri, Jul 12, 2019 at 9:49 PM Matthew Wilcox wrote: > > > > On Fri, Jul 12, 2019 at 08:02:13PM +0800, Pengfei Li wrote: > > > > I don't think you need struct union struct union. Because llist_node > > is just a pointer, you can get t

Re: [PATCH v4 2/2] mm/vmalloc.c: Modify struct vmap_area to reduce its size

2019-07-12 Thread Pengfei Li
On Fri, Jul 12, 2019 at 9:49 PM Matthew Wilcox wrote: > > On Fri, Jul 12, 2019 at 08:02:13PM +0800, Pengfei Li wrote: > > I don't think you need struct union struct union. Because llist_node > is just a pointer, you can get the same savings with just: > > union { > struct

Re: [PATCH v4 2/2] mm/vmalloc.c: Modify struct vmap_area to reduce its size

2019-07-12 Thread Matthew Wilcox
On Fri, Jul 12, 2019 at 08:02:13PM +0800, Pengfei Li wrote: > +++ b/include/linux/vmalloc.h > @@ -51,15 +51,37 @@ struct vmap_area { > unsigned long va_start; > unsigned long va_end; > > - /* > - * Largest available free size in subtree. > - */ > - unsigned long subt

[PATCH v4 2/2] mm/vmalloc.c: Modify struct vmap_area to reduce its size

2019-07-12 Thread Pengfei Li
Objective - The current implementation of struct vmap_area wasted space. After applying this commit, sizeof(struct vmap_area) has been reduced from 11 words to 8 words. Description --- 1) Pack "vm" and "subtree_max_size" This is no problem because A) "vm" is only used when vmap_