lkml.org 
[lkml]   [2023]   [May]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH 5/9] mm: vmalloc: Insert busy-VA per-cpu zone
On Mon, May 22, 2023 at 11:12:08PM -0700, Christoph Hellwig wrote:
> > /* Look up the first VA which satisfies addr < va_end, NULL if none. */
> > -static struct vmap_area *find_vmap_area_exceed_addr(unsigned long addr)
> > +static struct vmap_area *find_vmap_area_exceed_addr(unsigned long addr, struct rb_root *root)
>
> Please avoid the overly long line.
>
Will fix it.

> > + struct cpu_vmap_zone *z = addr_to_cvz(va->va_start);
> > +
> > /*
> > * Remove from the busy tree/list.
> > */
> > - spin_lock(&vmap_area_lock);
> > - unlink_va(va, &vmap_area_root);
> > - spin_unlock(&vmap_area_lock);
> > + fbl_lock(z, BUSY);
> > + unlink_va(va, &fbl_root(z, BUSY));
> > + fbl_unlock(z, BUSY);
>
> I find the BUSY magic here very confusing, and would prefer to
> just spell the actual lock reference out.
>
No problem. I can make it open-coded. What is about an access to tree/list?

>> unlink_va(va, &fbl_root(z, BUSY));
I mean this one.

--
Uladzislau Rezki

\
 
 \ /
  Last update: 2023-05-23 17:02    [W:3.009 / U:0.556 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site