Re: [PATCH] mm/mmap.c: rb_parent is not necessary in __vma_link_list

2019-09-11 Thread Wei Yang
On Tue, Aug 13, 2019 at 11:26:56AM +0800, Wei Yang wrote: >Now we use rb_parent to get next, while this is not necessary. > >When prev is NULL, this means vma should be the first element in the >list. Then next should be current first one (mm->mmap), no matter >whether we have parent or not. >

Re: [PATCH] mm/mmap.c: rb_parent is not necessary in __vma_link_list

2019-08-13 Thread Wei Yang
On Mon, Aug 12, 2019 at 08:39:58PM -0700, Matthew Wilcox wrote: >On Tue, Aug 13, 2019 at 11:26:56AM +0800, Wei Yang wrote: >> Now we use rb_parent to get next, while this is not necessary. >> >> When prev is NULL, this means vma should be the first element in the >> list. Then next should be

Re: [PATCH] mm/mmap.c: rb_parent is not necessary in __vma_link_list

2019-08-12 Thread Wei Yang
On Mon, Aug 12, 2019 at 08:39:58PM -0700, Matthew Wilcox wrote: >On Tue, Aug 13, 2019 at 11:26:56AM +0800, Wei Yang wrote: >> Now we use rb_parent to get next, while this is not necessary. >> >> When prev is NULL, this means vma should be the first element in the >> list. Then next should be

Re: [PATCH] mm/mmap.c: rb_parent is not necessary in __vma_link_list

2019-08-12 Thread Matthew Wilcox
On Tue, Aug 13, 2019 at 11:26:56AM +0800, Wei Yang wrote: > Now we use rb_parent to get next, while this is not necessary. > > When prev is NULL, this means vma should be the first element in the > list. Then next should be current first one (mm->mmap), no matter > whether we have parent or not.

[PATCH] mm/mmap.c: rb_parent is not necessary in __vma_link_list

2019-08-12 Thread Wei Yang
Now we use rb_parent to get next, while this is not necessary. When prev is NULL, this means vma should be the first element in the list. Then next should be current first one (mm->mmap), no matter whether we have parent or not. After removing it, the code shows the beauty of symmetry.