lkml.org 
[lkml]   [2021]   [Dec]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH v4 11/66] mm/mmap: Use maple tree for unmapped_area{_topdown}
Date
* Vlastimil Babka <vbabka@suse.cz> [211215 11:43]:
> On 12/1/21 15:29, Liam Howlett wrote:
> > From: "Liam R. Howlett" <Liam.Howlett@Oracle.com>
> >
> > The maple tree code was added to find the unmapped area in a previous
> > commit and was checked against what the rbtree returned, but the actual
> > result was never used. Start using the maple tree implementation and
> > remove the rbtree code.
>
> Nice cleanup. But...
>
> > Add kernel documentation comment for these functions.
> >
> > Signed-off-by: Liam R. Howlett <Liam.Howlett@Oracle.com>
>
> >
> > /* Adjust search length to account for worst case alignment overhead */
> > length = info->length + info->align_mask;
> > if (length < info->length)
> > return -ENOMEM;
> >
> > - rcu_read_lock();
> > - mas_empty_area_rev(&mas, info->low_limit, info->high_limit - 1,
> > - length);
> > - rcu_read_unlock();
>
> Why is RCU locking being removed as part of this? Ditton in
> unmapped_area_topdown()

It is not needed with the mmap_lock() being used in the maple tree. But
I should either be consistent and keep it everywhere or not have it in
the earlier patch. I will fix this, maybe I should have left them in
everywhere.
\
 
 \ /
  Last update: 2021-12-15 19:29    [W:0.156 / U:0.276 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site